[llvm] [InstSimplify] Guard and/or implied-cond folds against poison (PR #211534)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 23 08:15:38 PDT 2026
dtcxzyw wrote:
> %a is false and %b is poison (samesign is violated), so the and is a well-defined false.
`and` propagates poison. So the result is poison.
We call it `bitwise and`. The `logical and` is `select i1 %x, i1 %y, i1 false` which doesn't propagate poison.
I tried all cases from your tests in Alive2 https://alive2.llvm.org/ce/z/UgjRxy https://alive2.llvm.org/ce/z/W23jLr
All the transformations are correct.
Can you please provide an Alive2 link to demonstrate the miscompilation?
https://github.com/llvm/llvm-project/pull/211534
More information about the llvm-commits
mailing list