[PATCH] D42837: [Loop Predication] Teach LP about reverse loops with uge and sge latch conditions
Anna Thomas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 6 14:24:24 PST 2018
anna added inline comments.
================
Comment at: lib/Transforms/Scalar/LoopPredication.cpp:451
}
- ICmpInst::Predicate LimitCheckPred;
- switch (LatchCheck.Pred) {
- case ICmpInst::ICMP_ULT:
- LimitCheckPred = ICmpInst::ICMP_ULE;
- break;
- case ICmpInst::ICMP_ULE:
- LimitCheckPred = ICmpInst::ICMP_ULT;
- break;
- case ICmpInst::ICMP_SLT:
- LimitCheckPred = ICmpInst::ICMP_SLE;
- break;
- case ICmpInst::ICMP_SLE:
- LimitCheckPred = ICmpInst::ICMP_SLT;
- break;
- default:
- llvm_unreachable("Unsupported loop latch!");
- }
+ auto LimitCheckPred = getLatchPredicateForGuard(LatchCheck.Pred);
----------------
pls land this as a separate NFC after separating out `getLatchPredicateForGuard`.
https://reviews.llvm.org/D42837
More information about the llvm-commits
mailing list