Skip to content

[SPIR-V] Broken test llvm/test/CodeGen/SPIRV/debug-info/debug-type-basic.ll #118011

@Keenuts

Description

@Keenuts

Since a recent SPIRV-Tools commit (f3c4a5053f1bd34056282e56659659873f9d47ad), this particular test is broken.

error: line 86: NonSemantic.Shader.DebugInfo.100 DebugTypeBasic: expected operand Flags must be a result id of 32-bit unsigned OpConstant
  %52 = OpExtInst %void %49 DebugTypeBasic %51 %uint_8 %uint_2 %20

The reason is the emitted SPIR-V does this:

%20 = OpConstantNull %9
%-- = OpExtInst %-- %-- DebugTypeBasic %-- %-- %-- %20

The last operand if the Flags operand, which form the spec:

Flags is the <id> of a 32-bit integer OpConstant formed by the bitwise-OR of values from the Debug Info Flags table.

Since the flag value is 0, we emit an OpConstantNull, but this is not accepted by the validator.
I'm not sure if that's a validation issue (shall OpConstantNull %uint be the same as OpConstant %uint 0 ?) or not.
Opening an issue in SPIRV-Tools

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions