[llvm] [AMDGPU] Fix hidden kernarg preload count inconsistency (PR #116759)

Austin Kerbow via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 6 08:15:59 PST 2024


================
@@ -748,6 +748,10 @@ GCNUserSGPRUsageInfo::GCNUserSGPRUsageInfo(const Function &F,
     FlatScratchInit = true;
   }
 
+  if (!AMDGPU::isGraphics(CC) && !IsKernel &&
+      !F.hasFnAttribute("amdgpu-no-lds-kernel-id"))
+    LDSKernelId = true;
+
----------------
kerbowa wrote:

I've just removed the refactoring for LDSKernelID since it's not relevant for kernels, but FYI this just copied the existing logic from `SIMachineFunction.cpp`, so if it's incorrect we should update it there.

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


More information about the llvm-commits mailing list