Fix regression that I caused yesterday night while adding logic to select appropriate...
authorDevang Patel <dpatel@apple.com>
Fri, 24 Aug 2007 19:32:26 +0000 (19:32 +0000)
committerDevang Patel <dpatel@apple.com>
Fri, 24 Aug 2007 19:32:26 +0000 (19:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41365 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/LoopIndexSplit.cpp

index 23ffc3a4d2591d741bc02017fa958e85a612e12d..1eeb9be6a132049b698944618b9fc025ebbc2a71 100644 (file)
@@ -903,7 +903,7 @@ bool LoopIndexSplit::splitLoop(SplitInfo &SD) {
     A_ActiveBranch = A_BR->getSuccessor(1);
     A_InactiveBranch = A_BR->getSuccessor(0);
   }
-  A_BR->setUnconditionalDest(A_BR->getSuccessor(0));
+  A_BR->setUnconditionalDest(A_ActiveBranch);
   removeBlocks(A_InactiveBranch, L, A_ActiveBranch);
 
   //[*] Eliminate split condition's inactive branch in from BLoop.
@@ -918,7 +918,7 @@ bool LoopIndexSplit::splitLoop(SplitInfo &SD) {
     B_ActiveBranch = B_BR->getSuccessor(0);
     B_InactiveBranch = B_BR->getSuccessor(1);
   }
-  B_BR->setUnconditionalDest(B_BR->getSuccessor(1));
+  B_BR->setUnconditionalDest(B_ActiveBranch);
   removeBlocks(B_InactiveBranch, BLoop, B_ActiveBranch);
 
   return true;