diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-02-13 09:13:21 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-02-13 09:13:21 +0000 |
commit | 49fad7227f690cdb5ef564fd8249b33c7d19cd67 (patch) | |
tree | a68ab81935942de24464ff98883b26e4c7f4e581 /lib | |
parent | c6a71af963f12c172c54e9847cda9b2ca83f9116 (diff) | |
download | external_llvm-49fad7227f690cdb5ef564fd8249b33c7d19cd67.zip external_llvm-49fad7227f690cdb5ef564fd8249b33c7d19cd67.tar.gz external_llvm-49fad7227f690cdb5ef564fd8249b33c7d19cd67.tar.bz2 |
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47058 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/TargetInstrInfoImpl.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/CodeGen/TargetInstrInfoImpl.cpp b/lib/CodeGen/TargetInstrInfoImpl.cpp index 598b94a..4f6c123 100644 --- a/lib/CodeGen/TargetInstrInfoImpl.cpp +++ b/lib/CodeGen/TargetInstrInfoImpl.cpp @@ -23,11 +23,9 @@ MachineInstr *TargetInstrInfoImpl::commuteInstruction(MachineInstr *MI) const { "This only knows how to commute register operands so far"); unsigned Reg1 = MI->getOperand(1).getReg(); unsigned Reg2 = MI->getOperand(2).getReg(); - MachineOperand &MO = MI->getOperand(0); - bool UpdateReg0 = MO.isReg() && MO.getReg() == Reg1; bool Reg1IsKill = MI->getOperand(1).isKill(); bool Reg2IsKill = MI->getOperand(2).isKill(); - if (UpdateReg0) { + if (MI->getOperand(0).getReg() == Reg1) { // Must be two address instruction! assert(MI->getDesc().getOperandConstraint(0, TOI::TIED_TO) && "Expecting a two-address instruction!"); |