From c25be3b2de7d30f45cffc739d65c36f37c5d6005 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 llvm-svn: 56321 --- llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/lib/Transforms') diff --git a/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp b/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp index 8cafe7424d0..085223cd814 100644 --- a/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp +++ b/llvm/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.2.3