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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37743 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2007-06-27 01:16:36 +00:00
parent 6032a5ba64
commit 75611fb4e6

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