forked from OSchip/llvm-project
Don't consider definitions by other PHIs live-in when trimming a PHI source's
live range after inserting a copy at the end of a block. llvm-svn: 174945
This commit is contained in:
parent
4ee9aef208
commit
7c85c9433c
|
@ -467,7 +467,11 @@ void PHIElimination::LowerPHINode(MachineBasicBlock &MBB,
|
|||
bool isLiveOut = false;
|
||||
for (MachineBasicBlock::succ_iterator SI = opBlock.succ_begin(),
|
||||
SE = opBlock.succ_end(); SI != SE; ++SI) {
|
||||
if (SrcLI.liveAt(LIS->getMBBStartIdx(*SI))) {
|
||||
SlotIndex startIdx = LIS->getMBBStartIdx(*SI);
|
||||
VNInfo *VNI = SrcLI.getVNInfoAt(startIdx);
|
||||
|
||||
// Definitions by other PHIs are not truly live-in for our purposes.
|
||||
if (VNI && VNI->def != startIdx) {
|
||||
isLiveOut = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue