diff options
author | Bob Wilson <bob.wilson@apple.com> | 2009-08-31 21:54:16 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2009-08-31 21:54:16 +0000 |
commit | 53b6a02dd1c327553bcbad60c0aaa979080c0d05 (patch) | |
tree | 3bf2adaf3cb3bfef7f330b72116682f33b9a1a2f /llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | |
parent | e7717e7b2a0beb3acd27815245cabff3f92dc232 (diff) | |
download | bcm5719-llvm-53b6a02dd1c327553bcbad60c0aaa979080c0d05.tar.gz bcm5719-llvm-53b6a02dd1c327553bcbad60c0aaa979080c0d05.zip |
If the tied registers are already the same, there is no need to change
them. Move the code to make that change inside the conditional.
llvm-svn: 80630
Diffstat (limited to 'llvm/lib/CodeGen/TwoAddressInstructionPass.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp index 738b3c97acf..d8871f98ac7 100644 --- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -985,13 +985,13 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) { mi->getOperand(i).getReg() == regB) mi->getOperand(i).setReg(regA); } - } - assert(mi->getOperand(ti).isDef() && mi->getOperand(si).isUse()); - mi->getOperand(ti).setReg(mi->getOperand(si).getReg()); - MadeChange = true; + assert(mi->getOperand(ti).isDef() && mi->getOperand(si).isUse()); + mi->getOperand(ti).setReg(mi->getOperand(si).getReg()); + MadeChange = true; - DEBUG(errs() << "\t\trewrite to:\t" << *mi); + DEBUG(errs() << "\t\trewrite to:\t" << *mi); + } } mi = nmi; |