diff options
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/PHIElimination.cpp | 3 | ||||
-rw-r--r-- | lib/CodeGen/TwoAddressInstructionPass.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/PHIElimination.cpp b/lib/CodeGen/PHIElimination.cpp index 6a9f428208..734a06fa9d 100644 --- a/lib/CodeGen/PHIElimination.cpp +++ b/lib/CodeGen/PHIElimination.cpp @@ -160,6 +160,8 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB, // Realize that the destination register is defined by the PHI copy now, not // the PHI itself. LV->getVarInfo(DestReg).DefInst = PHICopy; + + LV->getVarInfo(IncomingReg).UsedBlocks[MBB.getNumber()] = true; } // Adjust the VRegPHIUseCount map to account for the removal of this PHI @@ -210,6 +212,7 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB, // instruction kills the incoming value. // LiveVariables::VarInfo &InRegVI = LV->getVarInfo(SrcReg); + InRegVI.UsedBlocks[opBlock.getNumber()] = true; // Loop over all of the successors of the basic block, checking to see // if the value is either live in the block, or if it is killed in the diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp index ba768ba19f..9209420e3e 100644 --- a/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -198,6 +198,9 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) { varInfo.DefInst = prevMi; // update live variables for regB + LiveVariables::VarInfo& varInfoB = LV.getVarInfo(regB); + // regB is used in this BB. + varInfoB.UsedBlocks[mbbi->getNumber()] = true; if (LV.removeVirtualRegisterKilled(regB, mbbi, mi)) LV.addVirtualRegisterKilled(regB, prevMi); |