Fix some incorrect logic in DominanceFrontier::splitBlock. Part of

PR4238.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72223 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eli Friedman 2009-05-21 20:40:30 +00:00
parent c4c268b04f
commit 0f4012ca9d
2 changed files with 4 additions and 6 deletions

View File

@ -160,10 +160,7 @@ void DominanceFrontier::splitBlock(BasicBlock *NewBB) {
break;
}
}
if (!BlockDominatesAny)
continue;
// If NewBBSucc should not stay in our dominator frontier, remove it.
// We remove it unless there is a predecessor of NewBBSucc that we
// dominate, but we don't strictly dominate NewBBSucc.
@ -181,7 +178,8 @@ void DominanceFrontier::splitBlock(BasicBlock *NewBB) {
if (ShouldRemove)
removeFromFrontier(DFI, NewBBSucc);
addToFrontier(DFI, NewBB);
if (BlockDominatesAny && (&*FI == NewBB || !DT.dominates(FI, NewBB)))
addToFrontier(DFI, NewBB);
}
}

View File

@ -1,4 +1,4 @@
; RUN: llvm-as < %s | opt -scalarrepl -loopsimplify -licm -disable-output
; RUN: llvm-as < %s | opt -scalarrepl -loopsimplify -licm -disable-output -verify-dom-info
define void @inflate() {
entry: