From a5a0c7c909d9376eb2568132ac361c107a746a15 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 18 Apr 2007 00:36:11 +0000 Subject: [PATCH] Increment use count of new virtuals created during PHI elimination. llvm-svn: 36233 --- llvm/lib/CodeGen/PHIElimination.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/lib/CodeGen/PHIElimination.cpp b/llvm/lib/CodeGen/PHIElimination.cpp index 734a06fa9d21..513bfdeb256b 100644 --- a/llvm/lib/CodeGen/PHIElimination.cpp +++ b/llvm/lib/CodeGen/PHIElimination.cpp @@ -138,6 +138,9 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB, if (LV) { MachineInstr *PHICopy = prior(AfterPHIsIt); + // Increment use count of the newly created virtual register. + LV->getVarInfo(IncomingReg).NumUses++; + // Add information to LiveVariables to know that the incoming value is // killed. Note that because the value is defined in several places (once // each for each incoming block), the "def" block and instruction fields -- GitLab