[llvm] [SPIRV] Error in backend for vararg functions (PR #169111)

Nick Sarnie via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 24 07:45:50 PST 2025


================
@@ -0,0 +1,17 @@
+; RUN: not llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown --spirv-ext=+SPV_INTEL_function_pointers %s -o - 2>&1 | FileCheck %s
+
+ at glob = addrspace(1) global ptr null, align 8
+
+; Function Attrs: mustprogress noinline norecurse optnone
+define noundef i32 @main() {
+entry:
+  %retval = alloca i32, align 4
+  %retval.ascast = addrspacecast ptr %retval to ptr addrspace(4)
+  store i32 0, ptr addrspace(4) %retval.ascast, align 4
+  store ptr @_Z3fooiz, ptr addrspace(4) addrspacecast (ptr addrspace(1) @glob to ptr addrspace(4)), align 8
----------------
sarnex wrote:

Thanks for the review! I greatly simplified the test in my latest commit, I thought you could only hit the error with a use of the type as a function pointer but it seems that's not required, thanks!

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


More information about the llvm-commits mailing list