testsuite/arm: Fix -mfloat-abi order in arm_v8_2a_bf16_neon_ok_nocache and arm_v8_2a_i8mm_ok_nocache

Make the order in which we try -mfloat-abi options consistent with the
other similar effective targets: try softfp first, then hard.

This shows that a few tests implicitly rely on -mfloat-abi=hard, so we
now check arm_hard_ok where needed.

This makes these tests unsupported rather than fail on
arm-linux-gnueabi.

2021-03-19  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/testsuite/
	* lib/target-supports.exp
	(check_effective_target_arm_v8_2a_i8mm_ok_nocache): Fix
	-mfloat-abi= options order.
	(check_effective_target_arm_v8_2a_bf16_neon_ok_nocache): Likewise.
	* gcc.target/arm/bfloat16_scalar_1_1.c: Add arm_hard_ok effective
	target and -mfloat-abi=hard additional option.
	* gcc.target/arm/bfloat16_simd_1_1.c: Likewise.
	* gcc.target/arm/simd/bf16_ma_1.c: Likewise.
	* gcc.target/arm/simd/bf16_mmla_1.c: Likewise.
	* gcc.target/arm/simd/vdot-2-1.c: Likewise.
	* gcc.target/arm/simd/vdot-2-2.c: Likewise.
This commit is contained in:
Christophe Lyon 2020-04-20 15:40:54 +00:00
parent 1843341b12
commit bed1736f3a
7 changed files with 14 additions and 8 deletions

View file

@ -1,7 +1,8 @@
/* { dg-do assemble { target { arm*-*-* } } } */
/* { dg-require-effective-target arm_hard_ok } */
/* { dg-require-effective-target arm_v8_2a_bf16_neon_ok } */
/* { dg-add-options arm_v8_2a_bf16_neon } */
/* { dg-additional-options "-O3 --save-temps -std=gnu90" } */
/* { dg-additional-options "-O3 --save-temps -std=gnu90 -mfloat-abi=hard" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include <arm_bf16.h>

View file

@ -1,7 +1,8 @@
/* { dg-do assemble { target { arm*-*-* } } } */
/* { dg-require-effective-target arm_hard_ok } */
/* { dg-require-effective-target arm_v8_2a_bf16_neon_ok } */
/* { dg-add-options arm_v8_2a_bf16_neon } */
/* { dg-additional-options "-O3 --save-temps -std=gnu90" } */
/* { dg-additional-options "-O3 --save-temps -std=gnu90 -mfloat-abi=hard" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include <arm_neon.h>

View file

@ -1,7 +1,8 @@
/* { dg-do assemble } */
/* { dg-require-effective-target arm_hard_ok } */
/* { dg-require-effective-target arm_v8_2a_bf16_neon_ok } */
/* { dg-add-options arm_v8_2a_bf16_neon } */
/* { dg-additional-options "-save-temps -O2" } */
/* { dg-additional-options "-save-temps -O2 -mfloat-abi=hard" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "arm_neon.h"

View file

@ -1,7 +1,8 @@
/* { dg-do assemble } */
/* { dg-require-effective-target arm_hard_ok } */
/* { dg-require-effective-target arm_v8_2a_bf16_neon_ok } */
/* { dg-add-options arm_v8_2a_bf16_neon } */
/* { dg-additional-options "-save-temps -O2" } */
/* { dg-additional-options "-save-temps -O2 -mfloat-abi=hard" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include <arm_neon.h>

View file

@ -1,7 +1,8 @@
/* { dg-do assemble { target { arm*-*-* } } } */
/* { dg-require-effective-target arm_hard_ok } */
/* { dg-require-effective-target arm_v8_2a_i8mm_ok } */
/* { dg-add-options arm_v8_2a_i8mm } */
/* { dg-additional-options "-O -save-temps" } */
/* { dg-additional-options "-O -save-temps -mfloat-abi=hard" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include <arm_neon.h>

View file

@ -1,7 +1,8 @@
/* { dg-do assemble { target { arm*-*-* } } } */
/* { dg-require-effective-target arm_hard_ok } */
/* { dg-require-effective-target arm_v8_2a_i8mm_ok } */
/* { dg-add-options arm_v8_2a_i8mm } */
/* { dg-additional-options "-O -save-temps -mbig-endian" } */
/* { dg-additional-options "-O -save-temps -mbig-endian -mfloat-abi=hard" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include <arm_neon.h>

View file

@ -5267,7 +5267,7 @@ proc check_effective_target_arm_v8_2a_i8mm_ok_nocache { } {
# Iterate through sets of options to find the compiler flags that
# need to be added to the -march option.
foreach flags {"" "-mfloat-abi=hard -mfpu=neon-fp-armv8" "-mfloat-abi=softfp -mfpu=neon-fp-armv8" } {
foreach flags {"" "-mfloat-abi=softfp -mfpu=neon-fp-armv8" "-mfloat-abi=hard -mfpu=neon-fp-armv8" } {
if { [check_no_compiler_messages_nocache \
arm_v8_2a_i8mm_ok object {
#include <arm_neon.h>
@ -5352,7 +5352,7 @@ proc check_effective_target_arm_v8_2a_bf16_neon_ok_nocache { } {
return 0;
}
foreach flags {"" "-mfloat-abi=hard -mfpu=neon-fp-armv8" "-mfloat-abi=softfp -mfpu=neon-fp-armv8" } {
foreach flags {"" "-mfloat-abi=softfp -mfpu=neon-fp-armv8" "-mfloat-abi=hard -mfpu=neon-fp-armv8" } {
if { [check_no_compiler_messages_nocache arm_v8_2a_bf16_neon_ok object {
#include <arm_neon.h>
#if !defined (__ARM_FEATURE_BF16_VECTOR_ARITHMETIC)