mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
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:
parent
79fc865ccb
commit
3e0b870def
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user