[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:42 PST 2026
================
@@ -17619,12 +17525,16 @@ 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.
+If the ``nsz`` flag is specified, ``llvm.minimumnum`` with one +0.0 and one
+-0.0 operand may non-deterministically return either operand. Contrary to normal
+``nsz`` semantics, if both operands have the same sign, the result must also
+have the same sign.
+
Note that these are the semantics of minimumNumber specified in
IEEE-754-2019 with the usual :ref:`signaling NaN <floatnan>` exception.
----------------
jcranmer-intel wrote:
I see at present 3 uses of IEEE754, 6 of IEEE 754, 32 of IEEE-754, 0 of any flavor of ISO/IEC 60559.
(Of the three forms, while IEEE-754 is the dominant form right now, IEEE 754-<year> appears to be the most correct form.)
https://github.com/llvm/llvm-project/pull/172012
More information about the llvm-commits
mailing list