Fix an obvious bug. Old code only worked for the entry block.

llvm-svn: 37743
This commit is contained in:
Evan Cheng 2007-06-27 01:16:36 +00:00
parent 5477c54aa0
commit 6cf1371456
1 changed files with 4 additions and 3 deletions

View File

@ -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?");