KhronosGroup / KhronosGroup/SPIRV-Tools
spirv-opt --eliminate-dead-branches generates code that spirv-val rejects
Open
component:validation
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 709
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 28
Description
[This archive contains files necessary to reproduce the problem](https://github.com/KhronosGroup/SPIRV-Tools/files/2964204/files_to_reproduce.zip)
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 23 branches to the selection construct, but not to the selection header 8
%23 = OpLabel
```
Issue found using [GraphicsFuzz](https://github.com/google/graphicsfuzz).
Contributor guide
Assessment
This issue has not been assessed yet.