Skip to content

Commit 80cb7e4

Browse files
committed
- Reorder isUse() escape for PHI nodes until confirmed register
1 parent c719909 commit 80cb7e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/AMDGPU/GCNRegPressure.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,10 +611,10 @@ bool GCNDownwardRPTracker::advanceBeforeNext(MachineInstr *MI,
611611
// Remove dead registers or mask bits.
612612
SmallSet<Register, 8> SeenRegs;
613613
for (auto &MO : CurrMI->operands()) {
614-
if (MO.isUse() && CurrMI->getOpcode() == AMDGPU::PHI)
615-
break;
616614
if (!MO.isReg() || !MO.getReg().isVirtual())
617615
continue;
616+
if (MO.isUse() && CurrMI->getOpcode() == AMDGPU::PHI)
617+
break;
618618
if (MO.isUse() && !MO.readsReg())
619619
continue;
620620
if (!UseInternalIterator && MO.isDef())

0 commit comments

Comments
 (0)