diff options
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index a4e382d9c85..4b9cc003ee2 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -5458,11 +5458,9 @@ bool CodeGenPrepare::splitBranchCondition(Function &F) { DEBUG(dbgs() << "Before branch condition splitting\n"; BB.dump()); // Create a new BB. - auto *InsertBefore = std::next(Function::iterator(BB)) - .getNodePtrUnchecked(); - auto TmpBB = BasicBlock::Create(BB.getContext(), - BB.getName() + ".cond.split", - BB.getParent(), InsertBefore); + auto TmpBB = + BasicBlock::Create(BB.getContext(), BB.getName() + ".cond.split", + BB.getParent(), BB.getNextNode()); // Update original basic block by using the first condition directly by the // branch instruction and removing the no longer needed and/or instruction. |