[llvm-commits] [llvm] r112494 - /llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp

Bob Wilson bob.wilson at apple.com
Mon Aug 30 11:10:48 PDT 2010


Author: bwilson
Date: Mon Aug 30 13:10:48 2010
New Revision: 112494

URL: http://llvm.org/viewvc/llvm-project?rev=112494&view=rev
Log:
When expanding NEON VST pseudo instructions, if the original super-register
operand is killed, add it to the expanded instruction as an implicit kill
operand instead of marking the individual subregs with kill flags.  This
should work better in general and also handles the case for VST3 where one
of the subregs was not referenced in the expanded instruction and so was
not marked killed.

Modified:
    llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp

Modified: llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp?rev=112494&r1=112493&r2=112494&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp Mon Aug 30 13:10:48 2010
@@ -118,14 +118,16 @@
     D3 = TRI->getSubReg(SrcReg, ARM::dsub_7);
   } 
 
-  MIB.addReg(D0, getKillRegState(SrcIsKill))
-    .addReg(D1, getKillRegState(SrcIsKill));
+  MIB.addReg(D0).addReg(D1);
   if (NumRegs > 2)
-    MIB.addReg(D2, getKillRegState(SrcIsKill));
+    MIB.addReg(D2);
   if (NumRegs > 3)
-    MIB.addReg(D3, getKillRegState(SrcIsKill));
+    MIB.addReg(D3);
   MIB = AddDefaultPred(MIB);
   TransferImpOps(MI, MIB, MIB);
+  if (SrcIsKill)
+    // Add an implicit kill for the super-reg.
+    (*MIB).addRegisterKilled(SrcReg, TRI, true);
   MI.eraseFromParent();
 }
 





More information about the llvm-commits mailing list