KhronosGroup / KhronosGroup/SPIRV-Tools
assertion failure: spirv-opt: "The header node is the entry block ?".
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 709
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 28
Description
Running ./command in the attachment should reproduce the problem.
Brief summary: running spirv-opt (debug build) with arguments:
--eliminate-dead-branches --eliminate-dead-variables --redundancy-elimination --compact-ids --loop-unswitch
leads to the following error (numbers have been replaced with _ to avoid duplicates):
spirv-opt: source/opt/loop_descriptor.cpp:_: spvtools::opt::BasicBlock* spvtools::opt::Loop::FindLoopPreheader(spvtools::opt::DominatorAnalysis*): Assertion `loop_pred && "The header node is the entry block ?"' failed.
SPIRV-Tools v2018.7-dev v2018.6-94-geaa351a5
Found using [GraphicsFuzz](https://github.com/google/graphicsfuzz).
[1770.zip](https://github.com/KhronosGroup/SPIRV-Tools/files/2689812/1770.zip)
Contributor guide
Research direction
Start by running ./command from 1770.zip with the listed spirv-opt passes to reproduce the assertion. Then inspect source/opt/loop_descriptor.cpp, especially Loop::FindLoopPreheader and the failing header-node assumption. Done means the supplied reproducer no longer triggers the assertion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100