[llvm] [SPIRV] Error in backend for vararg functions (PR #169111)
Juan Manuel Martinez CaamaƱo via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 24 00:54:01 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
----------------
jmmartinez wrote:
Can you simplify the test a bit more ? Assigning a value to `@glob` doesn't look essential for the test to work to me (maybe I'm wrong).
If there are 2 different scenarios you want to depict (e.g. vararg in a call vs vararg in a assignment), I'd create 2 separate tests.
https://github.com/llvm/llvm-project/pull/169111
More information about the llvm-commits
mailing list