From: Richard Sandiford <richard.sandiford@arm.com>
To: Richard Biener <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org, linkw@linux.ibm.com
Subject: Re: [PATCH] Add emulated gather capability to the vectorizer
Date: Mon, 02 Aug 2021 09:05:20 +0100 [thread overview]
Message-ID: <mptfsvsff0f.fsf@arm.com> (raw)
In-Reply-To: <nycvar.YFH.7.76.2108020937420.11781@zhemvz.fhfr.qr> (Richard Biener's message of "Mon, 2 Aug 2021 09:44:09 +0200 (CEST)")
Richard Biener <rguenther@suse.de> writes:
> On Fri, 30 Jul 2021, Richard Sandiford wrote:
>> > @@ -9456,6 +9499,51 @@ vectorizable_load (vec_info *vinfo,
>> > data_ref = NULL_TREE;
>> > break;
>> > }
>> > + else if (memory_access_type == VMAT_GATHER_SCATTER)
>> > + {
>> > + /* Emulated gather-scatter. */
>> > + gcc_assert (!final_mask);
>>
>> For this to be safe, we need to make sure that
>> check_load_store_for_partial_vectors clears
>> LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P. Is that already guaranteed?
>> (Maybe yes, I didn't look closely. :-))
>
> I've made sure to fail earlier:
>
> @@ -8692,6 +8725,15 @@ vectorizable_load (vec_info *vinfo,
> "unsupported access type for masked
> load.\n");
> return false;
> }
> + else if (memory_access_type == VMAT_GATHER_SCATTER
> + && gs_info.ifn == IFN_LAST
> + && !gs_info.decl)
> + {
> + if (dump_enabled_p ())
> + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
> + "unsupported masked emulated gather.\n");
> + return false;
> + }
> }
>
> at least I don't see a way to emulate masked gathers ;)
Yeah, that handles masked loads created by ifcvt. But we also need to
protect against an unconditional load being converted into a predicated
load for partial loop vectorisation. I think we still need a check in
check_load_store_for_partial_vectors to handle that. The check wouldn't
prevent vectorisation, it would just prevent using fully-predicated loops.
Thanks,
Richard
next prev parent reply other threads:[~2021-08-02 8:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-30 11:34 Richard Biener
2021-07-30 13:42 ` Richard Sandiford
2021-08-02 7:44 ` Richard Biener
2021-08-02 8:05 ` Richard Sandiford [this message]
2021-08-02 8:15 ` Richard Biener
2021-08-02 8:20 ` Richard Sandiford
2021-07-30 14:04 ` Tamar Christina
2021-07-30 14:04 ` Kewen.Lin
2021-08-02 6:07 ` Kewen.Lin
2021-08-02 7:09 ` Richard Biener
2021-08-02 8:35 ` Kewen.Lin
2021-08-02 9:11 ` Richard Biener
2021-08-02 9:20 ` Kewen.Lin
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=mptfsvsff0f.fsf@arm.com \
--to=richard.sandiford@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=linkw@linux.ibm.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).