[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
Wed Jul 13 09:10:37 PDT 2022
dstuttard updated this revision to Diff 444301.
dstuttard added a comment.
Updated with review suggestions
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129566/new/
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() && !IsShader) {
+ // Note: user SGPRs are handled by the front-end for graphics 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() || IsShader ||
+ Info.getNumPreloadedSGPRs() >= 16);
}
static void reservePrivateMemoryRegs(const TargetMachine &TM,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129566.444301.patch
Type: text/x-patch
Size: 1074 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220713/4e61c681/attachment-0001.bin>
More information about the llvm-commits
mailing list