[llvm] [SPIR-V] Fix truncated LinkageAttributes OpDecorate for numeric-named functions (PR #207332)
Juan Manuel Martinez CaamaƱo via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 6 05:24:07 PDT 2026
================
@@ -0,0 +1,28 @@
+; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
+
+; CHECK: OpDecorate %[[#FN:]] LinkageAttributes "" Export
----------------
jmmartinez wrote:
What would happen if we had to regular unnamed functions (no kernels)?
I think the root cause is that we have multiple "visible" functions/kernels with conflicting names.
Maybe we should error on those. Or force a name on them. Maybe we shouldn't create the linkage decorate if we cannot reference a function by name.
I think this issue may need a wider discussion.
https://github.com/llvm/llvm-project/pull/207332
More information about the llvm-commits
mailing list