summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-07 18:56:16 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-07 18:56:16 +0000
commitac32d8a6913a2112461e503a1eeabcb5e2100687 (patch)
tree861c31ac2d54c88a041ccc80d9cdbade55a62997 /llvm/lib/CodeGen
parent0bb165a7a7eb2b0102a5cbf4d610d47c88fc397e (diff)
downloadbcm5719-llvm-ac32d8a6913a2112461e503a1eeabcb5e2100687.tar.gz
bcm5719-llvm-ac32d8a6913a2112461e503a1eeabcb5e2100687.zip
Handle the special case of registers begin redefined by early-clobber defs.
In this case, the value need to be available at the load index instead of the normal use index. llvm-svn: 127167
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index d3267299204..4dda5485488 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -779,6 +779,13 @@ void LiveIntervals::shrinkToUses(LiveInterval *li) {
if (VNI->isUnused())
continue;
NewLI.addRange(LiveRange(VNI->def, VNI->def.getNextSlot(), VNI));
+
+ // A use tied to an early-clobber def ends at the load slot and isn't caught
+ // above. Catch it here instead. This probably only ever happens for inline
+ // assembly.
+ if (VNI->def.isUse())
+ if (VNInfo *UVNI = li->getVNInfoAt(VNI->def.getLoadIndex()))
+ WorkList.push_back(std::make_pair(VNI->def.getLoadIndex(), UVNI));
}
// Keep track of the PHIs that are in use.
OpenPOWER on IntegriCloud