[llvm-branch-commits] [llvm] [SPIR-V] Emit extra DebugExpression ops under NonSemantic.Shader.DebugInfo.200 (PR #223461)

Dmitry Sidorov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Sep 15 05:14:02 PDT 2026


================
@@ -0,0 +1,44 @@
+; RUN: llc --verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown --spirv-ext=+SPV_KHR_non_semantic_info %s -o - | FileCheck %s --check-prefix=CHECK-100 --implicit-check-not=DebugDeclare --implicit-check-not=DebugExpression --implicit-check-not=DebugOperation
+; 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 -O0 -mtriple=spirv64-unknown-unknown -spirv-nonsemantic-debug-info-version=200 %s -o - -filetype=obj | spirv-val %}
+
+; DW_OP_LLVM_convert has no .100 encoding, so the expression (and declare) are
+; dropped. The same IR is emitted under .200 as DebugOperation opcode 10.
+
+; CHECK-100: OpExtInstImport "NonSemantic.Shader.DebugInfo.100"
+; CHECK-100: OpExtInst {{.*}} DebugLocalVariable
+
+; CHECK-200-DAG: [[EXT:%[0-9]+]] = OpExtInstImport "NonSemantic.Shader.DebugInfo.200"
----------------
MrSidims wrote:

nit: lets use `[[#VarName:]]` spelling

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


More information about the llvm-branch-commits mailing list