[PATCH v2 2/2] aarch64: Add SIMD attributes to math functions with vector versions

Wilco Dijkstra Wilco.Dijkstra@arm.com
Thu Feb 13 15:42:44 GMT 2025


Hi Florian,

> +!GCC$ builtin (acos) attributes simd (notinbranch)
> +!GCC$ builtin (acosf) attributes simd (notinbranch)
[…]

> But this is not conditional on -Ofast/-ffast-math, as far as I can see.
> Is it correct to use the libmvec routines in the default mode?

Good find, Fortran will currently vectorize these even with -O2, which seems way
too aggressive. The vector math functions were designed to work for fast-math
since they don't handle exceptions, sign of zero, infinities/NaNs besides the obvious
change in ULP.

There is no preprocessor in Fortran, however we could extend the syntax or only
support these definitions if fast-math is enabled.

Cheers,
Wilco


More information about the Libc-alpha mailing list