]> git.ipfire.org Git - thirdparty/gcc.git/commit
Aarch64: Add FMA and FMAF intrinsic and corresponding tests
authorAyan Shafqat <ayan.x.shafqat@gmail.com>
Mon, 17 Mar 2025 08:28:27 +0000 (09:28 +0100)
committerKyrylo Tkachov <ktkachov@nvidia.com>
Mon, 17 Mar 2025 08:29:56 +0000 (09:29 +0100)
commitf4f7216c56fe2f67c72db5b7c4afa220725f3ed1
treec0d3850128c232ce2f3a0b69cb23285f85db9eb8
parent8912313df87679e202f2897ec25c924a67ee8117
Aarch64: Add FMA and FMAF intrinsic and corresponding tests

This patch introduces inline definitions for the __fma and __fmaf
functions in arm_acle.h for Aarch64 targets. These definitions rely on
__builtin_fma and __builtin_fmaf to ensure proper inlining and to meet
the ACLE requirements [1].

The patch has been tested locally using a crosstool-NG sysroot for
Aarch64, confirming that the generated code uses the expected fused
multiply-accumulate instructions (fmadd).

[1] https://arm-software.github.io/acle/main/acle.html#fused-multiply-accumulate-fma

gcc/ChangeLog:

* config/aarch64/arm_acle.h (__fma, __fmaf): New functions.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/acle/acle_fma.c: New test.
gcc/config/aarch64/arm_acle.h
gcc/testsuite/gcc.target/aarch64/acle/acle_fma.c [new file with mode: 0644]