[X86] Simplify a call to MachineBasicBlock::erase (NFC)
authorKazu Hirata <kazu@google.com>
Sat, 6 Nov 2021 20:08:25 +0000 (13:08 -0700)
committerKazu Hirata <kazu@google.com>
Sat, 6 Nov 2021 20:08:25 +0000 (13:08 -0700)
llvm/lib/Target/X86/X86CmovConversion.cpp

index 05349a7..0e5d230 100644 (file)
@@ -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;