Make sure all eliminated kills are removed from VNInfo lists.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 24 Jun 2010 23:57:35 +0000 (23:57 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 24 Jun 2010 23:57:35 +0000 (23:57 +0000)
This fixes PR7479 and PR7485. The test cases from those PRs are big, so not
included. However, PR7485 comes from self hosting on FreeBSD, so we will surely
hear about any regression.

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

lib/CodeGen/LiveInterval.cpp

index 7eb430db4803547f977046814e9e240e050f53e1..bf0bdd183c8fd0705e918ec22d66a94394981709 100644 (file)
@@ -484,6 +484,8 @@ void LiveInterval::join(LiveInterval &Other,
     I->valno = NewVNInfo[OtherAssignments[RangeNo]];
     assert(I->valno && "Adding a dead range?");
     InsertPos = addRangeFrom(*I, InsertPos);
+    InsertPos->valno->removeKills(InsertPos->start,
+                                  InsertPos->end.getPrevSlot());
   }
 
   ComputeJoinedWeight(Other);