Skip to content

spirv-opt --eliminate-dead-branches generates code that spirv-val rejects #2450

@afd

Description

@afd

This archive contains files necessary to reproduce the problem

Generating SPIR-V from variant_136_reduced_final.frag using glslangValidator, and then optimizing it with the --eliminate-dead-branches option leads to SPIR-V that the validator rejects with:

error: line 34: block <ID> 23 branches to the selection construct, but not to the selection header <ID> 8
  %23 = OpLabel

Issue found using GraphicsFuzz.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions