[llvm] [ConstraintElimination] Decompose bitwise and or (PR #126158)

Lee Wei via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 6 23:07:52 PST 2025


leewei05 wrote:

> 1. `!isKnownNonNegative(X)` doesn't mean `X is negative`. You should use `isKnownNegative` instead.
> 2. `MergeResults` only works for add.
> 3. `decompose` is used to decompose a **value** into the sum of variables and a constant offset. I guess @fhahn meant to decompose the **constraint** `!(X | Y < 0)` into `X < 0` and `Y < 0`. You can do this in `ConstraintInfo::addFact`.

Thanks for the pointers! I should probably ask before implement this.. Let me try to re-implement this.



https://github.com/llvm/llvm-project/pull/126158


More information about the llvm-commits mailing list