llvm / llvm/llvm-project

[KnownFPClass] Incorrect subnormal handling for `maximum(num)`/`minimum(num)`, and `maxnum`/`minnum`

Open
#219,295 0 comments 0 reactions 0 assignees View on GitHub
floating-point llvm:support
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

Under FTPZ/DAPZ, a negative subnormal value could become positive zero.

Currently, the MinMax family of functions will incorrectly rule out positive zero even if negative subnormal outputs/inputs can flush to positive zero.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the related change in llvm/llvm-project pull request 219091 and trace the KnownFPClass handling for the MinMax family. Reproduce or inspect behavior under FTPZ/DAPZ for negative subnormal inputs and outputs, then verify that maximum(num), minimum(num), maxnum, and minnum handle values that flush to positive zero correctly.

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
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.