diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-11-08 20:57:04 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-11-08 20:57:04 +0000 |
commit | 120588182010fedd40043fd47c38de5d038e3720 (patch) | |
tree | 11597a05917481f4b25a004fca4ad98773ee51cb /llvm/lib/CodeGen/ExecutionDepsFix.cpp | |
parent | da3cfc9fef468076076da815a81b2843d2761a29 (diff) | |
download | bcm5719-llvm-120588182010fedd40043fd47c38de5d038e3720.tar.gz bcm5719-llvm-120588182010fedd40043fd47c38de5d038e3720.zip |
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>
llvm-svn: 144117
Diffstat (limited to 'llvm/lib/CodeGen/ExecutionDepsFix.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ExecutionDepsFix.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/ExecutionDepsFix.cpp b/llvm/lib/CodeGen/ExecutionDepsFix.cpp index bd77f655c14..5aa80f9a067 100644 --- a/llvm/lib/CodeGen/ExecutionDepsFix.cpp +++ b/llvm/lib/CodeGen/ExecutionDepsFix.cpp @@ -266,6 +266,11 @@ bool ExeDepsFix::Merge(DomainValue *A, DomainValue *B) { 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 @@ void ExeDepsFix::enterBasicBlock(MachineBasicBlock *MBB) { 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; |