[llvm] [InstCombine] Canonicalize `(sub nuw Mask, X)` -> `(xor Mask, X)` (PR #122542)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 10 20:57:21 PST 2025
dtcxzyw wrote:
> Or just update folds using xor to also accept sub nuw. Let me know which of these sounds most reasonable.
We can start with adding a matcher for both Xor and `sub nuw MaskC, X`.
> we need some IR flag indicating the equivilence.
The downside is that we have to fight with more flag preservation bugs :(
https://github.com/llvm/llvm-project/pull/122542
More information about the llvm-commits
mailing list