diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-06-19 06:17:19 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-06-19 06:17:19 +0000 |
commit | 32a3ac79116ce93471cd18ede24452c6af5b290b (patch) | |
tree | 2bfc53ea559aad2d51a6b43574d385616e008410 /lib/CodeGen/TwoAddressInstructionPass.cpp | |
parent | 2c8e64d3e4a3daca9ec74c617a518d03d33eee90 (diff) |
Missed a check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52487 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TwoAddressInstructionPass.cpp')
-rw-r--r-- | lib/CodeGen/TwoAddressInstructionPass.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp index d680a98a7f..0d71589213 100644 --- a/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -234,7 +234,7 @@ static bool isTwoAddrUse(MachineInstr *UseMI, unsigned Reg) { const TargetInstrDesc &TID = UseMI->getDesc(); for (unsigned i = 0, e = TID.getNumOperands(); i != e; ++i) { MachineOperand &MO = UseMI->getOperand(i); - if (MO.getReg() == Reg && + if (MO.isRegister() && MO.getReg() == Reg && (MO.isDef() || TID.getOperandConstraint(i, TOI::TIED_TO) != -1)) // Earlier use is a two-address one. return true; |