]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite/arm: Fix -mfloat-abi order in arm_v8_2a_bf16_neon_ok_nocache and arm_v8_2a_...
authorChristophe Lyon <christophe.lyon@linaro.org>
Mon, 20 Apr 2020 15:40:54 +0000 (15:40 +0000)
committerChristophe Lyon <christophe.lyon@linaro.org>
Tue, 23 Mar 2021 15:11:50 +0000 (15:11 +0000)
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.

gcc/testsuite/gcc.target/arm/bfloat16_scalar_1_1.c
gcc/testsuite/gcc.target/arm/bfloat16_simd_1_1.c
gcc/testsuite/gcc.target/arm/simd/bf16_ma_1.c
gcc/testsuite/gcc.target/arm/simd/bf16_mmla_1.c
gcc/testsuite/gcc.target/arm/simd/vdot-2-1.c
gcc/testsuite/gcc.target/arm/simd/vdot-2-2.c
gcc/testsuite/lib/target-supports.exp

index efcc56105dc4532a1b2d3eaa4ee3b264b928a06c..7a6c177267643b6e63ce7cd2a65e946009cb83b2 100644 (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>
index cad7d54d8e3dab2a12e099ef34d1948f37c416f4..72b4a1b86cb5b329404d69950eee74b2e1aa02af 100644 (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>
index 6729af76fbe72f28afd89ee4b4a9b5a732d7b28c..c043049ff340d2567a14a84fe54ead5c5300ac6f 100644 (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"
index 5f9c85b41a396be64872a36a00b664df834534c1..cc64e232ab0b41c0c9a5f80838065f316fa18ccc 100644 (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>
index 4d5f07b771bbb3ef44edeb60881964ed7592356d..88b80cff2329d9c502f40a31bbef70d26251c909 100644 (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>
index b7b76e27486b1dab6b496989fe556f228d130fc3..1c74718ca5644be05b4d4839c3a7ea40bff11e40 100644 (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>
index a90c375b8fe28c3493276be6c108790c2cc97cf7..e42d711fe65acccf27de1529fd42a0f727def72a 100644 (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)