Message ID | 20200410135553.3848-2-christophe.lyon@linaro.org |
---|---|
State | New |
Headers | show |
Series | [1/5] testsuite: [arm] Add arm_softfp_ok and arm_hard_ok effective targets. | expand |
On 10/04/2020 14:55, Christophe Lyon via Gcc-patches wrote: > Some MVE tests explicitly test a -mfloat-abi=hard option, but we need > to check that the toolchain actually supports it (which may not be the > case for arm-linux-gnueabi* targets). > > We also make use of dg-add-options arm_v8_1m_mve_fp and arm_v8_1m_mve > instead of duplicating the corresponding options in > dg-additional-options where we keep only -mfloat-abi to override the > option selected by arm_v8_1m_mve_fp. Hi Christophe, This sounds good!! Thank you for doing this. > diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu1.c b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu1.c > index 1462dd4..0fa3afd 100644 > --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu1.c > +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu1.c > @@ -1,6 +1,8 @@ > /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ > +/* { dg-require-effective-target arm_hard_ok } */ > +/* { dg-add-options arm_v8_1m_mve_fp } */ > /* { dg-skip-if "Incompatible float ABI" { *-*-* } { "-mfloat-abi=soft" } {""} } */ I was wondering, do we still need the skip-if with the arm_hard_ok? > -/* { dg-additional-options "-march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mthumb -mfpu=auto --save-temps" } */ > +/* { dg-additional-options "-mfloat-abi=hard" } */ > > #include "arm_mve.h" > > diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu2.c b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu2.c > index d528133..1fca110 100644 > --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu2.c > +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu2.c > @@ -1,5 +1,7 @@ > /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ > -/* { dg-additional-options "-march=armv8.1-m.main+mve.fp -mfloat-abi=softfp -mthumb -mfpu=auto --save-temps" } */ > +/* { dg-require-effective-target arm_softfp_ok } */ > +/* { dg-add-options arm_v8_1m_mve_fp } */ > +/* { dg-additional-options "-mfloat-abi=softfp" } */ > > #include "arm_mve.h" > > diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu1.c b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu1.c > index 59ca724..726f9ec 100644 > --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu1.c > +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu1.c > @@ -1,6 +1,8 @@ > /* { dg-require-effective-target arm_v8_1m_mve_ok } */ > +/* { dg-require-effective-target arm_hard_ok } */ > +/* { dg-add-options arm_v8_1m_mve } */ > /* { dg-skip-if "Incompatible float ABI" { *-*-* } { "-mfloat-abi=soft" } {""} } */ Same here. > -/* { dg-additional-options "-march=armv8.1-m.main+mve -mfloat-abi=hard -mthumb -mfpu=auto --save-temps" } */ > +/* { dg-additional-options "-mfloat-abi=hard" } */ > > #include "arm_mve.h" > > diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu2.c b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu2.c > index ce297ea..7f39905 100644 > --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu2.c > +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu2.c > @@ -1,6 +1,8 @@ > /* { dg-require-effective-target arm_v8_1m_mve_ok } */ > +/* { dg-require-effective-target arm_softfp_ok } */ > +/* { dg-add-options arm_v8_1m_mve } */ > /* { dg-skip-if "Incompatible float ABI" { *-*-* } { "-mfloat-abi=soft" } {""} } */ And here. > -/* { dg-additional-options "-march=armv8.1-m.main+mve -mfloat-abi=softfp -mthumb -mfpu=auto --save-temps" } */ > +/* { dg-additional-options "-mfloat-abi=softfp" } */ > > #include "arm_mve.h" > LGTM.
On Tue, 14 Apr 2020 at 10:21, Andre Vieira (lists) < andre.simoesdiasvieira@arm.com> wrote: > On 10/04/2020 14:55, Christophe Lyon via Gcc-patches wrote: > > Some MVE tests explicitly test a -mfloat-abi=hard option, but we need > > to check that the toolchain actually supports it (which may not be the > > case for arm-linux-gnueabi* targets). > > > > We also make use of dg-add-options arm_v8_1m_mve_fp and arm_v8_1m_mve > > instead of duplicating the corresponding options in > > dg-additional-options where we keep only -mfloat-abi to override the > > option selected by arm_v8_1m_mve_fp. > Hi Christophe, > > This sounds good!! Thank you for doing this. > > diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu1.c > b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu1.c > > index 1462dd4..0fa3afd 100644 > > --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu1.c > > +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu1.c > > @@ -1,6 +1,8 @@ > > /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ > > +/* { dg-require-effective-target arm_hard_ok } */ > > +/* { dg-add-options arm_v8_1m_mve_fp } */ > > /* { dg-skip-if "Incompatible float ABI" { *-*-* } { > "-mfloat-abi=soft" } {""} } */ > I was wondering, do we still need the skip-if with the arm_hard_ok? > Indeed, I just checked that it's useless by running with --target-board=-mfloat-abi=soft. > -/* { dg-additional-options "-march=armv8.1-m.main+mve.fp > -mfloat-abi=hard -mthumb -mfpu=auto --save-temps" } */ > > +/* { dg-additional-options "-mfloat-abi=hard" } */ > > > > #include "arm_mve.h" > > > > diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu2.c > b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu2.c > > index d528133..1fca110 100644 > > --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu2.c > > +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu2.c > > @@ -1,5 +1,7 @@ > > /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ > > -/* { dg-additional-options "-march=armv8.1-m.main+mve.fp > -mfloat-abi=softfp -mthumb -mfpu=auto --save-temps" } */ > > +/* { dg-require-effective-target arm_softfp_ok } */ > > +/* { dg-add-options arm_v8_1m_mve_fp } */ > > +/* { dg-additional-options "-mfloat-abi=softfp" } */ > > > > #include "arm_mve.h" > > > > diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu1.c > b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu1.c > > index 59ca724..726f9ec 100644 > > --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu1.c > > +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu1.c > > @@ -1,6 +1,8 @@ > > /* { dg-require-effective-target arm_v8_1m_mve_ok } */ > > +/* { dg-require-effective-target arm_hard_ok } */ > > +/* { dg-add-options arm_v8_1m_mve } */ > > /* { dg-skip-if "Incompatible float ABI" { *-*-* } { > "-mfloat-abi=soft" } {""} } */ > Same here. > Same > > -/* { dg-additional-options "-march=armv8.1-m.main+mve -mfloat-abi=hard > -mthumb -mfpu=auto --save-temps" } */ > > +/* { dg-additional-options "-mfloat-abi=hard" } */ > > > > #include "arm_mve.h" > > > > diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu2.c > b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu2.c > > index ce297ea..7f39905 100644 > > --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu2.c > > +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu2.c > > @@ -1,6 +1,8 @@ > > /* { dg-require-effective-target arm_v8_1m_mve_ok } */ > > +/* { dg-require-effective-target arm_softfp_ok } */ > > +/* { dg-add-options arm_v8_1m_mve } */ > > /* { dg-skip-if "Incompatible float ABI" { *-*-* } { > "-mfloat-abi=soft" } {""} } */ > And here. > Without dg-skip-if, the test passes since soft and softfp are compatible. > > -/* { dg-additional-options "-march=armv8.1-m.main+mve > -mfloat-abi=softfp -mthumb -mfpu=auto --save-temps" } */ > > +/* { dg-additional-options "-mfloat-abi=softfp" } */ > > > > #include "arm_mve.h" > > > LGTM. > Thanks, I'll remove the dg-skip-if clauses above before committing if the patch is approved. Christophe
diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu1.c b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu1.c index 1462dd4..0fa3afd 100644 --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu1.c +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu1.c @@ -1,6 +1,8 @@ /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ +/* { dg-require-effective-target arm_hard_ok } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ /* { dg-skip-if "Incompatible float ABI" { *-*-* } { "-mfloat-abi=soft" } {""} } */ -/* { dg-additional-options "-march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mthumb -mfpu=auto --save-temps" } */ +/* { dg-additional-options "-mfloat-abi=hard" } */ #include "arm_mve.h" diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu2.c b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu2.c index d528133..1fca110 100644 --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu2.c +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fp_fpu2.c @@ -1,5 +1,7 @@ /* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ -/* { dg-additional-options "-march=armv8.1-m.main+mve.fp -mfloat-abi=softfp -mthumb -mfpu=auto --save-temps" } */ +/* { dg-require-effective-target arm_softfp_ok } */ +/* { dg-add-options arm_v8_1m_mve_fp } */ +/* { dg-additional-options "-mfloat-abi=softfp" } */ #include "arm_mve.h" diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu1.c b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu1.c index 59ca724..726f9ec 100644 --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu1.c +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu1.c @@ -1,6 +1,8 @@ /* { dg-require-effective-target arm_v8_1m_mve_ok } */ +/* { dg-require-effective-target arm_hard_ok } */ +/* { dg-add-options arm_v8_1m_mve } */ /* { dg-skip-if "Incompatible float ABI" { *-*-* } { "-mfloat-abi=soft" } {""} } */ -/* { dg-additional-options "-march=armv8.1-m.main+mve -mfloat-abi=hard -mthumb -mfpu=auto --save-temps" } */ +/* { dg-additional-options "-mfloat-abi=hard" } */ #include "arm_mve.h" diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu2.c b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu2.c index ce297ea..7f39905 100644 --- a/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu2.c +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_fpu2.c @@ -1,6 +1,8 @@ /* { dg-require-effective-target arm_v8_1m_mve_ok } */ +/* { dg-require-effective-target arm_softfp_ok } */ +/* { dg-add-options arm_v8_1m_mve } */ /* { dg-skip-if "Incompatible float ABI" { *-*-* } { "-mfloat-abi=soft" } {""} } */ -/* { dg-additional-options "-march=armv8.1-m.main+mve -mfloat-abi=softfp -mthumb -mfpu=auto --save-temps" } */ +/* { dg-additional-options "-mfloat-abi=softfp" } */ #include "arm_mve.h"