diff options
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 5ac54ea8a44..71e6b3e4d0f 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/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 |