[clang] [AMDGPU][SPIRV] Correctly lower huge device function arguments (PR #176921)
Steffen Larsen via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 20 05:23:36 PST 2026
================
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -triple spirv64-amd-amdhsa -x hip -emit-llvm -fcuda-is-device -disable-llvm-verifier -o - %s | FileCheck %s --check-prefix=CHECK-AMDGCNSPIRV
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -x hip -emit-llvm -fcuda-is-device -o - %s | FileCheck %s --check-prefix=CHECK-AMDGCN
+
+// NOTE: The verifier is currently disabled for the spirv64 case as it complains
+// about the 'byref' arguments being too large. This is currently a
+// problem for all targets that lower large arguments to 'byref'
+// arguments.
----------------
steffenlarsen wrote:
It seems like the lowering to AMDGCN is represented by an `i16` which is in turn cast. This doesn't trigger the check in the verifier.
The fact that the verifier can be tripped by this seems to have been reported in https://github.com/llvm/llvm-project/issues/118207. Arguably, it would be good to have a diagnostic that catches this before the verifier.
https://github.com/llvm/llvm-project/pull/176921
More information about the cfe-commits
mailing list