aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--lib/CodeGen/MachineBasicBlock.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/CodeGen/MachineBasicBlock.cpp b/lib/CodeGen/MachineBasicBlock.cpp
index 5ac54ea8a4..71e6b3e4d0 100644
--- a/lib/CodeGen/MachineBasicBlock.cpp
+++ b/lib/CodeGen/MachineBasicBlock.cpp
@@ -305,11 +305,9 @@ void MachineBasicBlock::ReplaceUsesOfBlockWith(MachineBasicBlock *Old,
I->getOperand(i).setMBB(New);
}
- // Update the successor information. If New was already a successor, just
- // remove the link to Old instead of creating another one. PR 1444.
+ // Update the successor information.
removeSuccessor(Old);
- if (!isSuccessor(New))
- addSuccessor(New);
+ addSuccessor(New);
}
/// CorrectExtraCFGEdges - Various pieces of code can cause excess edges in the