> On 3 Jul 2024, at 11:59, Kyrylo Tkachov <ktkac...@nvidia.com> wrote: > > Hi all, > > 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. > Pushing to trunk. > I think it makes sense to back port this to branches that support the > arm_bf16.h header. > I’ll prepare patches for those separately. >
The patches apply cleanly and pass bootstrap and testing on the 12, 13, 14 branches so I’ll back port them there. They should also go to GCC 11 as that branch supports the intrinsics but the patches need a bit of adjusting for the patch context. I’ll prepare those separately. Thanks, Kyrill > Thanks, > Kyrill > > gcc/ > > PR target/115457 > * config/aarch64/aarch64-c.c (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 <ktkac...@nvidia.com> > <0001-aarch64-PR-target-115457-Implement-missing-__ARM_FEA.patch>