summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveInterval.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-01-30 22:44:55 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-01-30 22:44:55 +0000
commitb9b740119d1a272f783b7853c4c6633b3163dea7 (patch)
treeb0ff12f26b1066f72fbfb16357d650220a61dfa6 /llvm/lib/CodeGen/LiveInterval.cpp
parent2a2c5b98eef277705cb9f1bf0cf0083507359bb7 (diff)
downloadbcm5719-llvm-b9b740119d1a272f783b7853c4c6633b3163dea7.tar.gz
bcm5719-llvm-b9b740119d1a272f783b7853c4c6633b3163dea7.zip
Fixed a bug in MergeValueInAsValue() pointed out by David Greene. Replace val# with previous liverange's.
llvm-svn: 46579
Diffstat (limited to 'llvm/lib/CodeGen/LiveInterval.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveInterval.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp
index b20a87ea0a8..e1b8cf98019 100644
--- a/llvm/lib/CodeGen/LiveInterval.cpp
+++ b/llvm/lib/CodeGen/LiveInterval.cpp
@@ -402,9 +402,9 @@ void LiveInterval::MergeValueInAsValue(const LiveInterval &RHS,
IP = std::upper_bound(IP, end(), Start);
// If the start of this range overlaps with an existing liverange, trim it.
if (IP != begin() && IP[-1].end > Start) {
- if (IP->valno != LHSValNo) {
- ReplacedValNos.push_back(IP->valno);
- IP->valno = LHSValNo; // Update val#.
+ if (IP[-1].valno != LHSValNo) {
+ ReplacedValNos.push_back(IP[-1].valno);
+ IP[-1].valno = LHSValNo; // Update val#.
}
Start = IP[-1].end;
// Trimmed away the whole range?
OpenPOWER on IntegriCloud