On 31/10/2024 18:26, Torbjörn SVENSSON wrote:
> Ok for trunk and releases/gcc-14?
>
> --
>
> Tests uses neon, so add effective-target arm_neon.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.target/arm/pr68620.c: Use effective-target arm_neon.
> * gcc.target/arm/pr78041.c: Likewise.
>
> Signed-off-by: Torbjörn SVENSSON <[email protected]>
> ---
> gcc/testsuite/gcc.target/arm/pr68620.c | 4 ++--
> gcc/testsuite/gcc.target/arm/pr78041.c | 3 ++-
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.target/arm/pr68620.c
> b/gcc/testsuite/gcc.target/arm/pr68620.c
> index 91878432b00..b4a44dab6ba 100644
> --- a/gcc/testsuite/gcc.target/arm/pr68620.c
> +++ b/gcc/testsuite/gcc.target/arm/pr68620.c
> @@ -1,8 +1,8 @@
> /* { dg-do compile } */
> /* { dg-skip-if "-mpure-code supports M-profile without Neon only" { *-*-* }
> { "-mpure-code" } } */
> -/* { dg-require-effective-target arm_fp_ok } */
> +/* { dg-require-effective-target arm_neon_ok } */
This seems reasonable, but ...
> /* { dg-options "-mfp16-format=ieee" } */
> -/* { dg-add-options arm_fp } */
> +/* { dg-add-options arm_neon } */
>
> #include "arm_neon.h"
>
... I don't think this is right. It looks like the point of this test is to
check that adding the #pragma to select a neon-based FPU enables a specific
intrinsic. That ought to work with the existing checks (at least, modulo
changing the effective-target at the start). But adding neon options on the
command line shouldn't be needed. What's the option combination that leads to
a failure?
> diff --git a/gcc/testsuite/gcc.target/arm/pr78041.c
> b/gcc/testsuite/gcc.target/arm/pr78041.c
> index 340ab5cb433..418b7e09fc4 100644
> --- a/gcc/testsuite/gcc.target/arm/pr78041.c
> +++ b/gcc/testsuite/gcc.target/arm/pr78041.c
> @@ -1,6 +1,7 @@
> /* { dg-require-effective-target arm_thumb2_ok } */
> /* { dg-require-effective-target arm_neon_ok } */
> -/* { dg-options "-fno-inline -mthumb -O1 -mfpu=neon -w" } */
> +/* { dg-options "-fno-inline -mthumb -O1 -w" } */
> +/* { dg-add-options arm_neon } */
>
> extern void abort (void);
This bit is OK, though.
>