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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 01:44:00 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.
----------------
arsenm wrote:

No, because they differ in the behavior for signaling nans. The minnum/maxnum intrinsics were misnamed. They should have been named fmin/fmax, as they follow the libm behavior which ignores signaling nans. The IEEE signaling nan behavior makes no sense, and returns a quiet nan.

Nothing about the nan handling is changing. This PR only adds the stronger signed 0 behavior 

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


More information about the llvm-commits mailing list