[llvm] [InstCombine] Canonicalize `(sub nuw Mask, X)` -> `(xor Mask, X)` (PR #122542)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 11 02:06:13 PST 2025
nikic wrote:
Why is your ctlz fold generating xor in the first place, instead of sub? Your xor implementation is a miscompile for non-pow2 bws, sub is always correct.
https://github.com/llvm/llvm-project/pull/122542
More information about the llvm-commits
mailing list