public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] test: Fix XPASS of bb-slp-43.c for RVV
@ 2023-11-06 22:35 Juzhe-Zhong
  2023-11-07  3:23 ` Jeff Law
  0 siblings, 1 reply; 6+ messages in thread
From: Juzhe-Zhong @ 2023-11-06 22:35 UTC (permalink / raw)
  To: gcc-patches; +Cc: jeffreyalaw, rguenther, Juzhe-Zhong

RVV is variable length vector but also has 256 bit VLS mode vector.
This test is vectorized as:

f:
        vsetivli        zero,8,e32,m2,ta,ma
        vle32.v v2,0(a0)
        vmv.v.i v4,1
        vle16.v v1,0(a1)
        vmseq.vv        v0,v2,v4
        vsetvli zero,zero,e16,m1,ta,ma
        vmseq.vi        v1,v1,2
        vsetvli zero,zero,e32,m2,ta,ma
        vmv.v.i v2,0
        vmand.mm        v0,v0,v1
        vmerge.vvm      v2,v2,v4,v0
        vse32.v v2,0(a0)
        ret

Use 256 bit vector, so remove XFAIL for 256 bits vector.

gcc/testsuite/ChangeLog:

	* gcc.dg/vect/bb-slp-43.c: Fix XPASS for RVV.

---
 gcc/testsuite/gcc.dg/vect/bb-slp-43.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-43.c b/gcc/testsuite/gcc.dg/vect/bb-slp-43.c
index a65d9513c4d..dad2d24262d 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-43.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-43.c
@@ -14,4 +14,4 @@ f (int *restrict x, short *restrict y)
 }
 
 /* { dg-final { scan-tree-dump-not "mixed mask and nonmask" "slp2" } } */
-/* { dg-final { scan-tree-dump-not "vector operands from scalars" "slp2" { target { { vect_int && vect_bool_cmp } && { vect_unpack && vect_hw_misalign } } xfail vect_variable_length } } } */
+/* { dg-final { scan-tree-dump-not "vector operands from scalars" "slp2" { target { { vect_int && vect_bool_cmp } && { vect_unpack && vect_hw_misalign } } xfail { vect_variable_length && { ! vect256 } } } } } */
-- 
2.36.3


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

* Re: [PATCH] test: Fix XPASS of bb-slp-43.c for RVV
  2023-11-06 22:35 [PATCH] test: Fix XPASS of bb-slp-43.c for RVV Juzhe-Zhong
@ 2023-11-07  3:23 ` Jeff Law
  2023-11-07  3:30   ` juzhe.zhong
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Law @ 2023-11-07  3:23 UTC (permalink / raw)
  To: Juzhe-Zhong, gcc-patches; +Cc: rguenther



On 11/6/23 15:35, Juzhe-Zhong wrote:
> RVV is variable length vector but also has 256 bit VLS mode vector.
> This test is vectorized as:
> 
> f:
>          vsetivli        zero,8,e32,m2,ta,ma
>          vle32.v v2,0(a0)
>          vmv.v.i v4,1
>          vle16.v v1,0(a1)
>          vmseq.vv        v0,v2,v4
>          vsetvli zero,zero,e16,m1,ta,ma
>          vmseq.vi        v1,v1,2
>          vsetvli zero,zero,e32,m2,ta,ma
>          vmv.v.i v2,0
>          vmand.mm        v0,v0,v1
>          vmerge.vvm      v2,v2,v4,v0
>          vse32.v v2,0(a0)
>          ret
> 
> Use 256 bit vector, so remove XFAIL for 256 bits vector.
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.dg/vect/bb-slp-43.c: Fix XPASS for RVV.
So will this create a FAIL if someone runs the testsuite with the 
autovec preference set to scalable?  Or are the fallbacks to VLS still 
available when we prefer scalable vectors?

jeff

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

* Re: Re: [PATCH] test: Fix XPASS of bb-slp-43.c for RVV
  2023-11-07  3:23 ` Jeff Law
@ 2023-11-07  3:30   ` juzhe.zhong
  2023-11-07  3:49     ` Jeff Law
  0 siblings, 1 reply; 6+ messages in thread
From: juzhe.zhong @ 2023-11-07  3:30 UTC (permalink / raw)
  To: jeffreyalaw, gcc-patches; +Cc: rguenther

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

>> So will this create a FAIL if someone runs the testsuite with the
>> autovec preference set to scalable?
No, it won't. Since it is always -fno-vect-cost-model.
When a scalable vector doesn't have 256bit vector,  it always XFAIL, for example, ARM SVE.

>> Or are the fallbacks to VLS still
>> available when we prefer scalable vectors?
Yes. since it is -fno-vect-cost-model.


juzhe.zhong@rivai.ai
 
From: Jeff Law
Date: 2023-11-07 11:23
To: Juzhe-Zhong; gcc-patches
CC: rguenther
Subject: Re: [PATCH] test: Fix XPASS of bb-slp-43.c for RVV
 
 
On 11/6/23 15:35, Juzhe-Zhong wrote:
> RVV is variable length vector but also has 256 bit VLS mode vector.
> This test is vectorized as:
> 
> f:
>          vsetivli        zero,8,e32,m2,ta,ma
>          vle32.v v2,0(a0)
>          vmv.v.i v4,1
>          vle16.v v1,0(a1)
>          vmseq.vv        v0,v2,v4
>          vsetvli zero,zero,e16,m1,ta,ma
>          vmseq.vi        v1,v1,2
>          vsetvli zero,zero,e32,m2,ta,ma
>          vmv.v.i v2,0
>          vmand.mm        v0,v0,v1
>          vmerge.vvm      v2,v2,v4,v0
>          vse32.v v2,0(a0)
>          ret
> 
> Use 256 bit vector, so remove XFAIL for 256 bits vector.
> 
> gcc/testsuite/ChangeLog:
> 
> * gcc.dg/vect/bb-slp-43.c: Fix XPASS for RVV.
So will this create a FAIL if someone runs the testsuite with the 
autovec preference set to scalable?  Or are the fallbacks to VLS still 
available when we prefer scalable vectors?
 
jeff
 

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

* Re: [PATCH] test: Fix XPASS of bb-slp-43.c for RVV
  2023-11-07  3:30   ` juzhe.zhong
@ 2023-11-07  3:49     ` Jeff Law
  2023-11-07  7:20       ` juzhe.zhong
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Law @ 2023-11-07  3:49 UTC (permalink / raw)
  To: juzhe.zhong, gcc-patches; +Cc: rguenther



On 11/6/23 20:30, juzhe.zhong@rivai.ai wrote:
>  >> So will this create a FAIL if someone runs the testsuite with the
>>> autovec preference set to scalable?
> No, it won't. Since it is always -fno-vect-cost-model.
> When a scalable vector doesn't have 256bit vector,  it always XFAIL, for 
> example, ARM SVE.
> 
>>> Or are the fallbacks to VLS still
>>> available when we prefer scalable vectors?
> Yes. since it is -fno-vect-cost-model.
OK.  Thanks for clarifying.  This is fine for the trunk.
jeff


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

* Re: Re: [PATCH] test: Fix XPASS of bb-slp-43.c for RVV
  2023-11-07  3:49     ` Jeff Law
@ 2023-11-07  7:20       ` juzhe.zhong
  0 siblings, 0 replies; 6+ 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: 780 bytes --]

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



juzhe.zhong@rivai.ai
 
From: Jeff Law
Date: 2023-11-07 11:49
To: juzhe.zhong@rivai.ai; gcc-patches
CC: rguenther
Subject: Re: [PATCH] test: Fix XPASS of bb-slp-43.c for RVV
 
 
On 11/6/23 20:30, juzhe.zhong@rivai.ai wrote:
>  >> So will this create a FAIL if someone runs the testsuite with the
>>> autovec preference set to scalable?
> No, it won't. Since it is always -fno-vect-cost-model.
> When a scalable vector doesn't have 256bit vector,  it always XFAIL, for 
> example, ARM SVE.
> 
>>> Or are the fallbacks to VLS still
>>> available when we prefer scalable vectors?
> Yes. since it is -fno-vect-cost-model.
OK.  Thanks for clarifying.  This is fine for the trunk.
jeff
 
 

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

* [PATCH] test: Fix XPASS of bb-slp-43.c for RVV
@ 2023-11-06 22:35 Juzhe-Zhong
  0 siblings, 0 replies; 6+ messages in thread
From: Juzhe-Zhong @ 2023-11-06 22:35 UTC (permalink / raw)
  To: gcc-patches; +Cc: jeffreyalaw, Juzhe-Zhong

RVV is variable length vector but also has 256 bit VLS mode vector.
This test is vectorized as:

f:
        vsetivli        zero,8,e32,m2,ta,ma
        vle32.v v2,0(a0)
        vmv.v.i v4,1
        vle16.v v1,0(a1)
        vmseq.vv        v0,v2,v4
        vsetvli zero,zero,e16,m1,ta,ma
        vmseq.vi        v1,v1,2
        vsetvli zero,zero,e32,m2,ta,ma
        vmv.v.i v2,0
        vmand.mm        v0,v0,v1
        vmerge.vvm      v2,v2,v4,v0
        vse32.v v2,0(a0)
        ret

Use 256 bit vector, so remove XFAIL for 256 bits vector.

gcc/testsuite/ChangeLog:

	* gcc.dg/vect/bb-slp-43.c: Fix XPASS for RVV.

---
 gcc/testsuite/gcc.dg/vect/bb-slp-43.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-43.c b/gcc/testsuite/gcc.dg/vect/bb-slp-43.c
index a65d9513c4d..dad2d24262d 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-43.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-43.c
@@ -14,4 +14,4 @@ f (int *restrict x, short *restrict y)
 }
 
 /* { dg-final { scan-tree-dump-not "mixed mask and nonmask" "slp2" } } */
-/* { dg-final { scan-tree-dump-not "vector operands from scalars" "slp2" { target { { vect_int && vect_bool_cmp } && { vect_unpack && vect_hw_misalign } } xfail vect_variable_length } } } */
+/* { dg-final { scan-tree-dump-not "vector operands from scalars" "slp2" { target { { vect_int && vect_bool_cmp } && { vect_unpack && vect_hw_misalign } } xfail { vect_variable_length && { ! vect256 } } } } } */
-- 
2.36.3


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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-06 22:35 [PATCH] test: Fix XPASS of bb-slp-43.c for RVV Juzhe-Zhong
2023-11-07  3:23 ` Jeff Law
2023-11-07  3:30   ` juzhe.zhong
2023-11-07  3:49     ` Jeff Law
2023-11-07  7:20       ` juzhe.zhong
  -- strict thread matches above, loose matches on Subject: below --
2023-11-06 22:35 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).