[llvm] [LangRef] Clarify specification for float min/max operations (PR #172012)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 12 07:36:02 PST 2025
================
@@ -20379,9 +20301,17 @@ The '``llvm.vector.reduce.fmax.*``' intrinsics do a floating-point
``MAX`` reduction of a vector, returning the result as a scalar. The return type
matches the element-type of the vector input.
-This instruction has the same comparison semantics as the '``llvm.maxnum.*``'
-intrinsic. If the intrinsic call has the ``nnan`` fast-math flag, then the
-operation can assume that NaNs are not present in the input vector.
+This instruction has the same comparison and ``nsz`` semantics as the
+'``llvm.maxnum.*``' intrinsic.
+
+If any of the vector elements is a signaling NaN, the intrinsic will
+non-deterministically either:
+
+ * Return a :ref:`NaN <floatnan>`.
+ * Treat the signaling NaN as a quiet NaN.
+
+If the intrinsic call has the ``nnan`` fast-math flag, then the operation can
+assume that NaNs are not present in the input vector.
----------------
nikic wrote:
This is a pre-existing sentence, just moved slightly. I went ahead and just deleted them entirely, because this is just standard nnan semantics and does not require explicit mention.
https://github.com/llvm/llvm-project/pull/172012
More information about the llvm-commits
mailing list