summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-06-02 00:16:08 +0000
committerBob Wilson <bob.wilson@apple.com>2010-06-02 00:16:08 +0000
commitf4a34b97b84fd2c65cde82b1f7522e9a238b1b63 (patch)
treef79f36c8412418307f121d045b0b24e16498caeb
parent6382c9c681c50909c2cb56c2dee017af25de98e9 (diff)
downloadbcm5719-llvm-f4a34b97b84fd2c65cde82b1f7522e9a238b1b63.tar.gz
bcm5719-llvm-f4a34b97b84fd2c65cde82b1f7522e9a238b1b63.zip
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
-rw-r--r--llvm/lib/CodeGen/TwoAddressInstructionPass.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
index 3f7a610fd00..f61dbc95d1a 100644
--- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
+++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
@@ -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),
OpenPOWER on IntegriCloud