summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/LoopIndexSplit.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/LoopIndexSplit.cpp b/lib/Transforms/Scalar/LoopIndexSplit.cpp
index 8cafe7424d..085223cd81 100644
--- a/lib/Transforms/Scalar/LoopIndexSplit.cpp
+++ b/lib/Transforms/Scalar/LoopIndexSplit.cpp
@@ -1430,6 +1430,12 @@ bool LoopIndexSplit::splitLoop(SplitInfo &SD) {
if (!safeSplitCondition(SD))
return false;
+ // If split condition EQ is not handled.
+ if (ICmpInst *ICMP = dyn_cast<ICmpInst>(SD.SplitCondition)) {
+ if (ICMP->getPredicate() == ICmpInst::ICMP_EQ)
+ return false;
+ }
+
BasicBlock *SplitCondBlock = SD.SplitCondition->getParent();
// Unable to handle triangle loops at the moment.