public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/115304] gcc.dg/vect/slp-gap-1.c FAILs
Date: Mon, 03 Jun 2024 13:51:43 +0000	[thread overview]
Message-ID: <bug-115304-4-f1cu8NphFx@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-115304-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115304

--- Comment #10 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 3 Jun 2024, ams at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115304
> 
> --- Comment #9 from Andrew Stubbs <ams at gcc dot gnu.org> ---
> (In reply to Richard Biener from comment #6)
> > The best strathegy for GCN would be to gather V4QImode aka SImode into the
> > V64QImode (or V16SImode) vector.  For pix2 we have a gap of 28 elements,
> > doing consecutive loads isn't a good strategy here.
> 
> I don't fully understand what you're trying to say here, so apologies if you
> knew all this already and I missed the point.....
> 
> In general, on GCN V4QImode is not in any way equivalent to SImode (when the
> values are in registers). The vector registers are not one single string of
> re-interpretable bits.
> 
> For the same reason, you can't load a value as V64QImode and then try to
> interpret it as V16SImode. GCN vector registers just don't work like
> SSE/Neon/etc.
> 
> When you load a V64QImode vector, each lane is extended to 32 bits, so what you
> actually get in hardware is a V64SImode vector.
> 
> Likewise, when you load a V4QImode vector the hardware representation is
> actually V4SImode (which in itself is just V64SImode with undefined values in
> the unused lanes).

I see.  I wonder if there's not one or two latent wrong-code because of
this and the vectorizers assumptions ;)  I suppose modes_tieable_p
will tell us whether a VIEW_CONVERT_EXPR will do the right thing?
Is GET_MODE_SIZE (V64QImode) == GET_MODE_SIZE (V64SImode) btw?
And V64QImode really V64PSImode?

Still for a V64QImode load on { c[0], c[1], c[2], c[3], c[32], c[33], 
c[34], c[35], ... } it's probably best to use a single V64QImode gather 
with GCN then rather than four "consecutive" V64QImode loads and then
element swizzling.

  parent reply	other threads:[~2024-06-03 13:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31  8:45 [Bug tree-optimization/115304] New: " ro at gcc dot gnu.org
2024-05-31  8:46 ` [Bug tree-optimization/115304] " ro at gcc dot gnu.org
2024-05-31  8:46 ` ro at gcc dot gnu.org
2024-05-31 12:26 ` rguenth at gcc dot gnu.org
2024-06-03  9:18 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-06-03 10:10 ` tschwinge at gcc dot gnu.org
2024-06-03 10:10 ` tschwinge at gcc dot gnu.org
2024-06-03 10:13 ` tschwinge at gcc dot gnu.org
2024-06-03 12:43 ` rguenth at gcc dot gnu.org
2024-06-03 12:46 ` cvs-commit at gcc dot gnu.org
2024-06-03 12:47 ` rguenth at gcc dot gnu.org
2024-06-03 13:33 ` ams at gcc dot gnu.org
2024-06-03 13:51 ` rguenther at suse dot de [this message]
2024-06-03 14:11 ` ams at gcc dot gnu.org
2024-06-20  5:15 ` pinskia at gcc dot gnu.org
2024-06-20  6:45 ` rguenther at suse dot de

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=bug-115304-4-f1cu8NphFx@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).