[llvm-commits] CVS: llvm/lib/Target/X86/X86PeepholeOpt.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Feb 2 19:00:11 PST 2006



Changes in directory llvm/lib/Target/X86:

X86PeepholeOpt.cpp updated: 1.41 -> 1.42
---
Log message:

the X86 backend no longer needs to delete its own noop copies


---
Diffs of the changes:  (+2 -10)

 X86PeepholeOpt.cpp |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)


Index: llvm/lib/Target/X86/X86PeepholeOpt.cpp
diff -u llvm/lib/Target/X86/X86PeepholeOpt.cpp:1.41 llvm/lib/Target/X86/X86PeepholeOpt.cpp:1.42
--- llvm/lib/Target/X86/X86PeepholeOpt.cpp:1.41	Mon Dec 12 14:12:20 2005
+++ llvm/lib/Target/X86/X86PeepholeOpt.cpp	Thu Feb  2 20:59:58 2006
@@ -7,7 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file contains a peephole optimizer for the X86.
+// This file contains an immediate shrinker for the X86.  FIXME: Remove when
+// the dag isel makes this obsolete!
 //
 //===----------------------------------------------------------------------===//
 
@@ -61,15 +62,6 @@
   MachineInstr *Next = (NextI != MBB.end()) ? &*NextI : (MachineInstr*)0;
   unsigned Size = 0;
   switch (MI->getOpcode()) {
-  case X86::MOV8rr:
-  case X86::MOV16rr:
-  case X86::MOV32rr:   // Destroy X = X copies...
-    if (MI->getOperand(0).getReg() == MI->getOperand(1).getReg()) {
-      I = MBB.erase(I);
-      return true;
-    }
-    return false;
-
     // A large number of X86 instructions have forms which take an 8-bit
     // immediate despite the fact that the operands are 16 or 32 bits.  Because
     // this can save three bytes of code size (and icache space), we want to






More information about the llvm-commits mailing list