Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Keenuts opened this issue Nov 28, 2024 · 2 comments · Fixed by #118333
Closed

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

Keenuts opened this issue Nov 28, 2024 · 2 comments · Fixed by #118333

Comments

@Keenuts
Copy link
Contributor

Keenuts commented Nov 28, 2024

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

@Keenuts
Copy link
Contributor Author

Keenuts commented Nov 28, 2024

FYI @VyacheslavLevytskyy

@VyacheslavLevytskyy
Copy link
Contributor

Thank you @Keenuts !

VyacheslavLevytskyy added a commit that referenced this issue Dec 3, 2024
The test case llvm/test/CodeGen/SPIRV/debug-info/debug-type-basic.ll
fails due to #118011
VyacheslavLevytskyy added a commit that referenced this issue Dec 3, 2024
…emantic.Shader.DebugInfo.100 DebugTypeBasic's flags definition (#118333)

This PR is to fix #118011 by
emitting OpConstant instead of OpConstantNull to conform to
NonSemantic.Shader.DebugInfo.100 DebugTypeBasic's flags definition.
@EugeneZelenko EugeneZelenko removed the SPIR-V SPIR-V language support label Dec 3, 2024
TIFitis pushed a commit to TIFitis/llvm-project that referenced this issue Dec 18, 2024
The test case llvm/test/CodeGen/SPIRV/debug-info/debug-type-basic.ll
fails due to llvm#118011
TIFitis pushed a commit to TIFitis/llvm-project that referenced this issue Dec 18, 2024
…emantic.Shader.DebugInfo.100 DebugTypeBasic's flags definition (llvm#118333)

This PR is to fix llvm#118011 by
emitting OpConstant instead of OpConstantNull to conform to
NonSemantic.Shader.DebugInfo.100 DebugTypeBasic's flags definition.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants