[llvm-commits] [llvm] r53060 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp

Evan Cheng evan.cheng at apple.com
Wed Jul 2 17:04:51 PDT 2008


Author: evancheng
Date: Wed Jul  2 19:04:51 2008
New Revision: 53060

URL: http://llvm.org/viewvc/llvm-project?rev=53060&view=rev
Log:
commuteInstruction should preserve dead markers.

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

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

==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Wed Jul  2 19:04:51 2008
@@ -1214,6 +1214,7 @@
     unsigned A = MI->getOperand(0).getReg();
     unsigned B = MI->getOperand(1).getReg();
     unsigned C = MI->getOperand(2).getReg();
+    bool AisDead = MI->getOperand(0).isDead();
     bool BisKill = MI->getOperand(1).isKill();
     bool CisKill = MI->getOperand(2).isKill();
     // If machine instrs are no longer in two-address forms, update
@@ -1225,7 +1226,8 @@
       A = C;
       CisKill = false;
     }
-    return BuildMI(get(Opc), A).addReg(C, false, false, CisKill)
+    return BuildMI(get(Opc)).addReg(A, true, false, false, AisDead)
+      .addReg(C, false, false, CisKill)
       .addReg(B, false, false, BisKill).addImm(Size-Amt);
   }
   case X86::CMOVB16rr:





More information about the llvm-commits mailing list