[llvm] [SPIR-V] Add -spirv-nonsemantic-debug-info-version to select the NSDI set (PR #223428)
Dmitry Sidorov via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 15 05:05:56 PDT 2026
================
@@ -0,0 +1,47 @@
+; RUN: llc --verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown --spirv-ext=+SPV_KHR_non_semantic_info %s -o - | FileCheck %s --check-prefix=CHECK-100
+; RUN: llc --verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown --spirv-ext=+SPV_KHR_non_semantic_info -spirv-nonsemantic-debug-info-version=200 %s -o - | FileCheck %s --check-prefix=CHECK-200
+; 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 %}
+; RUN: %if spirv-tools %{ llc --verify-machineinstrs --spirv-ext=+SPV_KHR_non_semantic_info -spirv-nonsemantic-debug-info-version=200 -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
+
+; Exercise -spirv-nonsemantic-debug-info-version: it selects which
+; NonSemantic.Shader.DebugInfo ext-inst-set name is imported (.100 by
+; default, .200 when requested).
+
+; Check that mnemonic are properly printed and UNKNOWN_EXT_INST
+; is not emitted.
+
+; CHECK-100: OpExtInstImport "NonSemantic.Shader.DebugInfo.100"
+; CHECK-100-DAG: [[I32T100:%[0-9]+]] = OpTypeInt 32 0
----------------
MrSidims wrote:
nit: lets use `[[#VarName:]]` spelling for number-like regex var definitions.
https://github.com/llvm/llvm-project/pull/223428
More information about the llvm-commits
mailing list