[PATCH] arm: Add ARM VFPv4 VFMA instruction support in fma/fmaf (BZ 15503)
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Fri Oct 3 15:04:08 GMT 2025
On 03/10/25 11:57, Wilco Dijkstra wrote:
> Hi Adhemerval,
>
> (retry, hopefully it doesn't get messed up again...)
>
>> It is enabled through math-use-builtins-fma.h if glibc is built
>> for VPFv4 (__ARM_FEATURE_FMA predefined by GCC), or through IFUNC
>> (testing HWCAP_ARM_VFPv4) otherwise.
>
> A decade late(!), but it looks good to me. I presume using ifunc to native fma still
> has a 2x penalty vs inlining fma like your x86 results show?
Yeah, this one seemed a easy one from the math bugzilla backlog we have.
>
> What is the penalty if you don't have fma? It seems like the new Coremath functions
> will cause significant regressions on older targets that we need to discuss in more...
It depends of the symbol, but COREMATH does assumes some facilities to be as
fast as usual FP operations (sqrt, fma, rounding). On the profile I did on armv7
with fma build, the main issues for CORE-MATH is the lacking of some rounding
functions (round/roundeven) and FP to integer.
I think there is still room for improvements on some generic implemetations
(like fma); but for other cases I think we will need to come up with different
algorithm strategies.
More information about the Libc-alpha
mailing list