]> gcc.gnu.org Git - gcc.git/commit
aarch64: PR target/115457 Implement missing __ARM_FEATURE_BF16 macro
authorKyrylo Tkachov <ktkachov@nvidia.com>
Thu, 27 Jun 2024 10:40:41 +0000 (16:10 +0530)
committerKyrylo Tkachov <ktkachov@nvidia.com>
Wed, 3 Jul 2024 10:12:37 +0000 (12:12 +0200)
commitc10942134fa759843ac1ed1424b86fcb8e6368ba
tree9d938722d80225afaf202ef047ac911203769319
parent03a810da10d8dfb5aec9261372cad7bf090e6986
aarch64: PR target/115457 Implement missing __ARM_FEATURE_BF16 macro

The ACLE asks the user to test for __ARM_FEATURE_BF16 before using the
<arm_bf16.h> header but GCC doesn't set this up.
LLVM does, so this is an inconsistency between the compilers.

This patch enables that macro for TARGET_BF16_FP.
Bootstrapped and tested on aarch64-none-linux-gnu.

gcc/

PR target/115457
* config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins):
Define __ARM_FEATURE_BF16 for TARGET_BF16_FP.

gcc/testsuite/

PR target/115457
* gcc.target/aarch64/acle/bf16_feature.c: New test.

Signed-off-by: Kyrylo Tkachov <ktkachov@nvidia.com>
gcc/config/aarch64/aarch64-c.cc
gcc/testsuite/gcc.target/aarch64/acle/bf16_feature.c [new file with mode: 0644]
This page took 0.094664 seconds and 5 git commands to generate.