summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-06-27 01:16:36 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-06-27 01:16:36 +0000
commit6cf13714569bf079e4e928af05dd1055b19ebe4f (patch)
tree05db131c40e5a892cec725005d32ff3ade780fff /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
parent5477c54aa0e05d5ca30ffa3a58b24e579fbea0a1 (diff)
downloadbcm5719-llvm-6cf13714569bf079e4e928af05dd1055b19ebe4f.tar.gz
bcm5719-llvm-6cf13714569bf079e4e928af05dd1055b19ebe4f.zip
Fix an obvious bug. Old code only worked for the entry block.
llvm-svn: 37743
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 34134520d65..ebab85fb480 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/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?");
OpenPOWER on IntegriCloud