killing instruction is tracked. This causes the LiveIntervals to
create bogus intervals. The workaound is to add a range to the
interval from the redefinition to the end of the basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10510
91177308-0d34-0410-b5e6-
96231b3b80d8
for (int i = 0, e = vi.Kills.size(); i != e; ++i) {
MachineBasicBlock* killerBlock = vi.Kills[i].first;
MachineInstr* killerInstr = vi.Kills[i].second;
- killedInDefiningBasicBlock |= mbb == killerBlock;
unsigned start = (mbb == killerBlock ?
instrIndex :
getInstructionIndex(killerBlock->front()));
unsigned end = getInstructionIndex(killerInstr) + 1;
+ if (start < end) {
+ killedInDefiningBasicBlock |= mbb == killerBlock;
+ interval->addRange(start, end);
+ }
}
if (!killedInDefiningBasicBlock) {