public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: 钟居哲 <juzhe.zhong@rivai.ai>
To: rguenther <rguenther@suse.de>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	 "Jeff Law" <jeffreyalaw@gmail.com>
Subject: Re: Re: [PATCH] test: Fix FAIL of vect-sdiv-pow2-1.c for RVV test: Fix FAIL of vect-sdiv-pow2-1.c for RVV#
Date: Tue, 7 Nov 2023 22:47:06 +0800	[thread overview]
Message-ID: <0B9385C2FA44615D+202311072247060288823@rivai.ai> (raw)
In-Reply-To: <nycvar.YFH.7.77.849.2311071435330.8772@jbgna.fhfr.qr>

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

Ok.  Sorry for inconvenience.

Here is the patch to fix as you suggested:
https://gcc.gnu.org/pipermail/gcc-patches/2023-November/635580.html 

I disabled this test, instead, I will add it into riscv specific testsuite list.

Thanks.


juzhe.zhong@rivai.ai
 
From: Richard Biener
Date: 2023-11-07 22:36
To: 钟居哲
CC: gcc-patches; Jeff Law
Subject: Re: Re: [PATCH] test: Fix FAIL of vect-sdiv-pow2-1.c for RVV test: Fix FAIL of vect-sdiv-pow2-1.c for RVV#
On Tue, 7 Nov 2023, ??? wrote:
 
> Hi, Richi.
> 
> We don't have explicit SDIV_POW2 pattern but we still want to test it to make sure
> we can vectorize SDIV_POW2 pattern which will be recognized.
> 
> Maybe we should add another target check ?
 
No, you should simply _not_ add riscv*-*-* to 
check_effective_target_vect_sdiv_pow2_si when you don't implement that
pattern!
 
The test is specifically for this very pattern, not a test whether
we can vectorize this at all.
 
> 
> 
> juzhe.zhong@rivai.ai
>  
> From: Richard Biener
> Date: 2023-11-07 21:45
> To: Juzhe-Zhong
> CC: gcc-patches; jeffreyalaw
> Subject: Re: [PATCH] test: Fix FAIL of vect-sdiv-pow2-1.c for RVV test: Fix FAIL of vect-sdiv-pow2-1.c for RVV#
> On Tue, 7 Nov 2023, Juzhe-Zhong wrote:
>  
> > RVV didn't explictly enable DIV_POW2 optab but we cen vectorize it.
> > We should check pattern recognition instead of explicit pattern check.
>  
> But I see
>  
> proc check_effective_target_vect_sdiv_pow2_si {} {
>     return [expr { ([istarget aarch64*-*-*]
>                     && [check_effective_target_aarch64_sve])
>                    || ([istarget riscv*-*-*]
>                        && [check_effective_target_riscv_v]) }]
>  
> so if you don't have sdiv_pow2_si then please don't advertise it.
>  
> > gcc/testsuite/ChangeLog:
> > 
> > * gcc.dg/vect/vect-sdiv-pow2-1.c: Fix dump check.
> > 
> > ---
> >  gcc/testsuite/gcc.dg/vect/vect-sdiv-pow2-1.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/gcc/testsuite/gcc.dg/vect/vect-sdiv-pow2-1.c b/gcc/testsuite/gcc.dg/vect/vect-sdiv-pow2-1.c
> > index 49ecbe216f2..8056c2a6748 100644
> > --- a/gcc/testsuite/gcc.dg/vect/vect-sdiv-pow2-1.c
> > +++ b/gcc/testsuite/gcc.dg/vect/vect-sdiv-pow2-1.c
> > @@ -79,5 +79,5 @@ main (void)
> >    return 0;
> >  }
> >  
> > -/* { dg-final { scan-tree-dump {\.DIV_POW2} "vect" { target vect_sdiv_pow2_si } } } */
> > +/* { dg-final { scan-tree-dump "vect_recog_divmod_pattern: detected" "vect" } } */
> >  /* { dg-final { scan-tree-dump-times "vectorized 1 loop" 18 "vect" { target vect_sdiv_pow2_si } } } */
> > 
>  
> 
 
-- 
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)
 

  reply	other threads:[~2023-11-07 14:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07  3:50 Juzhe-Zhong
2023-11-07  3:53 ` Jeff Law
2023-11-07  7:20   ` juzhe.zhong
2023-11-07 13:45 ` Richard Biener
2023-11-07 13:58   ` 钟居哲
2023-11-07 14:36     ` Richard Biener
2023-11-07 14:47       ` 钟居哲 [this message]
2023-11-07 14:02   ` 钟居哲
     [not found]   ` <202311072202351616596@rivai.ai>
2023-11-07 14:03     ` 钟居哲

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0B9385C2FA44615D+202311072247060288823@rivai.ai \
    --to=juzhe.zhong@rivai.ai \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=rguenther@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).