Abu 1078a1dabd
Lowering ~x | (x - 1) to ~blsi(x) (#186722)
Alive2 proof: 
https://alive2.llvm.org/ce/z/bK93Cn

I've implemented a fold in `InstCombineAndOrXor.cpp` to canonicalize `~x
| (x - 1)` to `~(x & -x)` which enables the CodeGen to emit the `blsi`
instruction.

I've also added a test in `CodeGen/X86`.

Fixes #184055

---------

Co-authored-by: Tim Gymnich <tim@gymni.ch>
2026-03-19 20:45:56 +08:00
..