From cefc01fa65a7ebcc10cbf3c3bb2278a6a122deaf Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 6 Nov 2021 13:08:25 -0700 Subject: [PATCH] [X86] Simplify a call to MachineBasicBlock::erase (NFC) --- llvm/lib/Target/X86/X86CmovConversion.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; -- 2.7.4