[Statepoint] Fix bug found by sanitaizer.
authorDenis Antrushin <dantrushin@gmail.com>
Thu, 16 Jul 2020 19:54:58 +0000 (22:54 +0300)
committerDenis Antrushin <dantrushin@gmail.com>
Thu, 16 Jul 2020 20:06:53 +0000 (23:06 +0300)
Statepoint has no static operands, so it cannot be verified
against MCInstrDescr. Revert NumDefs change introduced by ef658ebd629.

llvm/lib/CodeGen/MachineVerifier.cpp

index 63f534f..c1a2c4e 100644 (file)
@@ -1565,9 +1565,6 @@ MachineVerifier::visitMachineOperand(const MachineOperand *MO, unsigned MONum) {
   if (MCID.getOpcode() == TargetOpcode::PATCHPOINT)
     NumDefs = (MONum == 0 && MO->isReg()) ? NumDefs : 0;
 
-  if (MCID.getOpcode() == TargetOpcode::STATEPOINT)
-    NumDefs = MI->getNumDefs();
-
   // The first MCID.NumDefs operands must be explicit register defines
   if (MONum < NumDefs) {
     const MCOperandInfo &MCOI = MCID.OpInfo[MONum];