summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-07-26 03:57:45 +0000
committerMatthias Braun <matze@braunis.de>2016-07-26 03:57:45 +0000
commit3865b1d35bd366daa6f859e9ec5c9c873028d432 (patch)
tree4460d9320a7c748af9d93fe83d3eacf4bb9bc8db /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
parent884b47ecfd88fd2aaee30f9c74022e9743233cd1 (diff)
downloadbcm5719-llvm-3865b1d35bd366daa6f859e9ec5c9c873028d432.tar.gz
bcm5719-llvm-3865b1d35bd366daa6f859e9ec5c9c873028d432.zip
LiveIntervalAnalysis: Fix handleMoveDown() problem
If we move a last-use register read to a later position we may skip intermediate segments. This may require us to not only extend the segment before the NewIdx, but also extend the segment live-in to OldIdx. This switches LiveIntervalTest to use AMDGPU so we can test subregister liveness. llvm-svn: 276724
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 5f3281f6771..8fd0585f976 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -1039,6 +1039,8 @@ private:
LiveRange::iterator Prev = std::prev(NewIdxIn);
Prev->end = NewIdx.getRegSlot();
}
+ // Extend OldIdxIn.
+ OldIdxIn->end = Next->start;
return;
}
OpenPOWER on IntegriCloud