Add an assertion, update DefInst even though no one uses it (dangling pointers
don't help anyone)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25081 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/PHIElimination.cpp b/lib/CodeGen/PHIElimination.cpp
index 91805a9..8441e49 100644
--- a/lib/CodeGen/PHIElimination.cpp
+++ b/lib/CodeGen/PHIElimination.cpp
@@ -145,6 +145,10 @@
       LV->addVirtualRegisterDead(DestReg, PHICopy);
       LV->removeVirtualRegistersDead(MPhi);
     }
+    
+    // Realize that the destination register is defined by the PHI copy now, not
+    // the PHI itself.
+    LV->getVarInfo(DestReg).DefInst = PHICopy;
   }
 
   // Adjust the VRegPHIUseCount map to account for the removal of this PHI