IEEE754-2019's maximumnumf and minimumnumf have NaN as their identity element. The folder was copied from the regular maximumf and minimumf and considers that infinities are the identities.
For instance
%1 = arith.maxnumf %nan, %something : f32
should fold to %something but
%1 = arith.maxnumf %-inf, %something : f32
should not be folded, as if %something is NaN, then %-inf should be returned.