KhronosGroup / SPIRV-Tools

Apache License 2.0
1.07k stars 551 forks source link

spirv-opt does not terminate with --eliminate-dead-branches #2004

Closed afd closed 5 years ago

afd commented 5 years ago

This archive contains the files necessary to reproduce the issue.

shader.spv was generated from shader.frag using glslangValidator.

Running:

spirv-opt --eliminate-dead-branches --merge-return --inline-entry-points-exhaustive --eliminate-local-multi-store --ccp --eliminate-dead-branches shader.spv -o temp.spv

sends spirv-opt into a seemingly infinite loop.

spirv-opt --version SPIRV-Tools v2018.6-dev v2018.5-81-g07d0f9df

Found using GraphicsFuzz.

s-perron commented 5 years ago

We do not handle branches to the continue target of the containing loop in FindFirstExitFromSelectionMerge.