Skip to content

llvm.minnum should be lowered to fminimum_numf instead of fminf  #93033

@wzssyqa

Description

@wzssyqa

In https://llvm.org/docs/LangRef.html#llvm-minnum-intrinsic

Unlike the IEEE-754 2008 behavior, this does not distinguish between signaling and quiet NaN inputs. If a target’s implementation follows the standard and returns a quiet NaN if either input is a signaling NaN, the intrinsic lowering is responsible for quieting the inputs to correctly return the non-NaN input (e.g. by using the equivalent of llvm.canonicalize).

While in https://www.gnu.org/software/libc/manual/html_node/Misc-FP-Arithmetic.html

If an argument is a quiet NaN, the other argument is returned. If both arguments are NaN, or either is a signaling NaN, NaN is returned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions