From: "juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai>
To: Kito.cheng <kito.cheng@sifive.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
palmer <palmer@rivosinc.com>,
"Robin Dapp" <rdapp.gcc@gmail.com>,
jeffreyalaw <jeffreyalaw@gmail.com>
Subject: Re: Re: [PATCH] RISC-V: Support TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT to optimize codegen of RVV auto-vectorization
Date: Mon, 15 May 2023 11:17:12 +0800 [thread overview]
Message-ID: <BDA3666906931473+2023051511171137416144@rivai.ai> (raw)
In-Reply-To: <CALLt3Ti4_jBSnxGxXY8yJ6GM48iAXdM7Vv8BS-TOfg87mS-Zfg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]
Hi, address comment and send V2 patch here:
https://gcc.gnu.org/pipermail/gcc-patches/2023-May/618477.html
Thanks.
juzhe.zhong@rivai.ai
From: Kito Cheng
Date: 2023-05-15 10:56
To: juzhe.zhong@rivai.ai
CC: gcc-patches; palmer; Robin Dapp; jeffreyalaw
Subject: Re: Re: [PATCH] RISC-V: Support TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT to optimize codegen of RVV auto-vectorization
On Mon, May 15, 2023 at 10:48 AM juzhe.zhong@rivai.ai
<juzhe.zhong@rivai.ai> wrote:
>
> Oh, I see. I try this way:
> static poly_uint64
> riscv_vectorize_preferred_vector_alignment (const_tree type)
> {
> if (riscv_v_ext_vector_mode_p (TYPE_MODE (type)))
> return TYPE_ALIGN (TREE_TYPE (type));
> return TYPE_ALIGN (type);
> }
>
> And disable both TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE
> and TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST
>
> Both VLA and VLS works well after the testing of align-1.c && align-2.c
> Is the way you prefer ?
>
> But I am not sure whether it's safe since both my downstream GCC and ARM SVE didn't use this approach.
> I am Ok of both for now. So do you prefer the second approach ? Then I can send V2 patch.
I am not sure it's safe either, but I am not convinced we need
TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE for improving the
VLS-VLMAX alignment, so I would prefer just using
TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT for now unless we found
it's not safe or we know why it's better way.
next prev parent reply other threads:[~2023-05-15 3:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-13 11:44 juzhe.zhong
2023-05-15 0:35 ` juzhe.zhong
2023-05-15 2:38 ` Kito Cheng
2023-05-15 2:47 ` juzhe.zhong
2023-05-15 2:56 ` Kito Cheng
2023-05-15 3:17 ` juzhe.zhong [this message]
2023-05-15 7:19 ` Robin Dapp
2023-05-15 8:02 ` Kito Cheng
2023-05-15 8:10 ` juzhe.zhong
2023-05-15 8:58 ` Robin Dapp
2023-05-15 10:32 ` juzhe.zhong
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=BDA3666906931473+2023051511171137416144@rivai.ai \
--to=juzhe.zhong@rivai.ai \
--cc=gcc-patches@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
--cc=kito.cheng@sifive.com \
--cc=palmer@rivosinc.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).