Fix Analysis/Dominators/2006-10-02-BreakCritEdges.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33210 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-01-15 00:15:09 +00:00
parent 488228ceb1
commit caed0e3d71

View File

@ -212,7 +212,8 @@ bool llvm::SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P,
// Should we update ImmediateDominator information?
if (ImmediateDominators *ID = P->getAnalysisToUpdate<ImmediateDominators>()) {
if (ID->get(TIBB)) { // Only do this if TIBB is reachable.
// Only do this if TIBB is reachable.
if (ID->get(TIBB) || &TIBB->getParent()->getEntryBlock() == TIBB) {
// TIBB is the new immediate dominator for NewBB.
ID->addNewBlock(NewBB, TIBB);