Addresses PR#32791 (https://bugs.llvm.org//show_bug.cgi?id=32791).
When attempting to simplify an 'or' instruction, check whether its operands are
the results of 'select' instructions, and whether those instructions are the
inverse of one another (that is, their predicate are the inverse of one another,
but their true and false conditions are identical). If they are, the 'or' can
be simplified to a single 'select' instruction.
This comment didn't read clearly to me. The 'or' (not a comparison) is based on the selects.
Have the formula in the comment line up with the variable names in the code:
or (select (cmp Pred1, A, B), C, 0), (select (cmp Pred2, A, B), D, 0) --> select (cmp Pred1, A, B), C, D
when Pred1 is the inverse of Pred2.