[PATCH] D137632: [LoopPredication] Widen checks if condition operands constant ranges are known
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 5 23:23:36 PST 2023
mkazantsev added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopPredication.cpp:820
+
+ // We don't support equality predicates currently.
+ if (Pred != CmpInst::ICMP_ULT && Pred != CmpInst::ICMP_ULE &&
----------------
In the switch above:
```
case CmpInst::ICMP_SGE:
case CmpInst::ICMP_UGT:
case CmpInst::ICMP_UGE:
case CmpInst::ICMP_SGT:
std::swap(LHS, RHS);
Pred = ICmpInst::getSwappedPredicate(Pred);
LLVM_FALLTHROUGH
// Allowed predicates:
break;
default:
return nullptr
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137632/new/
https://reviews.llvm.org/D137632
More information about the llvm-commits
mailing list