[InstSimplify] fold redundant select of min/max
This is similar to the existing simplify: max (max X, Y), X --> max X, Y ...but the select condition can be one of several predicates as shown in the tests. The tests cycle through all 10 icmp preds for each min/max variant with 4 swapped operand patterns each (and the min/max operands are commuted in every other test within those). Some Alive2 examples to verify: https://alive2.llvm.org/ce/z/lCAQm4 https://alive2.llvm.org/ce/z/kzxVXC
Loading
Please sign in to comment