OSDN Git Service

When updating live range endpoints, make sure to preserve the early clobber bit.
authorLang Hames <lhames@gmail.com>
Mon, 3 Sep 2012 06:31:45 +0000 (06:31 +0000)
committerLang Hames <lhames@gmail.com>
Mon, 3 Sep 2012 06:31:45 +0000 (06:31 +0000)
Fixs PR13719.

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

lib/CodeGen/LiveIntervalAnalysis.cpp

index 87538c4..bdf4f2d 100644 (file)
@@ -1173,7 +1173,7 @@ private:
     SlotIndex LastUse = findLastUseBefore(LI->reg, OldIdx);
     if (LastUse != NewIdx)
       moveKillFlags(LI->reg, NewIdx, LastUse);
-    LR->end = LastUse.getRegSlot();
+    LR->end = LastUse.getRegSlot(LR->end.isEarlyClobber());
   }
 
   void moveEnteringDownFrom(SlotIndex OldIdx, IntRangePair& P) {
@@ -1187,7 +1187,7 @@ private:
         assert(LR->end > OldIdx && "LiveRange does not cover original slot");
         moveKillFlags(LI->reg, LR->end, NewIdx);
       }
-      LR->end = NewIdx.getRegSlot();
+      LR->end = NewIdx.getRegSlot(LR->end.isEarlyClobber());
     }
   }