[llvm] CodeGen: Strengthen definition of F{MIN|MAX}NUM_IEEE nodes (PR #85195)

Joshua Cranmer via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 12:32:00 PDT 2024


================
@@ -795,10 +795,16 @@ def G_FMAXNUM : GenericInstruction {
   let isCommutable = true;
 }
 
-// FMINNUM_IEEE/FMAXNUM_IEEE - Perform floating-point minimum or maximum on
-// two values, following the IEEE-754 2008 definition. This differs from
-// FMINNUM/FMAXNUM in the handling of signaling NaNs. If one input is a
-// signaling NaN, returns a quiet NaN.
+// FMINNUM_IEEE/FMAXNUM_IEEE - Perform floating-point minimumNumber or
+/// maximumNumber on two values, following IEEE-754 definitions. This differs
+/// from FMINNUM/FMAXNUM in the handling of signaling NaNs, and signed zero.
+///
+/// If one input is a signaling NaN, returns a quiet NaN. This matches
+/// IEEE-754 2008's minnum/maxnum behavior for signaling NaNs (which differs
+/// from 2019).
+///
+/// These treat -0 as ordered less than +0, matching the behavior of IEEE-754
+/// 2019's minimumNumber/maximumNumber.
----------------
jcranmer-intel wrote:

Nit: the comment style here is weird, with the first line having two slashes and the subsequent lines having three slashes.

https://github.com/llvm/llvm-project/pull/85195


More information about the llvm-commits mailing list