Skip to content

[SPIR-V] Some local variables are missing information with -fspv-debug=vulkan-with-source #7874

@sajjadmirzanv

Description

@sajjadmirzanv

Description
In the linked Compiler Explorer example, there are 7 DebugLocalVariable instructions in 1.8.2505, but only 2 in trunk. "skyDot" (%23) for example has been deleted.

Ideally, even when variables are optimized away, DXC would keep the DebugLocalVariable instruction itself alive to represent that the variable did exist in the original program.

Steps to Reproduce
https://godbolt.org/z/cezPMaEEG

Actual Behavior
5 DebugLocalVariable instructions are missing.

Environment

  • DXC version dxcompiler.dll: 1.9 - 1.8.2505.32 (b106a96); dxil.dll: 1.9(1.8.2505.32)
  • Host Operating System Windows 10

Metadata

Metadata

Assignees

Labels

bugBug, regression, crashspirvWork related to SPIR-V

Type

No type

Projects

Status

New

Status

Triaged

Relationships

None yet

Development

No branches or pull requests

Issue actions