[llvm-commits] CVS: llvm/lib/Target/Sparc/PeepholeOpts.cpp
Vikram Adve
vadve at cs.uiuc.edu
Tue Oct 21 07:30:01 PDT 2003
Changes in directory llvm/lib/Target/Sparc:
PeepholeOpts.cpp updated: 1.13 -> 1.14
---
Log message:
When opcodes like ADD were split into reg. and immed. versions (ADDi and ADDr),
this code wasn't fixed correctly so it missed copy operations that used ADDi.
---
Diffs of the changes: (+2 -1)
Index: llvm/lib/Target/Sparc/PeepholeOpts.cpp
diff -u llvm/lib/Target/Sparc/PeepholeOpts.cpp:1.13 llvm/lib/Target/Sparc/PeepholeOpts.cpp:1.14
--- llvm/lib/Target/Sparc/PeepholeOpts.cpp:1.13 Mon Oct 20 14:43:17 2003
+++ llvm/lib/Target/Sparc/PeepholeOpts.cpp Tue Oct 21 07:29:45 2003
@@ -63,7 +63,8 @@
return (/* both operands are allocated to the same register */
MI->getOperand(0).getAllocatedRegNum() ==
MI->getOperand(1).getAllocatedRegNum());
- } else if (MI->getOpCode() == V9::ADDr || MI->getOpCode() == V9::ORr) {
+ } else if (MI->getOpCode() == V9::ADDr || MI->getOpCode() == V9::ORr ||
+ MI->getOpCode() == V9::ADDi || MI->getOpCode() == V9::ORi) {
unsigned srcWithDestReg;
for (srcWithDestReg = 0; srcWithDestReg < 2; ++srcWithDestReg)
More information about the llvm-commits
mailing list