diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils')
| -rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 34b31bc6991..3eaae8eacc5 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -153,8 +153,8 @@ static bool TryToSimplifyUncondBranchFromEmptyBlock(BasicBlock *BB, // *ONLY* had BB as a predecessor, and the PHI node is still valid // now. Simply move it into Succ, because we know that BB // strictly dominated Succ. - BB->getInstList().remove(BB->begin()); - Succ->getInstList().push_front(PN); + Succ->getInstList().splice(Succ->begin(), + BB->getInstList(), BB->begin()); // We need to add new entries for the PHI node to account for // predecessors of Succ that the PHI node does not take into |

