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

Diana Picus via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 01:40:18 PDT 2024


================
@@ -521,16 +521,18 @@ The return value of (FMAXNUM 0.0, -0.0) could be either 0.0 or -0.0.
 G_FMINNUM_IEEE
 ^^^^^^^^^^^^^^
 
-Perform floating-point minimum on two values, following the IEEE-754 2008
-definition. This differs from FMINNUM in the handling of signaling NaNs. If one
-input is a signaling NaN, returns a quiet NaN.
+Perform floating-point minimum on two values, following the IEEE-754
+2019 definition. This differs from FMINNUM in the handling of
+signaling NaNs. If one input is a signaling NaN, returns a quiet
+NaN. This treats -0 as ordered less than +0.
----------------
rovka wrote:

Isn't this what G_FMINNUM is supposed to do? The comment for that says that G_FMINNUM has 2019 behaviour, and G_FMINNUM_IEEE has 2008 behaviour. Are you sure we want both to do the same thing? Could we just have G_FMINNUM_IEEE2008 and G_FMINNUM_IEEE2019 instead, so it's less confusing?

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


More information about the llvm-commits mailing list