[PATCH 08/12] math: Optimize f{max, min}imum{f, l, f128} order sign comparison
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Thu Jan 22 18:11:12 GMT 2026
On 21/01/26 10:13, Wilco Dijkstra wrote:
> Hi Adhemerval,
>
> I would expect these to use the builtin like this (and use similar code as the
> magnitude variants otherwise):
>
> FLOAT
> M_DECL_FUNC (__fmaximum) (FLOAT x, FLOAT y)
> {
> if (__glibc_likely (!isunordered (x, y)))
> {
> #if M_USE_BUILTIN (FMAX)
> return M_SUF (__builtin_fmax) (x, y);
> #else
> if (__glibc_unlikely (x == y))
> return signbit (x) ? x : y;
> return isgreater (x, y) ? x : y;
> #endif
> }
>
> Same for the other non-magnitude cases.
Indeed this is a good suggestion, I will add them.
More information about the Libc-alpha
mailing list