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:02:35 +0800 [thread overview]
Message-ID: <61660508761A0EBE+202311072202351616596@rivai.ai> (raw)
In-Reply-To: <nycvar.YFH.7.77.849.2311071345030.8772@jbgna.fhfr.qr>
[-- Attachment #1: Type: text/plain, Size: 2304 bytes --]
Oh. I see.
Is it reasonable adapt this as follows ?
-/* { 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 } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 18 "vect" } } */
So that remove vect_sdiv_pow2_si for RVV, then RVV is able to check vectorization ?
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)
next prev parent reply other threads:[~2023-11-07 14:02 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 ` 钟居哲
2023-11-07 14:02 ` 钟居哲 [this message]
[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=61660508761A0EBE+202311072202351616596@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).