[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 21 04:46:28 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:

Yes. The point of these intermediate nodes is to match hardware behavior for legalization, in which case (for AMDGPU at least) they have the 2008 signaling nan behavior with the stronger 2019 signed zero behavior. 

But for the unconstrained versions, the langref hand waves away signaling nan handling saying they may be treated as quiet nans 

Maybe these nodes need another rename.




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


More information about the llvm-commits mailing list