aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-02-28 16:54:17 +0000
committerChris Lattner <sabre@nondot.org>2003-02-28 16:54:17 +0000
commit6315938d68df89ea1f5c8f9424d9f3584b74bc8c (patch)
treef03f33c6f3b6ac7eefb2ef9520f3dd396708642f /lib/Transforms
parentba386d943f4a83095d9c625cb0d46c1afe45ed1f (diff)
Fix bug I introduced yesterday :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5669 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Utils/LoopSimplify.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp
index 3759f44f64..5a68dda1af 100644
--- a/lib/Transforms/Utils/LoopSimplify.cpp
+++ b/lib/Transforms/Utils/LoopSimplify.cpp
@@ -307,7 +307,8 @@ void Preheaders::RewriteLoopExitBlock(Loop *L, BasicBlock *Exit) {
// Replace any instances of Exit with NewBB in this and any nested loops...
for (df_iterator<Loop*> I = df_begin(L), E = df_end(L); I != E; ++I)
- I->changeExitBlock(Exit, NewBB); // Update exit block information
+ if (I->hasExitBlock(Exit))
+ I->changeExitBlock(Exit, NewBB); // Update exit block information
// Update dominator information... The blocks that dominate NewBB are the
// intersection of the dominators of predecessors, plus the block itself.