- MachineInstr *MI;
- for (MachineRegisterInfo::reg_iterator I = MRI->reg_begin(VirtReg->reg);
- (MI = I.skipInstruction());)
- if (MI->isInlineAsm())
+ MachineInstr *MI = nullptr;
+ for (MachineRegisterInfo::reg_instr_iterator
+ I = MRI->reg_instr_begin(VirtReg->reg), E = MRI->reg_instr_end();
+ I != E; ) {
+ MachineInstr *TmpMI = &*(I++);
+ if (TmpMI->isInlineAsm()) {
+ MI = TmpMI;