[llvm-commits] CVS: llvm/lib/Target/X86/PeepholeOptimizer.cpp
Alkis Evlogimenos
alkis at niobe.cs.uiuc.edu
Tue Feb 17 09:15:01 PST 2004
Changes in directory llvm/lib/Target/X86:
PeepholeOptimizer.cpp updated: 1.24 -> 1.25
---
Log message:
Peephole optimize SUBmi{16,32} into SUBmi{16,32}b when immediate is 8
bits wide.
---
Diffs of the changes: (+3 -0)
Index: llvm/lib/Target/X86/PeepholeOptimizer.cpp
diff -u llvm/lib/Target/X86/PeepholeOptimizer.cpp:1.24 llvm/lib/Target/X86/PeepholeOptimizer.cpp:1.25
--- llvm/lib/Target/X86/PeepholeOptimizer.cpp:1.24 Tue Feb 17 09:10:11 2004
+++ llvm/lib/Target/X86/PeepholeOptimizer.cpp Tue Feb 17 09:14:29 2004
@@ -154,6 +154,7 @@
case X86::ADDmi16: case X86::ADDmi32:
+ case X86::SUBmi16: case X86::SUBmi32:
case X86::ANDmi16: case X86::ANDmi32:
assert(MI->getNumOperands() == 5 && "These should all have 5 operands!");
if (MI->getOperand(4).isImmediate()) {
@@ -165,6 +166,8 @@
default: assert(0 && "Unknown opcode value!");
case X86::ADDmi16: Opcode = X86::ADDmi16b; break;
case X86::ADDmi32: Opcode = X86::ADDmi32b; break;
+ case X86::SUBmi16: Opcode = X86::SUBmi16b; break;
+ case X86::SUBmi32: Opcode = X86::SUBmi32b; break;
case X86::ANDmi16: Opcode = X86::ANDmi16b; break;
case X86::ANDmi32: Opcode = X86::ANDmi32b; break;
}
More information about the llvm-commits
mailing list