From 3e0b870def750929512ebe86e9b589fbab9d538e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 5 Feb 2004 22:33:26 +0000 Subject: [PATCH] Fix bug updating dominators git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11140 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/LoopSimplify.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp index 798dac10f26..53c8542b143 100644 --- a/lib/Transforms/Utils/LoopSimplify.cpp +++ b/lib/Transforms/Utils/LoopSimplify.cpp @@ -533,12 +533,12 @@ void LoopSimplify::UpdateDomInfoForRevectoredPreds(BasicBlock *NewBB, DS.addBasicBlock(NewBB, NewBBDomSet); // If NewBB dominates some blocks, then it will dominate all blocks that - // PredBlocks[0] used to except for PredBlocks[0] itself. + // NewBBSucc does. if (NewBBDominatesNewBBSucc) { BasicBlock *PredBlock = PredBlocks[0]; Function *F = NewBB->getParent(); for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) - if (DS.properlyDominates(PredBlock, I)) + if (DS.dominates(NewBBSucc, I)) DS.addDominator(I, NewBB); }