public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] test: Fix FAIL of bb-slp-cond-1.c for RVV
@ 2023-11-06 23:03 Juzhe-Zhong
  2023-11-07  3:25 ` Jeff Law
  2023-11-07 13:43 ` Richard Biener
  0 siblings, 2 replies; 4+ messages in thread
From: Juzhe-Zhong @ 2023-11-06 23:03 UTC (permalink / raw)
  To: gcc-patches; +Cc: rguenther, jeffreyalaw, Juzhe-Zhong

This patch fixes:
FAIL: gcc.dg/vect/bb-slp-cond-1.c -flto -ffat-lto-objects  scan-tree-dump-times vect "loop vectorized" 1
FAIL: gcc.dg/vect/bb-slp-cond-1.c scan-tree-dump-times vect "loop vectorized" 1

For RVV, "loop vectorized" appears 2 times instead of 1. Because:
optimized: loop vectorized using 16 byte vectors
optimized: loop vectorized using 8 byte vectors

As long as targets have both 64bit and 128bit vectors, it will occur 2 times.
2 targets are same situation, one is AMDGCN, the other is RVV.

Replace it target amdgcn with vect64 && vect128 to make test more general and easy maintain.

gcc/testsuite/ChangeLog:

	* gcc.dg/vect/bb-slp-cond-1.c: Fix FAIL.

---
 gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c b/gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c
index c8024429e9c..7efb91725df 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c
@@ -47,6 +47,6 @@ int main ()
 }
 
 /* { dg-final { scan-tree-dump {(no need for alias check [^\n]* when VF is 1|no alias between [^\n]* when [^\n]* is outside \(-16, 16\))} "vect" { target vect_element_align } } } */
-/* { dg-final { scan-tree-dump-times "loop vectorized" 1 "vect" { target { vect_element_align && { ! amdgcn-*-* } } } } } */
-/* { dg-final { scan-tree-dump-times "loop vectorized" 2 "vect" { target amdgcn-*-* } } } */
+/* { dg-final { scan-tree-dump-times "loop vectorized" 1 "vect" { target { vect_element_align && { ! { vect64 && vect128 } } } } } } */
+/* { dg-final { scan-tree-dump-times "loop vectorized" 2 "vect" { target { vect64 && vect128 } } } } */
 
-- 
2.36.3


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

* Re: [PATCH] test: Fix FAIL of bb-slp-cond-1.c for RVV
  2023-11-06 23:03 [PATCH] test: Fix FAIL of bb-slp-cond-1.c for RVV Juzhe-Zhong
@ 2023-11-07  3:25 ` Jeff Law
  2023-11-07  3:32   ` Li, Pan2
  2023-11-07 13:43 ` Richard Biener
  1 sibling, 1 reply; 4+ messages in thread
From: Jeff Law @ 2023-11-07  3:25 UTC (permalink / raw)
  To: Juzhe-Zhong, gcc-patches; +Cc: rguenther



On 11/6/23 16:03, Juzhe-Zhong wrote:
> This patch fixes:
> FAIL: gcc.dg/vect/bb-slp-cond-1.c -flto -ffat-lto-objects  scan-tree-dump-times vect "loop vectorized" 1
> FAIL: gcc.dg/vect/bb-slp-cond-1.c scan-tree-dump-times vect "loop vectorized" 1
> 
> For RVV, "loop vectorized" appears 2 times instead of 1. Because:
> optimized: loop vectorized using 16 byte vectors
> optimized: loop vectorized using 8 byte vectors
> 
> As long as targets have both 64bit and 128bit vectors, it will occur 2 times.
> 2 targets are same situation, one is AMDGCN, the other is RVV.
> 
> Replace it target amdgcn with vect64 && vect128 to make test more general and easy maintain.
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.dg/vect/bb-slp-cond-1.c: Fix FAIL.
OK.
jeff

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

* RE: [PATCH] test: Fix FAIL of bb-slp-cond-1.c for RVV
  2023-11-07  3:25 ` Jeff Law
@ 2023-11-07  3:32   ` Li, Pan2
  0 siblings, 0 replies; 4+ messages in thread
From: Li, Pan2 @ 2023-11-07  3:32 UTC (permalink / raw)
  To: Jeff Law, Juzhe-Zhong, gcc-patches; +Cc: rguenther

Committed, thanks Jeff.

Pan

-----Original Message-----
From: Jeff Law <jeffreyalaw@gmail.com> 
Sent: Tuesday, November 7, 2023 11:25 AM
To: Juzhe-Zhong <juzhe.zhong@rivai.ai>; gcc-patches@gcc.gnu.org
Cc: rguenther@suse.de
Subject: Re: [PATCH] test: Fix FAIL of bb-slp-cond-1.c for RVV



On 11/6/23 16:03, Juzhe-Zhong wrote:
> This patch fixes:
> FAIL: gcc.dg/vect/bb-slp-cond-1.c -flto -ffat-lto-objects  scan-tree-dump-times vect "loop vectorized" 1
> FAIL: gcc.dg/vect/bb-slp-cond-1.c scan-tree-dump-times vect "loop vectorized" 1
> 
> For RVV, "loop vectorized" appears 2 times instead of 1. Because:
> optimized: loop vectorized using 16 byte vectors
> optimized: loop vectorized using 8 byte vectors
> 
> As long as targets have both 64bit and 128bit vectors, it will occur 2 times.
> 2 targets are same situation, one is AMDGCN, the other is RVV.
> 
> Replace it target amdgcn with vect64 && vect128 to make test more general and easy maintain.
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.dg/vect/bb-slp-cond-1.c: Fix FAIL.
OK.
jeff

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

* Re: [PATCH] test: Fix FAIL of bb-slp-cond-1.c for RVV
  2023-11-06 23:03 [PATCH] test: Fix FAIL of bb-slp-cond-1.c for RVV Juzhe-Zhong
  2023-11-07  3:25 ` Jeff Law
@ 2023-11-07 13:43 ` Richard Biener
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Biener @ 2023-11-07 13:43 UTC (permalink / raw)
  To: Juzhe-Zhong; +Cc: gcc-patches, jeffreyalaw

On Tue, 7 Nov 2023, Juzhe-Zhong wrote:

> This patch fixes:
> FAIL: gcc.dg/vect/bb-slp-cond-1.c -flto -ffat-lto-objects  scan-tree-dump-times vect "loop vectorized" 1
> FAIL: gcc.dg/vect/bb-slp-cond-1.c scan-tree-dump-times vect "loop vectorized" 1
> 
> For RVV, "loop vectorized" appears 2 times instead of 1. Because:
> optimized: loop vectorized using 16 byte vectors
> optimized: loop vectorized using 8 byte vectors
> 
> As long as targets have both 64bit and 128bit vectors, it will occur 2 times.
> 2 targets are same situation, one is AMDGCN, the other is RVV.
> 
> Replace it target amdgcn with vect64 && vect128 to make test more general and easy maintain.

I think we usually add --param vect-epilogues-nomask=0 instead to avoid
epilogue vectorization.  I wonder why the test is called bb-slp-*
though ...

> gcc/testsuite/ChangeLog:
> 
> 	* gcc.dg/vect/bb-slp-cond-1.c: Fix FAIL.
> 
> ---
>  gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c b/gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c
> index c8024429e9c..7efb91725df 100644
> --- a/gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c
> +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c
> @@ -47,6 +47,6 @@ int main ()
>  }
>  
>  /* { dg-final { scan-tree-dump {(no need for alias check [^\n]* when VF is 1|no alias between [^\n]* when [^\n]* is outside \(-16, 16\))} "vect" { target vect_element_align } } } */
> -/* { dg-final { scan-tree-dump-times "loop vectorized" 1 "vect" { target { vect_element_align && { ! amdgcn-*-* } } } } } */
> -/* { dg-final { scan-tree-dump-times "loop vectorized" 2 "vect" { target amdgcn-*-* } } } */
> +/* { dg-final { scan-tree-dump-times "loop vectorized" 1 "vect" { target { vect_element_align && { ! { vect64 && vect128 } } } } } } */
> +/* { dg-final { scan-tree-dump-times "loop vectorized" 2 "vect" { target { vect64 && vect128 } } } } */
>  
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE Software Solutions Germany GmbH,
Frankenstrasse 146, 90461 Nuernberg, Germany;
GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)

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

end of thread, other threads:[~2023-11-07 13:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-06 23:03 [PATCH] test: Fix FAIL of bb-slp-cond-1.c for RVV Juzhe-Zhong
2023-11-07  3:25 ` Jeff Law
2023-11-07  3:32   ` Li, Pan2
2023-11-07 13:43 ` 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).