[llvm] [LVI] Generalize mask not equal conditions handling (PR #92946)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 4 05:23:57 PDT 2024
antoniofrighetto wrote:
> To give an example, let's say C=0 (ignoring the existing special case). Then the range for EQ will be `[0, ~Mask]`. The range for NE you would compute is `[~Mask + 1, MAX]`, which is (very) incorrect.
Revisited this better, yet I'm still unsure. If C=0, the range for EQ is indeed `[0, ~Mask]`, so the inverse is `[~Mask + 1, MAX]`, that is precisely the one you obtain in the current existing case, which should be correct. Could you please show another example where inverse leads to improper result? AFAICT we should be wrong only when `(Val & Mask) == C` is unsat, in which case we ensure to be conservative.
https://github.com/llvm/llvm-project/pull/92946
More information about the llvm-commits
mailing list