public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] testsuite/vect: Fix pr25413a.c expectations [PR109705]
@ 2024-01-26  5:01 Andrew Pinski
  2024-01-26  7:32 ` Richard Biener
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Pinski @ 2024-01-26  5:01 UTC (permalink / raw)
  To: gcc-patches; +Cc: Andrew Pinski

The 2 loops in octfapg_universe can and will be vectorized now
after r14-333-g6d4b59a9356ac4 on targets that support multiplication
in the long type. But the testcase does not check vect_long_mult for
that, so this patch corrects that error and now the testcase passes correctly
on aarch64-linux-gnu (with and without SVE).

Built and tested on aarch64-linux-gnu (with and without SVE).

gcc/testsuite/ChangeLog:

	PR testsuite/109705
	* gcc.dg/vect/pr25413a.c: Expect 1 vectorized loops for !vect_long_mult
	and 2 for vect_long_mult.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
---
 gcc/testsuite/gcc.dg/vect/pr25413a.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/vect/pr25413a.c b/gcc/testsuite/gcc.dg/vect/pr25413a.c
index ffb517c9ce0..905665e5dbe 100644
--- a/gcc/testsuite/gcc.dg/vect/pr25413a.c
+++ b/gcc/testsuite/gcc.dg/vect/pr25413a.c
@@ -123,6 +123,8 @@ int main (void)
   return 0;
 } 
 
-/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
+/* The second loop in octfapg_universe requires long multiply to do the vectorization. */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! vect_long_mult } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target vect_long_mult  } } } */
 /* { dg-final { scan-tree-dump-times "vector alignment may not be reachable" 1 "vect" { target { ! vector_alignment_reachable  } } } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { ! vector_alignment_reachable } } } } */
-- 
2.39.3


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

* Re: [PATCH] testsuite/vect: Fix pr25413a.c expectations [PR109705]
  2024-01-26  5:01 [PATCH] testsuite/vect: Fix pr25413a.c expectations [PR109705] Andrew Pinski
@ 2024-01-26  7:32 ` Richard Biener
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2024-01-26  7:32 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: gcc-patches

On Fri, Jan 26, 2024 at 6:01 AM Andrew Pinski <quic_apinski@quicinc.com> wrote:
>
> The 2 loops in octfapg_universe can and will be vectorized now
> after r14-333-g6d4b59a9356ac4 on targets that support multiplication
> in the long type. But the testcase does not check vect_long_mult for
> that, so this patch corrects that error and now the testcase passes correctly
> on aarch64-linux-gnu (with and without SVE).
>
> Built and tested on aarch64-linux-gnu (with and without SVE).

OK

> gcc/testsuite/ChangeLog:
>
>         PR testsuite/109705
>         * gcc.dg/vect/pr25413a.c: Expect 1 vectorized loops for !vect_long_mult
>         and 2 for vect_long_mult.
>
> Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
> ---
>  gcc/testsuite/gcc.dg/vect/pr25413a.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.dg/vect/pr25413a.c b/gcc/testsuite/gcc.dg/vect/pr25413a.c
> index ffb517c9ce0..905665e5dbe 100644
> --- a/gcc/testsuite/gcc.dg/vect/pr25413a.c
> +++ b/gcc/testsuite/gcc.dg/vect/pr25413a.c
> @@ -123,6 +123,8 @@ int main (void)
>    return 0;
>  }
>
> -/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
> +/* The second loop in octfapg_universe requires long multiply to do the vectorization. */
> +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! vect_long_mult } } } } */
> +/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target vect_long_mult  } } } */
>  /* { dg-final { scan-tree-dump-times "vector alignment may not be reachable" 1 "vect" { target { ! vector_alignment_reachable  } } } } */
>  /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { ! vector_alignment_reachable } } } } */
> --
> 2.39.3
>

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

end of thread, other threads:[~2024-01-26  7:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-26  5:01 [PATCH] testsuite/vect: Fix pr25413a.c expectations [PR109705] Andrew Pinski
2024-01-26  7:32 ` 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).