[llvm] [SPIR-V] Emit DebugTypePointer from NonSemantic DI (PR #109287)

Vyacheslav Levytskyy via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 02:35:00 PDT 2024


================
@@ -0,0 +1,280 @@
+; RUN: llc --verify-machineinstrs --spv-emit-nonsemantic-debug-info --spirv-ext=+SPV_KHR_non_semantic_info --print-after=spirv-nonsemantic-debug-info -O0 -mtriple=spirv64-unknown-unknown %s -o - 2>&1 | FileCheck %s --check-prefix=CHECK-MIR
+; RUN: llc --verify-machineinstrs --spv-emit-nonsemantic-debug-info --spirv-ext=+SPV_KHR_non_semantic_info -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
+; RUN: llc --verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown --spirv-ext=+SPV_KHR_non_semantic_info %s -o - | FileCheck %s --check-prefix=CHECK-OPTION
+; When type is void * the spirv-val incorrectly raises an error when DebugInfoNone is set as <id> Base Type argument of DebugTypePointer.   
----------------
VyacheslavLevytskyy wrote:

I don't see a way to use `DebugInfoNone` as `<id> Base Type` argument of `DebugTypePointer`. In the specification we read `Base Type is <id> of debugging instruction which represents the pointee type.`. There is no explicit statement in the description of the Instruction that Id may be substituted by DebugInfoNone.

Please see https://github.com/KhronosGroup/SPIRV-Registry/issues/280#issuecomment-2346219612 for detailed comments from the author of the specification and https://github.com/llvm/llvm-project/pull/106980#discussion_r1756908439 for a similar discussion in one of previous PR's.

I don't object against proceeding with this PR as is, given that this issue will be addressed in the next PR. Please change the description of the issue above from "... spirv-val incorrectly raises an error ..." to a brief TODO statement, so that the test case holds that it's a TODO.

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


More information about the llvm-commits mailing list