[llvm] [SPIRV] Emit NonSemantic DebugGlobalVariable (PR #207230)
Manuel Carrasco via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 13 04:38:38 PDT 2026
================
@@ -0,0 +1,47 @@
+; RUN: llc --verify-machineinstrs --spirv-ext=+SPV_KHR_non_semantic_info -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
+
+; This is an edge case: IR that is valid but cannot be correctly encoded in SPIRV.
+
+; A DIGlobalVariable declaration with a null type (isDefinition: false, which the
+; IR verifier permits) and no backing llvm::GlobalVariable. The Type operand
+; falls back to DebugInfoNone, and the Variable operand also falls back to
+; DebugInfoNone because no @g carries this DIGlobalVariable and its
+; DIGlobalVariableExpression has an empty DIExpression.
+;
+; No spirv-val run: DebugInfoNone is not accepted as the Type operand of
----------------
mgcarrasco wrote:
> Also, I'd rather have the spirv-val line as xRUN or commented out, but present.
Done (currently checking on the CI failure).
https://github.com/llvm/llvm-project/pull/207230
More information about the llvm-commits
mailing list