https://github.com/RKSimon commented: Should we allow this fold if the minmax opcode is legal? xor+minmax seems likely to be cheaper than a cmp+select+xor (even if it simplifies to cmp+and+xor) https://github.com/llvm/llvm-project/pull/155141