Fix bug updating dominators

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11140 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-02-05 22:33:26 +00:00
parent 79fc865ccb
commit 3e0b870def

View File

@ -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);
}