[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:16 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:

This is actually a bug fix to better match the DAG behavior 

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


More information about the llvm-commits mailing list