[all-commits] [llvm/llvm-project] 77f2f3: [InstCombine] Generalize (icmp sgt (1 << Y), -1) -...
Craig Topper via All-commits
all-commits at lists.llvm.org
Sun Jan 15 13:44:01 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 77f2f34d696b77fe5bf05afbe7386966b6bcc8ba
https://github.com/llvm/llvm-project/commit/77f2f34d696b77fe5bf05afbe7386966b6bcc8ba
Author: Craig Topper <craig.topper at sifive.com>
Date: 2023-01-15 (Sun, 15 Jan 2023)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/test/Transforms/InstCombine/icmp.ll
Log Message:
-----------
[InstCombine] Generalize (icmp sgt (1 << Y), -1) -> (icmp ne Y, BitWidth-1) to any negative constant.
Similar for the sle version which will be canonicalized to slt first.
Alive2 proof as implemented: https://alive2.llvm.org/ce/z/_YawdM
@spatel's original Alive2: https://alive2.llvm.org/ce/z/3YB2vs
Reviewed By: lebedev.ri
Differential Revision: https://reviews.llvm.org/D141773
More information about the All-commits
mailing list