public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] test: Fix FAIL of SAD tests for RVV
@ 2023-11-07  3:36 Juzhe-Zhong
  2023-11-07  3:52 ` Jeff Law
  0 siblings, 1 reply; 3+ messages in thread
From: Juzhe-Zhong @ 2023-11-07  3:36 UTC (permalink / raw)
  To: gcc-patches; +Cc: rguenther, jeffreyalaw, Juzhe-Zhong

RVV didn't explicitly enable SAD optab but we can vectorize it
since loop vectorizer is able to recognize SAD pattern for RVV during analysis.

Current scan check of explicit SAD pattern looks odd,
it should be more reasonable to check recognition of SAD pattern during Loop vectorize analysis.

Other SAD tests like slp-reduc-sad-2.c are checking pattern recognition instead of explicit pattern enable.
Fix SAD dump check to fix the FAILS for RVV.

gcc/testsuite/ChangeLog:

	* gcc.dg/vect/slp-reduc-sad.c: Fix check.
	* gcc.dg/vect/vect-reduc-sad.c: Ditto.

---
 gcc/testsuite/gcc.dg/vect/slp-reduc-sad.c  | 2 +-
 gcc/testsuite/gcc.dg/vect/vect-reduc-sad.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-sad.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-sad.c
index faa1c16d1a7..977cfabde11 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-reduc-sad.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-sad.c
@@ -57,6 +57,6 @@ main ()
   return 0;
 }
 
-/* { dg-final { scan-tree-dump "sad pattern recognized" "vect" } } */
+/* { dg-final { scan-tree-dump "vect_recog_sad_pattern: detected" "vect" } } */
 /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-sad.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-sad.c
index 2f0bb692564..08f79874e9c 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-sad.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-sad.c
@@ -51,6 +51,6 @@ main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "sad pattern recognized" 1 "vect" } } */
+/* { dg-final { scan-tree-dump "vect_recog_sad_pattern: detected" "vect" } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 
-- 
2.36.3


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

* Re: [PATCH] test: Fix FAIL of SAD tests for RVV
  2023-11-07  3:36 [PATCH] test: Fix FAIL of SAD tests for RVV Juzhe-Zhong
@ 2023-11-07  3:52 ` Jeff Law
  2023-11-07  7:20   ` juzhe.zhong
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Law @ 2023-11-07  3:52 UTC (permalink / raw)
  To: Juzhe-Zhong, gcc-patches; +Cc: rguenther



On 11/6/23 20:36, Juzhe-Zhong wrote:
> RVV didn't explicitly enable SAD optab but we can vectorize it
> since loop vectorizer is able to recognize SAD pattern for RVV during analysis.
> 
> Current scan check of explicit SAD pattern looks odd,
> it should be more reasonable to check recognition of SAD pattern during Loop vectorize analysis.
> 
> Other SAD tests like slp-reduc-sad-2.c are checking pattern recognition instead of explicit pattern enable.
> Fix SAD dump check to fix the FAILS for RVV.
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.dg/vect/slp-reduc-sad.c: Fix check.
> 	* gcc.dg/vect/vect-reduc-sad.c: Ditto.
OK after verifying this doesn't introduce an unexpected fail on at least 
one major platform -- I'd recommend x86.

You can greatly speed up testing with:

make check-gcc RUNTESTFLAGS=vect.exp=slp-reduc-sad.c
make check-gcc RUNTESTFLAGS=slp-reduc-sad.c

That way you just have to build the stage1 x86 compiler, do that quick 
test rather than a full bootstrap and regression run.


jeff

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

* Re: Re: [PATCH] test: Fix FAIL of SAD tests for RVV
  2023-11-07  3:52 ` Jeff Law
@ 2023-11-07  7:20   ` juzhe.zhong
  0 siblings, 0 replies; 3+ messages in thread
From: juzhe.zhong @ 2023-11-07  7:20 UTC (permalink / raw)
  To: jeffreyalaw, gcc-patches; +Cc: rguenther

[-- Attachment #1: Type: text/plain, Size: 1292 bytes --]

Thanks Jeff. Just finish bootstrap +regression passed.
Committed.




juzhe.zhong@rivai.ai
 
From: Jeff Law
Date: 2023-11-07 11:52
To: Juzhe-Zhong; gcc-patches
CC: rguenther
Subject: Re: [PATCH] test: Fix FAIL of SAD tests for RVV
 
 
On 11/6/23 20:36, Juzhe-Zhong wrote:
> RVV didn't explicitly enable SAD optab but we can vectorize it
> since loop vectorizer is able to recognize SAD pattern for RVV during analysis.
> 
> Current scan check of explicit SAD pattern looks odd,
> it should be more reasonable to check recognition of SAD pattern during Loop vectorize analysis.
> 
> Other SAD tests like slp-reduc-sad-2.c are checking pattern recognition instead of explicit pattern enable.
> Fix SAD dump check to fix the FAILS for RVV.
> 
> gcc/testsuite/ChangeLog:
> 
> * gcc.dg/vect/slp-reduc-sad.c: Fix check.
> * gcc.dg/vect/vect-reduc-sad.c: Ditto.
OK after verifying this doesn't introduce an unexpected fail on at least 
one major platform -- I'd recommend x86.
 
You can greatly speed up testing with:
 
make check-gcc RUNTESTFLAGS=vect.exp=slp-reduc-sad.c
make check-gcc RUNTESTFLAGS=slp-reduc-sad.c
 
That way you just have to build the stage1 x86 compiler, do that quick 
test rather than a full bootstrap and regression run.
 
 
jeff
 

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-07  3:36 [PATCH] test: Fix FAIL of SAD tests for RVV Juzhe-Zhong
2023-11-07  3:52 ` Jeff Law
2023-11-07  7:20   ` juzhe.zhong

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).