[llvm] [DAGCombiner] add fold (xor (smin(x, C), C)) and fold (xor (smax(x, C), C)) (PR #155141)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 7 03:01:45 PDT 2025


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


More information about the llvm-commits mailing list