[PATCH] D117252: [InstCombine] Fold ashr-exact into a icmp-ugt.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 13 17:11:41 PST 2022
craig.topper added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:2242
if (IsAShr) {
- if (Pred == CmpInst::ICMP_SLT || (Pred == CmpInst::ICMP_SGT && IsExact)) {
+ if (Pred == CmpInst::ICMP_SGE || Pred == CmpInst::ICMP_UGE ||
+ Pred == CmpInst::ICMP_SLT || Pred == CmpInst::ICMP_ULT || IsExact) {
----------------
craig.topper wrote:
> Can ICMP_SGE and ICMP_UGE get here? We're starting from a shift by constant that should be canonicalized to SGT and UGT right?
Oops we're starting with a compare with constant that should be canonicalized to SGT to UGT if it was SGE or UGE.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117252/new/
https://reviews.llvm.org/D117252
More information about the llvm-commits
mailing list