Skip to content

LangRef: Fix minimumnum/maximumnum nan handling phrasing #139228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions llvm/docs/LangRef.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17183,12 +17183,14 @@ type.

Semantics:
""""""""""
If both operands are NaNs (including sNaN), returns qNaN. If one operand
is NaN (including sNaN) and another operand is a number, return the number.
Otherwise returns the lesser of the two arguments. -0.0 is considered to
be less than +0.0 for this intrinsic.

Note that these are the semantics of minimumNumber specified in IEEE 754-2019.
If both operands are NaNs (including sNaN), returns a :ref:`NaN <floatnan>`. If
one operand is NaN (including sNaN) and another operand is a number,
return the number. Otherwise returns the lesser of the two
arguments. -0.0 is considered to be less than +0.0 for this intrinsic.

Note that these are the semantics of minimumNumber specified in
IEEE-754-2019 with the usual :ref:`signaling NaN <floatnan>` exception.

It has some differences with '``llvm.minnum.*``':
1)'``llvm.minnum.*``' will return qNaN if either operand is sNaN.
Expand Down Expand Up @@ -17229,12 +17231,15 @@ type.

Semantics:
""""""""""
If both operands are NaNs (including sNaN), returns qNaN. If one operand
is NaN (including sNaN) and another operand is a number, return the number.
Otherwise returns the greater of the two arguments. -0.0 is considered to
be less than +0.0 for this intrinsic.

Note that these are the semantics of maximumNumber specified in IEEE 754-2019.
If both operands are NaNs (including sNaN), returns a
:ref:`NaN <floatnan>`. If one operand is NaN (including sNaN) and
another operand is a number, return the number. Otherwise returns the
greater of the two arguments. -0.0 is considered to be less than +0.0
for this intrinsic.

Note that these are the semantics of maximumNumber specified in
IEEE-754-2019 with the usual :ref:`signaling NaN <floatnan>` exception.

It has some differences with '``llvm.maxnum.*``':
1)'``llvm.maxnum.*``' will return qNaN if either operand is sNaN.
Expand Down
Loading