1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

Fix bug updating dominators

llvm-svn: 11140
This commit is contained in:
Chris Lattner 2004-02-05 22:33:26 +00:00
parent 3846a304eb
commit f2a8b9e75b

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