[InstSimplify] fold redundant select of min/max, part 2
This extends e5d15e11 to handle the inverse predicates (there's probably a more elegant way to specify the preds). These patterns correspond to the existing simplify: max (min X, Y), X --> X ...and extra preds for (non)equality. 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/XMvEKQ https://alive2.llvm.org/ce/z/QpMChr
parent
d2f3d7ba
Please register or sign in to comment