[llvm] [SPIRV] Emit NonSemantic DebugTypedef (PR #211883)
Manuel Carrasco via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 28 03:50:43 PDT 2026
================
@@ -0,0 +1,34 @@
+; RUN: llc --verify-machineinstrs --spirv-ext=+SPV_KHR_non_semantic_info -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV --implicit-check-not=DebugTypedef
+; RUN: %if spirv-tools %{ llc --verify-machineinstrs --spirv-ext=+SPV_KHR_non_semantic_info -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
+
+; Typedefs are emitted in a single DebugInfoFinder pass. Bar is discovered
+; before Foo, so when Bar is emitted its Foo base has no id yet and Bar is
+; dropped. Foo is emitted next and survives. Only one DebugTypedef is emitted
+; here, for Foo. Emitting typedefs in dependency order, would add a second
+; DebugTypedef for Bar (see https://github.com/llvm/llvm-project/issues/211850).
+
+; CHECK-SPIRV: OpExtInstImport "NonSemantic.Shader.DebugInfo.100"
+; CHECK-SPIRV: DebugTypedef
----------------
mgcarrasco wrote:
Could we check for the parameters and count the number of opcodes?
https://github.com/llvm/llvm-project/pull/211883
More information about the llvm-commits
mailing list