From 4fe0fe8b493437e91f8510b81462ff39f0d889ca Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Thu, 18 Sep 2008 23:45:14 +0000 Subject: 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 --- lib/Transforms/Scalar/LoopIndexSplit.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/Transforms/Scalar/LoopIndexSplit.cpp') 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(SD.SplitCondition)) { + if (ICMP->getPredicate() == ICmpInst::ICMP_EQ) + return false; + } + BasicBlock *SplitCondBlock = SD.SplitCondition->getParent(); // Unable to handle triangle loops at the moment. -- cgit v1.1