[llvm] [InstCombine] Fold patterns which uses <2N x iM> type for comparisons on <N x i2M> vector types (PR #184328)
Yunbo Ni via llvm-commits
llvm-commits at lists.llvm.org
Sun May 10 08:58:25 PDT 2026
================
----------------
cardigan1008 wrote:
> if the two are not equivalent, we should not do the transform right?
In the counterexample, lane 0:
```
A: and 0, poison -> poison
B: select false, poison, 0 -> 0
```
Not sure if I really get your question here, but I think it's not about equivalence but refinement. B is more defined/less poisonous than A. So A->B is accepted.
C behaves more like the widened version of A: it speculates dependence on both half-lanes and can propagate poison that B would have masked through the unchosen select arm.
https://github.com/llvm/llvm-project/pull/184328
More information about the llvm-commits
mailing list