unsigned OpNo = 1;
// Scan to find the machine operand number for the operand.
- for (; Val; --Val)
- OpNo += MI->getOperand(OpNo).getImmedValue()+1;
+ for (; Val; --Val) {
+ unsigned OpFlags = MI->getOperand(OpNo).getImmedValue();
+ OpNo += (OpFlags >> 3) + 1;
+ }
++OpNo; // Skip over the ID number.
unsigned Flags = cast<ConstantSDNode>(Node->getOperand(i))->getValue();
unsigned NumVals = Flags >> 3;
- MI->addZeroExtImm64Operand(NumVals);
+ MI->addZeroExtImm64Operand(Flags);
++i; // Skip the ID value.
switch (Flags & 7) {