[PATCH] D129566: AMDGPU: Turn off force init 16 input SGPRS for pal
David Stuttard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 12 08:16:41 PDT 2022
dstuttard created this revision.
Herald added subscribers: kosarev, jsilvanus, foad, kerbowa, hiraditya, t-tye, tpr, yaxunl, nhaehnle, jvesely, kzhuravl, arsenm.
Herald added a project: All.
dstuttard requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
Pal uses a different mechanism for user sgprs.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D129566
Files:
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
Index: llvm/lib/Target/AMDGPU/SIISelLowering.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -2112,7 +2112,8 @@
SIMachineFunctionInfo &Info,
CallingConv::ID CallConv,
bool IsShader) const {
- if (Subtarget->hasUserSGPRInit16Bug()) {
+ if (Subtarget->hasUserSGPRInit16Bug() && !Subtarget->isAmdPalOS()) {
+ // Note: user SGPRs are handled by the front-end for pal based shaders
// Pad up the used user SGPRs with dead inputs.
unsigned CurrentUserSGPRs = Info.getNumUserSGPRs();
@@ -2175,7 +2176,8 @@
CCInfo.AllocateReg(PrivateSegmentWaveByteOffsetReg);
}
- assert(!Subtarget->hasUserSGPRInit16Bug() || Info.getNumPreloadedSGPRs() >= 16);
+ assert(!Subtarget->hasUserSGPRInit16Bug() || Subtarget->isAmdPalOS() ||
+ Info.getNumPreloadedSGPRs() >= 16);
}
static void reservePrivateMemoryRegs(const TargetMachine &TM,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129566.443952.patch
Type: text/x-patch
Size: 1105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220712/41ff8153/attachment.bin>
More information about the llvm-commits
mailing list