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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 01:44:37 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:

amdgpu_gfx isn't going to have any of the HSA inputs which are passed here. It should only maybe have the workgroup / workitem IDs, but they seem to not

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


More information about the llvm-commits mailing list