[llvm-commits] [llvm] r64524 - /llvm/branches/release_25/lib/Target/X86/X86RegisterInfo.cpp

Tanya Lattner tonic at nondot.org
Fri Feb 13 17:14:49 PST 2009


Author: tbrethou
Date: Fri Feb 13 19:14:49 2009
New Revision: 64524

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

Modified:
    llvm/branches/release_25/lib/Target/X86/X86RegisterInfo.cpp

Modified: llvm/branches/release_25/lib/Target/X86/X86RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_25/lib/Target/X86/X86RegisterInfo.cpp?rev=64524&r1=64523&r2=64524&view=diff

==============================================================================
--- llvm/branches/release_25/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/branches/release_25/lib/Target/X86/X86RegisterInfo.cpp Fri Feb 13 19:14:49 2009
@@ -404,11 +404,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