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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 3 13:56:04 PST 2024


================
@@ -520,6 +520,17 @@ bool AMDGPUCallLowering::lowerFormalArgumentsKernel(
 
   // TODO: Align down to dword alignment and extract bits for extending loads.
   for (auto &Arg : F.args()) {
+    // Hidden arguments that are in the kernel signature must be preloded to
+    // user SGPRs, or loaded via the implicit_arg ptr. Print a diagnostic
+    // error if a hidden argument is in the argument list and is not
+    // preloaded.
+    if (Arg.hasAttribute("amdgpu-hidden-argument")) {
+      DiagnosticInfoUnsupported NonPreloadHiddenArg(
+          *Arg.getParent(),
+          "Hidden argument in kernel signature was not preloaded");
----------------
arsenm wrote:

Start error messages with lowercase 

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


More information about the llvm-commits mailing list