[llvm-commits] [llvm] r41821 - /llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp
Devang Patel
dpatel at apple.com
Mon Sep 10 16:57:58 PDT 2007
Author: dpatel
Date: Mon Sep 10 18:57:58 2007
New Revision: 41821
URL: http://llvm.org/viewvc/llvm-project?rev=41821&view=rev
Log:
Check all terminators inside loop.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp?rev=41821&r1=41820&r2=41821&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp Mon Sep 10 18:57:58 2007
@@ -379,7 +379,6 @@
SplitInfo SD;
// Check all basic block's terminators.
-
for (Loop::block_iterator I = L->block_begin(), E = L->block_end();
I != E; ++I) {
BasicBlock *BB = *I;
@@ -395,10 +394,10 @@
ICmpInst *CI = dyn_cast<ICmpInst>(BR->getCondition());
if (!CI || CI == ExitCondition)
- return;
+ continue;
if (CI->getPredicate() == ICmpInst::ICMP_NE)
- return;
+ continue;
// If split condition predicate is GT or GE then first execute
// false branch of split condition.
@@ -508,7 +507,7 @@
// SplitCondition : icmp eq i32 IndVar, SplitValue
// into
// c1 = icmp uge i32 SplitValue, StartValue
- // c2 = icmp ult i32 vSplitValue, ExitValue
+ // c2 = icmp ult i32 SplitValue, ExitValue
// and i32 c1, c2
bool SignedPredicate = ExitCondition->isSignedPredicate();
Instruction *C1 = new ICmpInst(SignedPredicate ?
More information about the llvm-commits
mailing list