[llvm] AMDGPU: Allocate special SGPRs before user SGPR arguments (PR #78234)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 16 02:14:03 PST 2024


================
@@ -2990,13 +2994,8 @@ SDValue SITargetLowering::LowerFormalArguments(
   }
 
   // Start adding system SGPRs.
-  if (IsEntryFunc) {
+  if (IsEntryFunc)
     allocateSystemSGPRs(CCInfo, MF, *Info, CallConv, IsGraphics);
-  } else {
-    CCInfo.AllocateReg(Info->getScratchRSrcReg());
-    if (!IsGraphics)
----------------
arsenm wrote:

No, amdgpu_gfx isn't supposed to get the same inputs. I'm not sure how the workgroup IDs are supposed to be treated for amdgpu_gfx 

https://github.com/llvm/llvm-project/pull/78234


More information about the llvm-commits mailing list