[CodeGen] Specified minnum/maxnum signed zero semantics not respected
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
LangRef specifies that minnum/maxnum have ordered signed zero unless nsz is specified. However, the backend does not fully respect these semantics right now. Known issues are:
* The X86 expansion does not respect signed zero ordering.
* Libcall legalization does not respect signed zero ordering, as the fmin/fmax libcalls are not guaranteed to have it (and indeed do not have it on many important targets like x86_64-gnu).
Contributor guide
Research direction
Start by reading the LangRef semantics for minnum/maxnum and then inspect the X86 expansion and libcall legalization paths mentioned in the issue. Verify how signed zero is handled when nsz is absent, including on x86_64-gnu, and add regression coverage showing that the specified ordering is preserved.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100