[llvm-commits] [llvm] r144117 - /llvm/trunk/lib/CodeGen/ExecutionDepsFix.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Nov 8 12:57:04 PST 2011


Author: stoklund
Date: Tue Nov  8 14:57:04 2011
New Revision: 144117

URL: http://llvm.org/viewvc/llvm-project?rev=144117&view=rev
Log:
Clear old DomainValue after merging.

The old value may still be referenced by some live-out list, and we
don't wan't to collapse those instructions twice.

This fixes the "Can only swizzle VMOVD" assertion in some armv7 SPEC
builds.

<rdar://problem/10413292>

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

Modified: llvm/trunk/lib/CodeGen/ExecutionDepsFix.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ExecutionDepsFix.cpp?rev=144117&r1=144116&r2=144117&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ExecutionDepsFix.cpp (original)
+++ llvm/trunk/lib/CodeGen/ExecutionDepsFix.cpp Tue Nov  8 14:57:04 2011
@@ -266,6 +266,11 @@
   A->AvailableDomains = common;
   A->Dist = std::max(A->Dist, B->Dist);
   A->Instrs.append(B->Instrs.begin(), B->Instrs.end());
+
+  // Clear the old DomainValue so we won't try to swizzle instructions twice.
+  B->Instrs.clear();
+  B->AvailableDomains = 0;
+
   for (unsigned rx = 0; rx != NumRegs; ++rx)
     if (LiveRegs[rx] == B)
       SetLiveReg(rx, A);
@@ -283,7 +288,7 @@
       LiveOutMap::const_iterator fi = LiveOuts.find(*pi);
       if (fi == LiveOuts.end()) continue;
       DomainValue *pdv = fi->second[rx];
-      if (!pdv) continue;
+      if (!pdv || !pdv->AvailableDomains) continue;
       if (!LiveRegs || !LiveRegs[rx]) {
         SetLiveReg(rx, pdv);
         continue;





More information about the llvm-commits mailing list