Fix an obvious mistake: don't change the operands until all of them have been
authorBob Wilson <bob.wilson@apple.com>
Wed, 2 Jun 2010 00:16:08 +0000 (00:16 +0000)
committerBob Wilson <bob.wilson@apple.com>
Wed, 2 Jun 2010 00:16:08 +0000 (00:16 +0000)
checked and it is safe to proceed with the changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105304 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/TwoAddressInstructionPass.cpp

index 3f7a610fd004eca8362788ac406d2a9cd7d9cc10..f61dbc95d1a82782ff4aed38cbb315176ee6bdca 100644 (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),