Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ValueTracking] deduce
X * Y != 0
if `LowestKnownBit(X) * LowestKno…
…wnBit(Y) != 0` For `X * Y`, if there exists a subset of `X` and subset of `Y` s.t `sX * sY != 0`, then `X * Y != 0`. - See first proof: https://alive2.llvm.org/ce/z/28C9CG - NB: This is why the previous Odd case works. In knownbits we could exhaustively hunt for such a subset, but `LSB(X)` and `LSB(Y)` actually works. If `LSB(X) * LSB(Y) != 0`, then `X * Y != 0` - See proof: https://alive2.llvm.org/ce/z/p5wWid In `isKnownNonZero` we can use this as if the `LowestKnownOne(X) * LowestKnownOne(Y) != 0`, then `X * Y != 0`, and we don't need to try and other subsets. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D150425
- Loading branch information