aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-09-18 23:45:14 +0000
committerDevang Patel <dpatel@apple.com>2008-09-18 23:45:14 +0000
commita910155ca16f698a38fbd86bad46b0e67cc90688 (patch)
tree571eb6490d6d3d750ffbb2c278c3a99331a9c1c3 /lib/Transforms
parent3d9f55f58581365249598657dd682a28d66af674 (diff)
downloadexternal_llvm-a910155ca16f698a38fbd86bad46b0e67cc90688.zip
external_llvm-a910155ca16f698a38fbd86bad46b0e67cc90688.tar.gz
external_llvm-a910155ca16f698a38fbd86bad46b0e67cc90688.tar.bz2
splitLoop does not handle split condition EQ.
Fixes PR 2805 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56321 91177308-0d34-0410-b5e6-96231b3b80d8
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 8cafe74..085223c 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.