[ValueTracking] Add KnownBits patterns `xor(x, x - 1)` and `and(x, -x)` for...
[ValueTracking] Add KnownBits patterns `xor(x, x - 1)` and `and(x, -x)` for knowing upper bits to be zero These two BMI pattern will clear the upper bits of result past the first set bit. So if we know a single bit in `x` is set, we know that `results[bitwidth - 1, log2(x) + 1] = 0`. Alive2: blsmsk: https://alive2.llvm.org/ce/z/a397BS blsi: https://alive2.llvm.org/ce/z/tsbQhC Differential Revision: https://reviews.llvm.org/D142271
Loading
Please sign in to comment