From: Palmer Dabbelt <palmer@dabbelt.com>
To: jeffreyalaw@gmail.com
Cc: juzhe.zhong@rivai.ai, gcc-patches@gcc.gnu.org,
Kito Cheng <kito.cheng@gmail.com>
Subject: Re: [PATCH] RISC-V: Remove unit-stride store from ta attribute
Date: Fri, 16 Dec 2022 13:59:24 -0800 (PST) [thread overview]
Message-ID: <mhng-6d68ce96-4140-481f-9415-e15ee88fe08c@palmer-ri-x1c9a> (raw)
In-Reply-To: <d3713478-01ac-6cd5-81f0-1887daef87ca@gmail.com>
On Fri, 16 Dec 2022 12:01:04 PST (-0800), jeffreyalaw@gmail.com wrote:
>
>
> On 12/14/22 04:36, juzhe.zhong@rivai.ai wrote:
>> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
>>
>> Since store instructions doesn't care about tail policy, we remove
>> vste from "ta" attribute. Hence, we could have more fusion chances
>> and better optimization.
>>
>> gcc/ChangeLog:
>>
>> * config/riscv/vector.md: Remove vste.
> Just to confirm that I understand the basic model. Vector stores only
> update active elements, thus they don't care about tail policy, right?
>
> Assuming that's the case, then this is OK.
That had been my assumption as well, but I don't see that explicitly
called out in the ISA manual. I see
Masked vector stores only update active memory elements.
where "active" is defined as
* The _body_ elements are those whose element index is greater than or equal
to the initial value in the `vstart` register, and less than the current
vector length setting in `vl`. The body can be split into two disjoint subsets:
** The _active_ elements during a vector instruction's execution are the
elements within the body and where the current mask is enabled at that element
position. The active elements can raise exceptions and update the destination
vector register group.
but I don't see anything about the unmasked stores. The blurb about
tail elements only applies to registers groups, not memory addresses, so
I think that's kind of a grey area there too. I was pretty sure the intent
here was to have tail elements not updated in memory, so hopefully I'm just
missing something in the spec.
I open an issue to check: https://github.com/riscv/riscv-v-spec/issues/846
next prev parent reply other threads:[~2022-12-16 21:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-14 11:36 juzhe.zhong
2022-12-16 20:01 ` Jeff Law
2022-12-16 21:59 ` Palmer Dabbelt [this message]
2022-12-16 23:00 ` Andrew Waterman
2022-12-17 1:22 ` 钟居哲
2022-12-19 15:06 ` 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=mhng-6d68ce96-4140-481f-9415-e15ee88fe08c@palmer-ri-x1c9a \
--to=palmer@dabbelt.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
--cc=juzhe.zhong@rivai.ai \
--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).