Fix an obvious mistake: don't change the operands until all of them have been

checked and it is safe to proceed with the changes.

llvm-svn: 105304
This commit is contained in:
Bob Wilson 2010-06-02 00:16:08 +00:00
parent 6382c9c681
commit f4a34b97b8
1 changed files with 0 additions and 2 deletions

View File

@ -1200,8 +1200,6 @@ TwoAddressInstructionPass::CoalesceExtSubRegs(SmallVector<unsigned,4> &Srcs,
Proceed = false;
break;
}
MO.setReg(DstReg);
MO.setSubReg(NewSubIdx);
}
if (Proceed)
for (MachineRegisterInfo::reg_iterator RI = MRI->reg_begin(SrcReg),