[llvm] [InstCombine] Fold ((X + AddC) & Mask) ^ Mask to ((Mask - AddC) - X) & Mask (PR #174278)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 9 06:42:23 PST 2026
dtcxzyw wrote:
> I think the %sub = subnsw i32 0, %x syntax alone breaks the alive2 verification, as in the example shown by
But the tgt function was directly extracted from the IR diff, right? I cannot reproduce this when I run `opt -passes=instcombine` with your patch (excluding the nsw inference). I guess there is some missing context in the alive2 proof. Both your patch and the rest of InstCombine are fine.
https://github.com/llvm/llvm-project/pull/174278
More information about the llvm-commits
mailing list