Skip to content

Commit 14e4fe2

Browse files
committed
[AMDGPU] When allocating VGPRs, VGPR spills are not part of the prologue
Cherry-pick llvm#109439 Change-Id: I555ef6c0a2ffe806aa40c0e0c639fdb12c45c27c
1 parent 42cfb9f commit 14e4fe2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

llvm/lib/Target/AMDGPU/SIInstrInfo.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8936,12 +8936,11 @@ bool SIInstrInfo::isBasicBlockPrologue(const MachineInstr &MI,
89368936
IsNullOrVectorRegister = !RI.isSGPRClass(RI.getRegClassForReg(MRI, Reg));
89378937
}
89388938

8939-
uint16_t Opc = MI.getOpcode();
8940-
// FIXME: Copies inserted in the block prolog for live-range split should also
8941-
// be included.
8939+
uint16_t Opcode = MI.getOpcode();
89428940
return IsNullOrVectorRegister &&
8943-
(isSpillOpcode(Opc) || (!MI.isTerminator() && Opc != AMDGPU::COPY &&
8944-
MI.modifiesRegister(AMDGPU::EXEC, &RI)));
8941+
(isSGPRSpill(Opcode) ||
8942+
(!MI.isTerminator() && Opcode != AMDGPU::COPY &&
8943+
MI.modifiesRegister(AMDGPU::EXEC, &RI)));
89458944
}
89468945

89478946
MachineInstrBuilder

0 commit comments

Comments
 (0)