aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index f602658..64925b4 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -191,7 +191,10 @@ void LiveIntervals::updateSpilledInterval(Interval& li)
if (mop.isRegister()) {
unsigned reg = mop.getReg();
if (rep(reg) == li.reg) {
- li.addRange(index, index + 2);
+ if (mop.isUse())
+ li.addRange(index, index+2);
+ else
+ li.addRange(index+1, index+2);
}
}
}