From: Kazu Hirata Date: Sat, 6 Nov 2021 20:08:25 +0000 (-0700) Subject: [X86] Simplify a call to MachineBasicBlock::erase (NFC) X-Git-Tag: upstream/15.0.7~26541 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cefc01fa65a7ebcc10cbf3c3bb2278a6a122deaf;p=platform%2Fupstream%2Fllvm.git [X86] Simplify a call to MachineBasicBlock::erase (NFC) --- diff --git a/llvm/lib/Target/X86/X86CmovConversion.cpp b/llvm/lib/Target/X86/X86CmovConversion.cpp index 05349a7..0e5d230 100644 --- a/llvm/lib/Target/X86/X86CmovConversion.cpp +++ b/llvm/lib/Target/X86/X86CmovConversion.cpp @@ -797,8 +797,7 @@ void X86CmovConverterPass::convertCmovInstsToBranches( MOp.setIsKill(false); } } - MBB->erase(MachineBasicBlock::iterator(MI), - std::next(MachineBasicBlock::iterator(MI))); + MBB->erase(&MI); // Add this PHI to the rewrite table. FalseBBRegRewriteTable[NewCMOV->getOperand(0).getReg()] = TmpReg;