public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai>
To: kito.cheng <kito.cheng@gmail.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	 palmer <palmer@dabbelt.com>,
	 jeffreyalaw <jeffreyalaw@gmail.com>,
	 "Robin Dapp" <rdapp.gcc@gmail.com>
Subject: Re: Re: [PATCH V2] RISC-V: Add basic vec_init for VLS RVV auto-vectorization
Date: Fri, 12 May 2023 11:00:55 +0800	[thread overview]
Message-ID: <0170414FC2D1EC73+202305121100545489405@rivai.ai> (raw)
In-Reply-To: <CA+yXCZA68QUNMVxwM5V9_Mmk=ucY7=O--P9njd4xHe1QyvLz+A@mail.gmail.com>

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

I have remove comments related to LLVM and reorg testcases:
https://gcc.gnu.org/pipermail/gcc-patches/2023-May/618256.html 
V3 can you take a look again.

Sorry for sending wrong comments in changelog. Well, I goal is not to disparage LLVM.
I am just used to reading the LLVM implementation while sending patch for GCC to make sure
the implementation is correct.

The slidedown method is totally the same as LLVM. 

Sorry about that, I won't send any information related to LLVM gain. Thanks :)



juzhe.zhong@rivai.ai
 
From: Kito Cheng
Date: 2023-05-12 10:23
To: juzhe.zhong
CC: gcc-patches; palmer; jeffreyalaw; rdapp.gcc
Subject: Re: [PATCH V2] RISC-V: Add basic vec_init for VLS RVV auto-vectorization
> This patch makes vec_init support common init vector handling (using vslide1down to insert element)
> which can handle any cases of initialization vec but it's not optimal for cases.
>
> And support Case 1 optimizaiton:
> https://godbolt.org/z/Yb9PK9jsz
 
Don't use godbolt link in comment, because they are not permanently
preserved on the server, also the reference is not fixed since LLVM
trunk could improve.
 
> LLVM codegen:
> https://godbolt.org/z/xsnavvWqx
>
> ...
> vslide1down.vx (x128 times)
> ...
 
Drop LLVM codegen here, again, it might improve, healthy competition
is good, but I would like to avoid disparaging other compilers in
comments. :)
 
 
> ---
>  gcc/config/riscv/autovec.md                   |  16 ++
>  gcc/config/riscv/riscv-protos.h               |   1 +
>  gcc/config/riscv/riscv-v.cc                   | 127 +++++++++++
>  gcc/config/riscv/vector-iterators.md          |   9 +
>  .../gcc.target/riscv/rvv/autovec/insert-1.c   |  41 ++++
>  .../gcc.target/riscv/rvv/autovec/insert-2.c   |  41 ++++
>  .../gcc.target/riscv/rvv/autovec/insert-3.c   |  41 ++++
>  .../riscv/rvv/autovec/insert_run-1.c          |  46 ++++
>  .../riscv/rvv/autovec/insert_run-2.c          |  46 ++++
>  .../gcc.target/riscv/rvv/autovec/repeat-1.c   |  75 +++++++
>  .../gcc.target/riscv/rvv/autovec/repeat-2.c   |  61 ++++++
>  .../gcc.target/riscv/rvv/autovec/repeat-3.c   |  53 +++++
>  .../gcc.target/riscv/rvv/autovec/repeat-4.c   |  39 ++++
>  .../gcc.target/riscv/rvv/autovec/repeat-5.c   |  74 +++++++
>  .../gcc.target/riscv/rvv/autovec/repeat-6.c   |  78 +++++++
>  .../riscv/rvv/autovec/repeat_run-1.c          | 125 +++++++++++
>  .../riscv/rvv/autovec/repeat_run-2.c          | 145 +++++++++++++
>  .../riscv/rvv/autovec/repeat_run-3.c          | 203 ++++++++++++++++++
>  .../riscv/rvv/autovec/repeat_run-4.c          |  77 +++++++
>  .../riscv/rvv/autovec/repeat_run-5.c          | 124 +++++++++++
>  .../riscv/rvv/autovec/repeat_run-6.c          | 122 +++++++++++
>  21 files changed, 1544 insertions(+)
>  create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/insert-1.c
 
Could you reorg the autovec folder to separate vls-vlmax and vla stuffs?
 
>  create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/insert-2.c
...
> +/* Initialize register TARGET from the elements in PARALLEL rtx VALS.  */
> +
> +void
> +expand_vec_init (rtx target, rtx vals)
> +{
> +  machine_mode mode = GET_MODE (target);
 
I would like to add some assertion here to ensure only VLS mode here.
 

      reply	other threads:[~2023-05-12  3:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-12  1:31 juzhe.zhong
2023-05-12  2:23 ` Kito Cheng
2023-05-12  3:00   ` juzhe.zhong [this message]

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=0170414FC2D1EC73+202305121100545489405@rivai.ai \
    --to=juzhe.zhong@rivai.ai \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=kito.cheng@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=rdapp.gcc@gmail.com \
    /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).