microsoft / microsoft/DirectXShaderCompiler
Unspecified behavior from new-to-DXIL sdiv instruction
Open
Nobody has claimed this yet.
docs
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
DXBC had a udiv instruction, with clearly-spec'd behavior for corner cases like divide by 0 (should produce maximum uint).
DXIL introduces an sdiv instruction, but doesn't specify what should happen with:
- Positive value / 0
- Negative value / 0
- INT_MIN / -1, which would evaluate to INT_MAX+1, but that can't be represented
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation file or test is named. Start by reviewing the DXIL specification and the issue discussion around signed division; done means the behavior is explicitly defined for positive and negative values divided by zero, and for INT_MIN divided by -1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100