aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index 34134520d6..ebab85fb48 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -623,10 +623,11 @@ void LiveIntervals::handleLiveInRegister(MachineBasicBlock *MBB,
}
exit:
- // Alias of a live-in register might not be used at all.
- if (isAlias && end == 0) {
+ // Live-in register might not be used at all.
+ if (end == MIIdx) {
DOUT << " dead";
- end = getDefIndex(start) + 1;
+ if (isAlias)
+ end = getDefIndex(MIIdx) + 1;
}
assert(start < end && "did not find end of interval?");