From: "juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai>
To: jeffreyalaw <jeffreyalaw@gmail.com>,
gcc-patches <gcc-patches@gcc.gnu.org>
Cc: kito.cheng <kito.cheng@gmail.com>
Subject: Re: Re: [PATCH] RISC-V: Fine tune gather load RA constraint
Date: Mon, 24 Apr 2023 11:05:43 +0800 [thread overview]
Message-ID: <043664043D9CE9DE+20230424110542546796124@rivai.ai> (raw)
In-Reply-To: <0c328c8e-21bc-5aee-af79-f53bd078c665@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1368 bytes --]
Adding earlyclobber is to make dest operand do not overlap with source operand.
For example:
for gather load, vluxei.v v8,(a5),v8 is illegal according to RVV ISA.
GCC is using same way as LLVM which is also adding earlyclobber for modeling disabling overlap between dest and source operand.
juzhe.zhong@rivai.ai
From: Jeff Law
Date: 2023-04-22 04:36
To: juzhe.zhong; gcc-patches
CC: kito.cheng
Subject: Re: [PATCH] RISC-V: Fine tune gather load RA constraint
On 3/13/23 02:28, juzhe.zhong@rivai.ai wrote:
> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
>
> For DEST EEW < SOURCE EEW, we can partial overlap register
> according to RVV ISA.
>
> gcc/ChangeLog:
>
> * config/riscv/vector.md: Fix RA constraint.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.target/riscv/rvv/base/narrow_constraint-12.c: New test.
This is OK.
The one question I keep having when I read these patterns is why we have
the earlyclobber.
Earlyclobber means that the output is potentially written before the
inputs are consumed. Typically for a single instruction pattern such
constraints wouldn't make a lot of sense as *usually* the inputs are
consumed before the output is written.
Just looking for a clarification as to why the earlyclobbers are needed
at all, particularly for non-reduction patterns.
jeff
next prev parent reply other threads:[~2023-04-24 3:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-13 8:28 juzhe.zhong
2023-03-14 18:08 ` Jeff Law
2023-03-15 6:52 ` juzhe.zhong
2023-03-19 16:55 ` Jeff Law
2023-03-20 0:49 ` juzhe.zhong
2023-04-21 20:36 ` Jeff Law
2023-04-24 3:05 ` juzhe.zhong [this message]
2023-04-26 4:21 ` Kito Cheng
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=043664043D9CE9DE+20230424110542546796124@rivai.ai \
--to=juzhe.zhong@rivai.ai \
--cc=gcc-patches@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
--cc=kito.cheng@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).