the X86 backend no longer needs to delete its own noop copies
authorChris Lattner <sabre@nondot.org>
Fri, 3 Feb 2006 02:59:58 +0000 (02:59 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 3 Feb 2006 02:59:58 +0000 (02:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25923 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86PeepholeOpt.cpp

index cb31ec335d1620a8d5cbc5ca218399cab4ac91ea..40735459d6a856a5e593acc30bfe6c1220f5ee5b 100644 (file)
@@ -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 @@ bool PH::PeepholeOptimize(MachineBasicBlock &MBB,
   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