KhronosGroup / KhronosGroup/SPIRV-Tools
Loop peeling creates OpPhi on pointer.
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 709
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 28
Description
[1018.zip](https://github.com/KhronosGroup/SPIRV-Tools/files/2689794/1018.zip)
Running ./command in the attachment should reproduce the problem.
Brief summary: running spirv-opt (debug build) with arguments:
--redundancy-elimination --loop-peeling --eliminate-common-uniform
leads to the following error (numbers have been replaced with _ to avoid duplicates):
spirv-opt: source/opt/common_uniform_elim_pass.cpp:_: spvtools::opt::Instruction* spvtools::opt::CommonUniformElimPass::GetPtr(spvtools::opt::Instruction*, uint__t*): Assertion `objInst->opcode() == SpvOpCopyObject' failed.
SPIRV-Tools v2018.7-dev v2018.6-94-geaa351a5
Found using [GraphicsFuzz](https://github.com/google/graphicsfuzz).
[1018.zip](https://github.com/KhronosGroup/SPIRV-Tools/files/2689798/1018.zip)
[0484](https://github.com/KhronosGroup/SPIRV-Tools/files/2689788/0484.zip)
Contributor guide
Research direction
Start by running the ./command from the attached 1018.zip reproducer with spirv-opt using --redundancy-elimination, --loop-peeling, and --eliminate-common-uniform. Read source/opt/common_uniform_elim_pass.cpp around CommonUniformElimPass::GetPtr and investigate the assertion that the object instruction must be OpCopyObject. Done means the 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
- 28/100