[llvm] [InstCombine] Fix #163110: Fold icmp (shl X, L), (add (shl Y, L), 1<<L) to icmp X, (Y + 1) (PR #165975)

via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 7 21:28:13 PST 2025


Michael-Chen-NJU wrote:

I've generalized the matching logic to cover all constant multiples of $2^L$ (i.e., $K = C \cdot 2^L$), addressing the need for a more general pattern without modifying the underlying APIs. Verification link: https://alive2.llvm.org/ce/z/QIhiQs

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


More information about the llvm-commits mailing list