File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -2326,12 +2326,14 @@ void MachineVerifier::visitMachineInstrBefore(const MachineInstr *MI) {
23262326 }
23272327
23282328 // Verify earlyClobber def operand
2329- if (MCID.getOperandConstraint (0 , MCOI::EARLY_CLOBBER) != -1 ) {
2330- if (!MI->getOperand (0 ).isReg ())
2331- report (" Early clobber must be a register" , MI);
2332- if (!MI->getOperand (0 ).isEarlyClobber ())
2333- report (" Missing earlyClobber flag" , MI);
2334- }
2329+ for (unsigned i = 0 ; i < MI->getNumOperands (); i++)
2330+ if (MCID.getOperandConstraint (i, MCOI::EARLY_CLOBBER) != -1 ) {
2331+ const MachineOperand &Op = MI->getOperand (i);
2332+ if (!Op.isReg ())
2333+ report (" Early clobber must be a register" , MI);
2334+ if (!Op.isEarlyClobber ())
2335+ report (" Missing earlyClobber flag" , MI);
2336+ }
23352337 // Debug values must not have a slot index.
23362338 // Other instructions must have one, unless they are inside a bundle.
23372339 if (LiveInts) {
You can’t perform that action at this time.
0 commit comments