diff mbox series

testsuite: Skip some tests on arm when overriding -mcpu/-march

Message ID 1612967158-19252-1-git-send-email-christophe.lyon@linaro.org
State New
Headers show
Series testsuite: Skip some tests on arm when overriding -mcpu/-march | expand

Commit Message

Christophe Lyon Feb. 10, 2021, 2:25 p.m. UTC
When running the testsuite with -mcpu=XXX/-march=YYY, some tests fail
because they specify -mcpu or -march (or both), which can be
incompatible with values used to run the tests.  There is no easy way
to check such cases, so skip such tests.

Unfortunately this means the tests might be skipped in cases where
they would pass, but this avoids pointless errors in the testsuite.

Combinations where this patch made such failures disappear:

* arm-linux-gnueabi --with-cpu cortex-a9, testing with -march=armv5t (cortex-m55*, fma.c, pr97327.c)

* arm-linux-gnueabihf --with-cpu cortex-a9, testing with -mthumb/-march=armv8-a/-mfpu=crypto-neon-fp-armv8/-mfloat-abi=hard (cortex-m55*)

* arm-eabi, testing with -mcpu=cortex-a7/-mfloat-abi=hard/-march=armv7ve+simd (pr41574.c, pr59418.c, pr59575.c, pr60650-2.c, pr60657.c, pr60663.c, pr81863.c)

* arm-eabi, testing with -mthumb/-mcpu=cortex-m4/-mfloat-abi=hard/-march=armv7e-m+fp (same list)

2021-02-10  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/testsuite/
	* gcc.dg/pr41574.c: Add dg-skip-if clause.
	* gcc.dg/pr59418.c: Likewise.
	* gcc.target/arm/cortex-m55-nodsp-flag-hard.c: Likewise.
	* gcc.target/arm/cortex-m55-nodsp-flag-softfp.c: Likewise.
	* gcc.target/arm/cortex-m55-nodsp-nofp-flag-softfp.c: Likewise.
	* gcc.target/arm/cortex-m55-nofp-flag-hard.c: Likewise.
	* gcc.target/arm/cortex-m55-nofp-flag-softfp.c: Likewise.
	* gcc.target/arm/cortex-m55-nofp-nomve-flag-softfp.c: Likewise.
	* gcc.target/arm/cortex-m55-nomve-flag-hard.c: Likewise.
	* gcc.target/arm/cortex-m55-nomve-flag-softfp.c: Likewise.
	* gcc.target/arm/cortex-m55-nomve.fp-flag-hard.c: Likewise.
	* gcc.target/arm/cortex-m55-nomve.fp-flag-softfp.c: Likewise.
	* gcc.target/arm/fma.c: Likewise.
	* gcc.target/arm/mve/intrinsics/pr97327.c: Likewise.
	* gcc.target/arm/pr59575.c: Likewise.
	* gcc.target/arm/pr60650-2.c: Likewise.
	* gcc.target/arm/pr60657.c: Likewise.
	* gcc.target/arm/pr60663.c: Likewise.
	* gcc.target/arm/pr81863.c: Likewise.
---
 gcc/testsuite/gcc.dg/pr41574.c                                   | 2 ++
 gcc/testsuite/gcc.dg/pr59418.c                                   | 2 ++
 gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-flag-hard.c        | 2 ++
 gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-flag-softfp.c      | 2 ++
 gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-nofp-flag-softfp.c | 2 ++
 gcc/testsuite/gcc.target/arm/cortex-m55-nofp-flag-hard.c         | 2 ++
 gcc/testsuite/gcc.target/arm/cortex-m55-nofp-flag-softfp.c       | 2 ++
 gcc/testsuite/gcc.target/arm/cortex-m55-nofp-nomve-flag-softfp.c | 2 ++
 gcc/testsuite/gcc.target/arm/cortex-m55-nomve-flag-hard.c        | 2 ++
 gcc/testsuite/gcc.target/arm/cortex-m55-nomve-flag-softfp.c      | 2 ++
 gcc/testsuite/gcc.target/arm/cortex-m55-nomve.fp-flag-hard.c     | 2 ++
 gcc/testsuite/gcc.target/arm/cortex-m55-nomve.fp-flag-softfp.c   | 2 ++
 gcc/testsuite/gcc.target/arm/fma.c                               | 1 +
 gcc/testsuite/gcc.target/arm/mve/intrinsics/pr97327.c            | 1 +
 gcc/testsuite/gcc.target/arm/pr59575.c                           | 2 ++
 gcc/testsuite/gcc.target/arm/pr60650-2.c                         | 1 +
 gcc/testsuite/gcc.target/arm/pr60657.c                           | 1 +
 gcc/testsuite/gcc.target/arm/pr60663.c                           | 1 +
 gcc/testsuite/gcc.target/arm/pr81863.c                           | 1 +
 19 files changed, 32 insertions(+)
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.dg/pr41574.c b/gcc/testsuite/gcc.dg/pr41574.c
index 062c004..1273ed3 100644
--- a/gcc/testsuite/gcc.dg/pr41574.c
+++ b/gcc/testsuite/gcc.dg/pr41574.c
@@ -1,4 +1,6 @@ 
 /* { dg-do compile } */
+/* { dg-skip-if "do not override -mcpu" { arm*-*-* } { "-mcpu=*" } { "" } } */
+/* { dg-skip-if "do not override -mfloat-abi" { arm*-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */
 /* { dg-options "-O2 -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fno-unsafe-math-optimizations -fdump-rtl-combine" { target { arm*-*-* } } } */
 /* { dg-options "-O2 -fno-unsafe-math-optimizations -fdump-rtl-combine" { target { ! arm*-*-* } } } */
 
diff --git a/gcc/testsuite/gcc.dg/pr59418.c b/gcc/testsuite/gcc.dg/pr59418.c
index 4b54ef2..2dd3379 100644
--- a/gcc/testsuite/gcc.dg/pr59418.c
+++ b/gcc/testsuite/gcc.dg/pr59418.c
@@ -2,6 +2,8 @@ 
 /* Reported by Ryan Mansfield <rmansfield@qnx.com> */
 
 /* { dg-do compile } */
+/* { dg-skip-if "do not override -mcpu" { arm*-*-* } { "-mcpu=*" } { "" } } */
+/* { dg-skip-if "do not override -mfloat-abi" { arm*-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
 /* { dg-options "-Os -g" } */
 /* { dg-options "-march=armv7-a+fp -mfloat-abi=hard -Os -g" { target { arm*-*-* && { ! arm_thumb1 } } } } */
 
diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-flag-hard.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-flag-hard.c
index 92c1511..826bc41 100644
--- a/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-flag-hard.c
+++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-flag-hard.c
@@ -1,4 +1,6 @@ 
 /* { dg-do assemble } */
+/* { dg-skip-if "do not override -march" { arm*-*-* } { "-march=*" } { "" } } */
+/* { dg-skip-if "do not override -mfloat-abi" { arm*-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
 /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */
 /* { dg-additional-options "-mcpu=cortex-m55+nodsp -mthumb -mfloat-abi=hard -mfpu=auto --save-temps" } */
 /* { dg-final { scan-assembler "\.arch_extension fp" } } */
diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-flag-softfp.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-flag-softfp.c
index 89d778f..367a316 100644
--- a/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-flag-softfp.c
+++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-flag-softfp.c
@@ -1,4 +1,6 @@ 
 /* { dg-do assemble } */
+/* { dg-skip-if "do not override -march" { arm*-*-* } { "-march=*" } { "" } } */
+/* { dg-skip-if "do not override -mfloat-abi" { arm*-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */
 /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */
 /* { dg-additional-options "-mcpu=cortex-m55+nodsp -mthumb -mfloat-abi=softfp -mfpu=auto --save-temps" } */
 /* { dg-final { scan-assembler "\.arch_extension fp" } } */
diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-nofp-flag-softfp.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-nofp-flag-softfp.c
index 405090c..fac2e3f 100644
--- a/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-nofp-flag-softfp.c
+++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nodsp-nofp-flag-softfp.c
@@ -1,4 +1,6 @@ 
 /* { dg-do assemble } */
+/* { dg-skip-if "do not override -march" { arm*-*-* } { "-march=*" } { "" } } */
+/* { dg-skip-if "do not override -mfloat-abi" { arm*-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */
 /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */
 /* { dg-additional-options "-mcpu=cortex-m55+nodsp+nofp -mthumb -mfloat-abi=softfp -mfpu=auto --save-temps" } */
 /* { dg-final { scan-assembler-not "\.arch_extension fp" } } */
diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-flag-hard.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-flag-hard.c
index 6a92ded..32ed93b 100644
--- a/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-flag-hard.c
+++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-flag-hard.c
@@ -1,4 +1,6 @@ 
 /* { dg-do assemble } */
+/* { dg-skip-if "do not override -march" { arm*-*-* } { "-march=*" } { "" } } */
+/* { dg-skip-if "do not override -mfloat-abi" { arm*-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
 /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */
 /* { dg-additional-options "-mcpu=cortex-m55+nofp -mthumb -mfloat-abi=hard -mfpu=auto --save-temps" } */
 /* { dg-final { scan-assembler "\.arch_extension mve" } } */
diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-flag-softfp.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-flag-softfp.c
index 25e80e9..b24efbc 100644
--- a/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-flag-softfp.c
+++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-flag-softfp.c
@@ -1,4 +1,6 @@ 
 /* { dg-do assemble } */
+/* { dg-skip-if "do not override -march" { arm*-*-* } { "-march=*" } { "" } } */
+/* { dg-skip-if "do not override -mfloat-abi" { arm*-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */
 /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */
 /* { dg-additional-options "-mcpu=cortex-m55+nofp -mthumb -mfloat-abi=softfp -mfpu=auto --save-temps" } */
 /* { dg-final { scan-assembler "\.arch_extension mve" } } */
diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-nomve-flag-softfp.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-nomve-flag-softfp.c
index 38042cc..292ebe5 100644
--- a/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-nomve-flag-softfp.c
+++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nofp-nomve-flag-softfp.c
@@ -1,4 +1,6 @@ 
 /* { dg-do assemble } */
+/* { dg-skip-if "do not override -march" { arm*-*-* } { "-march=*" } { "" } } */
+/* { dg-skip-if "do not override -mfloat-abi" { arm*-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */
 /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */
 /* { dg-additional-options "-mcpu=cortex-m55+nomve+nofp -mthumb -mfloat-abi=softfp -mfpu=auto --save-temps" } */
 /* { dg-final { scan-assembler-not "\.arch_extension mve" } } */
diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nomve-flag-hard.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nomve-flag-hard.c
index 2366e99..ead9c4e 100644
--- a/gcc/testsuite/gcc.target/arm/cortex-m55-nomve-flag-hard.c
+++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nomve-flag-hard.c
@@ -1,4 +1,6 @@ 
 /* { dg-do assemble } */
+/* { dg-skip-if "do not override -march" { arm*-*-* } { "-march=*" } { "" } } */
+/* { dg-skip-if "do not override -mfloat-abi" { arm*-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
 /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */
 /* { dg-additional-options "-mcpu=cortex-m55+nomve -mthumb -mfloat-abi=hard -mfpu=auto --save-temps" } */
 /* { dg-final { scan-assembler-not "\.arch_extension mve" } } */
diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nomve-flag-softfp.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nomve-flag-softfp.c
index eb2d63d..09a9e71 100644
--- a/gcc/testsuite/gcc.target/arm/cortex-m55-nomve-flag-softfp.c
+++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nomve-flag-softfp.c
@@ -1,4 +1,6 @@ 
 /* { dg-do assemble } */
+/* { dg-skip-if "do not override -march" { arm*-*-* } { "-march=*" } { "" } } */
+/* { dg-skip-if "do not override -mfloat-abi" { arm*-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */
 /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */
 /* { dg-additional-options "-mcpu=cortex-m55+nomve -mthumb -mfloat-abi=softfp -mfpu=auto --save-temps" } */
 /* { dg-final { scan-assembler-not "\.arch_extension mve" } } */
diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nomve.fp-flag-hard.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nomve.fp-flag-hard.c
index e7e57d9..0ce4a33 100644
--- a/gcc/testsuite/gcc.target/arm/cortex-m55-nomve.fp-flag-hard.c
+++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nomve.fp-flag-hard.c
@@ -1,4 +1,6 @@ 
 /* { dg-do assemble } */
+/* { dg-skip-if "do not override -march" { arm*-*-* } { "-march=*" } { "" } } */
+/* { dg-skip-if "do not override -mfloat-abi" { arm*-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
 /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */
 /* { dg-additional-options "-mcpu=cortex-m55+nomve.fp -mthumb -mfloat-abi=hard -mfpu=auto --save-temps" } */
 /* { dg-final { scan-assembler-not "\.arch_extension mve.fp" } } */
diff --git a/gcc/testsuite/gcc.target/arm/cortex-m55-nomve.fp-flag-softfp.c b/gcc/testsuite/gcc.target/arm/cortex-m55-nomve.fp-flag-softfp.c
index 42889aa..832990c 100644
--- a/gcc/testsuite/gcc.target/arm/cortex-m55-nomve.fp-flag-softfp.c
+++ b/gcc/testsuite/gcc.target/arm/cortex-m55-nomve.fp-flag-softfp.c
@@ -1,4 +1,6 @@ 
 /* { dg-do assemble } */
+/* { dg-skip-if "do not override -march" { arm*-*-* } { "-march=*" } { "" } } */
+/* { dg-skip-if "do not override -mfloat-abi" { arm*-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=softfp" } } */
 /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */
 /* { dg-additional-options "-mcpu=cortex-m55+nomve.fp -mthumb -mfloat-abi=softfp -mfpu=auto --save-temps" } */
 /* { dg-final { scan-assembler-not "\.arch_extension mve.fp" } } */
diff --git a/gcc/testsuite/gcc.target/arm/fma.c b/gcc/testsuite/gcc.target/arm/fma.c
index 704559a..8f840de 100644
--- a/gcc/testsuite/gcc.target/arm/fma.c
+++ b/gcc/testsuite/gcc.target/arm/fma.c
@@ -3,6 +3,7 @@ 
 /* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mcpu=*" } { "-mcpu=cortex-a15" } } */
 /* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mfpu=*" } { "-mfpu=vfpv4" } } */
 /* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
+/* { dg-skip-if "do not override -march" { arm*-*-* } { "-march=*" } { "-march=armv7ve+simd" } } */
 /* { dg-options "-O2 -mcpu=cortex-a15 -mfpu=vfpv4 -mfloat-abi=hard" } */
 
 #include "fma.h"
diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr97327.c b/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr97327.c
index d19bde5..b44b5b9 100644
--- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr97327.c
+++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr97327.c
@@ -1,5 +1,6 @@ 
 /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */
 /* { dg-skip-if "Incompatible float ABI" { *-*-* } { "-mfloat-abi=hard" } { "" } } */
+/* { dg-skip-if "do not override -march" { arm*-*-* } { "-march=*" } { "-march=armv8.1-m.main+mve.fp+fp.dp" } } */
 /* { dg-additional-options "-mcpu=cortex-m55 -mthumb -mfloat-abi=soft -mfpu=auto -Werror" } */
 
 int main ()
diff --git a/gcc/testsuite/gcc.target/arm/pr59575.c b/gcc/testsuite/gcc.target/arm/pr59575.c
index cc49be3..e821cb3 100644
--- a/gcc/testsuite/gcc.target/arm/pr59575.c
+++ b/gcc/testsuite/gcc.target/arm/pr59575.c
@@ -1,6 +1,8 @@ 
 /* PR target/59575 */
 /* { dg-do compile } */
 /* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */
+/* { dg-skip-if "do not override -march" { arm*-*-* } { "-march=*" } { "-march=armv7-a" } } */
+/* { dg-skip-if "do not override -mcpu" { arm*-*-* } { "-mcpu=*" } { "" } } */
 /* { dg-options "-Os -g -march=armv7-a" } */
 
 void foo (int *);
diff --git a/gcc/testsuite/gcc.target/arm/pr60650-2.c b/gcc/testsuite/gcc.target/arm/pr60650-2.c
index c44d7b5..efe51ad 100644
--- a/gcc/testsuite/gcc.target/arm/pr60650-2.c
+++ b/gcc/testsuite/gcc.target/arm/pr60650-2.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */
+/* { dg-skip-if "do not override -march" { arm*-*-* } { "-march=*" } { "-march=armv7-a" } } */
 /* { dg-options "-O2 -fno-omit-frame-pointer -march=armv7-a" } */
 
 int a, h, j;
diff --git a/gcc/testsuite/gcc.target/arm/pr60657.c b/gcc/testsuite/gcc.target/arm/pr60657.c
index ca12152..58c2bb1 100644
--- a/gcc/testsuite/gcc.target/arm/pr60657.c
+++ b/gcc/testsuite/gcc.target/arm/pr60657.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */
+/* { dg-skip-if "do not override -march" { arm*-*-* } { "-march=*" } { "-march=armv7-a" } } */
 /* { dg-options "-O2 -march=armv7-a" } */
 
 
diff --git a/gcc/testsuite/gcc.target/arm/pr60663.c b/gcc/testsuite/gcc.target/arm/pr60663.c
index 8d76d79..56fe435 100644
--- a/gcc/testsuite/gcc.target/arm/pr60663.c
+++ b/gcc/testsuite/gcc.target/arm/pr60663.c
@@ -1,6 +1,7 @@ 
 /* PR rtl-optimization/60663 */
 /* { dg-do compile } */
 /* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */
+/* { dg-skip-if "do not override -march" { arm*-*-* } { "-march=*" } { "-march=armv7-a" } } */
 /* { dg-options "-O2 -march=armv7-a" } */
 
 int
diff --git a/gcc/testsuite/gcc.target/arm/pr81863.c b/gcc/testsuite/gcc.target/arm/pr81863.c
index 85bfab1..3dae6fc 100644
--- a/gcc/testsuite/gcc.target/arm/pr81863.c
+++ b/gcc/testsuite/gcc.target/arm/pr81863.c
@@ -2,6 +2,7 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "-mslow-flash-data and -mword-relocations incompatible" { *-*-* } { "-mslow-flash-data" } } */
 /* { dg-skip-if "-mpure-code and -mword-relocations incompatible" { *-*-* } { "-mpure-code" } } */
+/* { dg-skip-if "do not override -mfloat-abi" { arm*-*-* } { "-mfloat-abi=*" } { "" } } */
 /* { dg-options "-O2 -mword-relocations -march=armv7-a -marm" } */
 /* { dg-final { scan-assembler-not "\[\\t \]+movw" } } */