[llvm-commits] [llvm] r56310 - /llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp

Dan Gohman gohman at apple.com
Thu Sep 18 11:22:32 PDT 2008


Author: djg
Date: Thu Sep 18 13:22:32 2008
New Revision: 56310

URL: http://llvm.org/viewvc/llvm-project?rev=56310&view=rev
Log:
Don't consider instructions with implicit physical register
defs to be necessarily live.

Modified:
    llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp

Modified: llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp?rev=56310&r1=56309&r2=56310&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp (original)
+++ llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp Thu Sep 18 13:22:32 2008
@@ -64,7 +64,8 @@
           const MachineOperand &MO = MI->getOperand(i);
           if (MO.isRegister() && MO.isDef()) {
             unsigned Reg = MO.getReg();
-            if (TargetRegisterInfo::isPhysicalRegister(Reg) ||
+            if ((!MO.isImplicit() &&
+                 TargetRegisterInfo::isPhysicalRegister(Reg)) ||
                 !MRI.use_empty(Reg)) {
               // This def has a use. Don't delete the instruction!
               AllDefsDead = false;





More information about the llvm-commits mailing list