> Currently the auto-vectorization of C fmin()/fmax() uses
> infinity/-infinity as the initial value for reduction, which introduces
> bogus infinity values when iterating over an array with only NaNs.
>
> As all C fmin()/fmax(), RV F/D fmin/fmax, RVV vfmin/vfmax and RVV
> vfredmin/vfredmax are implementing the IEEE754 minimumNumber or
> maximumNumber behavior, an initial value of NaN is more suitable than
> infinity when reducing the vector (if the input vector is all NaN, the
> result will still be NaN and if the input vector contains non-NaN
> elements they will cover the initial NaN).
>
> Change the initial value during reduction from corresponding inf to a
> quiet NaN.

LGTM.  Thanks for this patch.  I'll push it to the trunk later today.

-- 
Regards
 Robin

Reply via email to