public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] vect/testsuite: Fix vect-simd-clone-1[02].c when dg-do default is compile [PR113899]
@ 2024-02-13 21:45 Andrew Pinski
  2024-02-14  8:55 ` Richard Biener
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Pinski @ 2024-02-13 21:45 UTC (permalink / raw)
  To: gcc-patches; +Cc: Andrew Pinski

The vect testsuite will chose the dg-do default based on if it knows the
running target does not support running with the vector extensions enabled
(for easy of testing). The problem is when it is decided the default is compile
instead of run, dg-additional-sources does not work. So the fix is to set
dg-do on these two testcases to run explicitly.

OK? Tested on x86_64 with a hack to check_vect_support_and_set_flags to set the dg-default
to compile.

gcc/testsuite/ChangeLog:

	PR testsuite/113899
	* gcc.dg/vect/vect-simd-clone-10.c: Add `dg-do run`
	* gcc.dg/vect/vect-simd-clone-12.c: Likewise.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
---
 gcc/testsuite/gcc.dg/vect/vect-simd-clone-10.c | 2 ++
 gcc/testsuite/gcc.dg/vect/vect-simd-clone-12.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-10.c b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-10.c
index ed63ff59cc0..009c849b7e7 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-10.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-10.c
@@ -1,3 +1,5 @@
+/* Since this uses dg-additional-sources, need to specify `dg-do run` instead of the default. */
+/* { dg-do run } */
 /* { dg-require-effective-target vect_simd_clones } */
 /* { dg-additional-options "-fopenmp-simd" } */
 /* { dg-additional-options "-mavx" { target avx_runtime } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-12.c b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-12.c
index c44471e35bc..4699a3f3c80 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-12.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-12.c
@@ -1,3 +1,5 @@
+/* Since this uses dg-additional-sources, need to specify `dg-do run` instead of the default. */
+/* { dg-do run } */
 /* { dg-require-effective-target vect_simd_clones } */
 /* { dg-additional-options "-fopenmp-simd" } */
 /* { dg-additional-options "-mavx" { target avx_runtime } } */
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] vect/testsuite: Fix vect-simd-clone-1[02].c when dg-do default is compile [PR113899]
  2024-02-13 21:45 [PATCH] vect/testsuite: Fix vect-simd-clone-1[02].c when dg-do default is compile [PR113899] Andrew Pinski
@ 2024-02-14  8:55 ` Richard Biener
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2024-02-14  8:55 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: gcc-patches

On Tue, Feb 13, 2024 at 10:46 PM Andrew Pinski <quic_apinski@quicinc.com> wrote:
>
> The vect testsuite will chose the dg-do default based on if it knows the
> running target does not support running with the vector extensions enabled
> (for easy of testing). The problem is when it is decided the default is compile
> instead of run, dg-additional-sources does not work. So the fix is to set
> dg-do on these two testcases to run explicitly.
>
> OK? Tested on x86_64 with a hack to check_vect_support_and_set_flags to set the dg-default
> to compile.


OK
> gcc/testsuite/ChangeLog:
>
>         PR testsuite/113899
>         * gcc.dg/vect/vect-simd-clone-10.c: Add `dg-do run`
>         * gcc.dg/vect/vect-simd-clone-12.c: Likewise.
>
> Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
> ---
>  gcc/testsuite/gcc.dg/vect/vect-simd-clone-10.c | 2 ++
>  gcc/testsuite/gcc.dg/vect/vect-simd-clone-12.c | 2 ++
>  2 files changed, 4 insertions(+)
>
> diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-10.c b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-10.c
> index ed63ff59cc0..009c849b7e7 100644
> --- a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-10.c
> +++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-10.c
> @@ -1,3 +1,5 @@
> +/* Since this uses dg-additional-sources, need to specify `dg-do run` instead of the default. */
> +/* { dg-do run } */
>  /* { dg-require-effective-target vect_simd_clones } */
>  /* { dg-additional-options "-fopenmp-simd" } */
>  /* { dg-additional-options "-mavx" { target avx_runtime } } */
> diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-12.c b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-12.c
> index c44471e35bc..4699a3f3c80 100644
> --- a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-12.c
> +++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-12.c
> @@ -1,3 +1,5 @@
> +/* Since this uses dg-additional-sources, need to specify `dg-do run` instead of the default. */
> +/* { dg-do run } */
>  /* { dg-require-effective-target vect_simd_clones } */
>  /* { dg-additional-options "-fopenmp-simd" } */
>  /* { dg-additional-options "-mavx" { target avx_runtime } } */
> --
> 2.43.0
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-14  8:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-13 21:45 [PATCH] vect/testsuite: Fix vect-simd-clone-1[02].c when dg-do default is compile [PR113899] Andrew Pinski
2024-02-14  8:55 ` Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).