[KnownFPClass] `fpext` does not properly handle `DAZ` or `DAPZ` input denormal modes.
Nobody has claimed this yet.
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Discovered by https://github.com/llvm/llvm-project/pull/219091
Currently, fpext incorrectly rules out positive/negative zero when the input is subnormal that gets flushed to zero:
- Under
DAPZ, a negative subnormal input could become positive zero. - Under
DAZ, a negative subnormal input could become negative zero. - Under
Dynamic, a negative subnormal input could become either positive or negative zero.
The output denormal mode would matter for cases such as f128 = fpext(f80) where the exponent range is the same. But I will create another issue for that once I confirm it.
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
Start by tracing the KnownFPClass handling for fpext and reviewing the behavior described for DAZ, DAPZ, and Dynamic input denormal modes. Verify the sign possibilities for flushed subnormal inputs, including the f128 = fpext(f80) case noted as a separate concern. Done means fpext no longer rules out valid zero signs under the stated input modes.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100