Andrea Corallo via Gcc-patches <gcc-patches@gcc.gnu.org> writes: > diff --git > a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vcopy_lane_bf16_indices_1.c > > b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vcopy_lane_bf16_indices_1.c > new file mode 100644 > index 00000000000..9cbb5ea8110 > --- /dev/null > +++ > b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vcopy_lane_bf16_indices_1.c > @@ -0,0 +1,18 @@ > +#include <arm_neon.h> > + > +/* { dg-do compile { target { aarch64*-*-* } } } */ > +/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } } */ > +/* { dg-require-effective-target arm_v8_2a_bf16_neon_ok { target { arm*-*-* > } } } */ > +/* { dg-add-options arm_v8_2a_bf16_neon } */
Realise this probably comes from elsewhere, but why is the dg-require-effective-target dependent on arm*-*-*? It and the dg-add-options should usually be used as a pair, with the same target guards. In particular: proc add_options_for_arm_v8_2a_bf16_neon { flags } { if { ! [check_effective_target_arm_v8_2a_bf16_neon_ok] } { return "$flags" } global et_arm_v8_2a_bf16_neon_flags return "$flags $et_arm_v8_2a_bf16_neon_flags" } will do nothing when arm_v8_2a_bf16_neon_ok is false, and so in that case I'd expect the testcase to be compiled without +bf16. We'd then get an error about using a bf16 function without the required target feature. Given that that hasn't been causing people problems in practice, I assume most people testing on AArch64 use RUNTESTFLAGS that support arm_v8_2a_bf16_neon_ok (as hoped). But in principle it could be false for AArch64 too. So I think we should just remove the “{ target arm*-*-* } ”. Same for the other tests. OK with that change if it works (for trunk and for whichever branches need it). Thanks, Richard