[llvm-commits] [llvm] r64316 - /llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp

Dan Gohman gohman at apple.com
Wed Feb 11 11:50:26 PST 2009


Author: djg
Date: Wed Feb 11 13:50:24 2009
New Revision: 64316

URL: http://llvm.org/viewvc/llvm-project?rev=64316&view=rev
Log:
Don't try to set an EFLAGS operand to dead if no instruction was created.
This fixes a bug introduced by r61215.

Modified:
    llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp

Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=64316&r1=64315&r2=64316&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Wed Feb 11 13:50:24 2009
@@ -412,11 +412,13 @@
         }
       }
 
-      // The EFLAGS implicit def is dead.
-      New->getOperand(3).setIsDead();
+      if (New) {
+        // The EFLAGS implicit def is dead.
+        New->getOperand(3).setIsDead();
 
-      // Replace the pseudo instruction with a new instruction...
-      if (New) MBB.insert(I, New);
+        // Replace the pseudo instruction with a new instruction...
+        MBB.insert(I, New);
+      }
     }
   } else if (I->getOpcode() == getCallFrameDestroyOpcode()) {
     // If we are performing frame pointer elimination and if the callee pops





More information about the llvm-commits mailing list