[llvm] [LangRef] Clarify specification for float min/max operations (PR #172012)
Joshua Cranmer via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 6 13:44:41 PST 2026
================
@@ -17550,10 +17509,15 @@ type.
Semantics:
""""""""""
-If either operand is a NaN, returns NaN. 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 specified in the draft of
-IEEE 754-2019.
+If either operand is a NaN, returns a :ref:`NaN <floatnan>`. 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 minimum specified in
+IEEE 754-2019, with the usual :ref:`signaling NaN <floatnan>` exception.
----------------
jcranmer-intel wrote:
In terms of keeping parallel style, this should follow the style that we do for minnum. In other words, something like this for the final sentence:
> This intrinsic follows the semantics of ``fminimum`` in C23 and ``minimum`` in IEEE 754-2019, except for signaling NaN inputs, which follows :ref:`LLVM's usual signaling NaN behavior <floatnan>` instead.
(in particular, it is helpful to mention the C23 name of the function, since the C standard is easily available for free publicly, whereas IEEE 754 is not).
https://github.com/llvm/llvm-project/pull/172012
More information about the llvm-commits
mailing list