Fix global live range splitting regmask accuracy.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 14 Feb 2012 23:53:23 +0000 (23:53 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 14 Feb 2012 23:53:23 +0000 (23:53 +0000)
Pretend that regmask interference ends at the 'dead' slot, even when
there is other interference ending at the 'reg' slot of the same
instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150531 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/InterferenceCache.cpp

index a8a32f3f1a7ce12c9d790098790b6c918a61f645..9eb8a7584368f8e3ec639b10afdb1ce6111971b3 100644 (file)
@@ -185,7 +185,8 @@ void InterferenceCache::Entry::update(unsigned MBBNum) {
 
   // Also check for register mask interference.
   SlotIndex Limit = BI->Last.isValid() ? BI->Last : Start;
-  for (unsigned i = RegMaskSlots.size(); i && RegMaskSlots[i-1] > Limit; --i)
+  for (unsigned i = RegMaskSlots.size();
+       i && RegMaskSlots[i-1].getDeadSlot() > Limit; --i)
     if (MachineOperand::clobbersPhysReg(RegMaskBits[i-1], PhysReg)) {
       // Register mask i-1 clobbers PhysReg after the LIU interference.
       // Model the regmask clobber as a dead def.