public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Michael Meissner <meissner@linux.ibm.com>,
	David Edelsohn <dje.gcc@gmail.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	Bill Schmidt <wschmidt@linux.ibm.com>,
	Peter Bergner <bergner@linux.ibm.com>,
	Will Schmidt <will_schmidt@vnet.ibm.com>
Subject: Re: [PATCH] Move xx* builtins to vsx.md.
Date: Thu, 19 Aug 2021 17:18:48 -0500	[thread overview]
Message-ID: <20210819221848.GR1583@gate.crashing.org> (raw)
In-Reply-To: <YR7W5t9RW4V7fLI9@toto.the-meissners.org>

On Thu, Aug 19, 2021 at 06:10:46PM -0400, Michael Meissner wrote:
> On Wed, Aug 18, 2021 at 06:11:03PM -0500, Segher Boessenkool wrote:
> > I think the current vector.md / altivec.md / vsx.md / rs6000.md
> > division is artificial at best.  Most of the basic (movement etc.)
> > things are in rs6000.md (and all should be), but nothing else is clear.
> > 
> > The name "altivec.md" suggests it is only for the very old things, but
> > it is not used that way, and that it untenable anyway: we have more
> > recent insns to plug holes in that (for example 64-bit integer support),
> > so it arguably is not just for that.
> > 
> > Using it for instructions that only work on the high 32 VSRs (i.e. the
> > VRs) is quite artificial as well -- sometimes there are equivalent insns
> > for the other 32 VSRs already, sometimes it is just because of opcode
> > scarcity, sometimes it is because it is for the slow vector unit only
> > (but those seem to live in rs6000.md and crypto.md anyway).
> > 
> > Maybe we should give up on dividing these things, and put both in one
> > file, say vector.md?
> 
> Yes but that is more ambitious.

Absolutely.  But setting a destination before starting to walk is
sometimes helpful ;-)

> Basically I have 2 patches coming that use and
> update the xxsplti instructions.  I can avoid putting in this specific change
> and reformulate them for altivec.md instead of vsx.md.  Or I can check in these
> changes.  Which do you want?  I don't want to do both insn movement and new
> patches at the same time.

I am fine with this patch, it is a clear improvement already.

> The original design of vector.md was to allow for alternate vector units, and
> vector.md was just the define_expands.  But the likely hood of new vector units
> is probably low.

Right, history has caught up with us.

> When I wrote vsx.md in the power7 days, we were toying with the notion of doing
> VSX and not Altivec instructions.  But I quickly realized you always need
> Altivec for VSX.

There also were 8-byte vectors back then.  Or was that completely
separate code?

> In general, I would prefer not to have a flag day where everything gets moved
> all at once.

Yup, it is too easy to make mistakes here, ordering in machine
descriptions is significant.  Although comparing the generated insn-*
files before and after might help.


Segher

      reply	other threads:[~2021-08-19 22:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13  4:20 Michael Meissner
2021-08-18 20:01 ` Bill Schmidt
2021-08-18 20:42 ` David Edelsohn
2021-08-18 23:11   ` Segher Boessenkool
2021-08-19 22:10     ` Michael Meissner
2021-08-19 22:18       ` Segher Boessenkool [this message]

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=20210819221848.GR1583@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=bergner@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=meissner@linux.ibm.com \
    --cc=will_schmidt@vnet.ibm.com \
    --cc=wschmidt@linux.ibm.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).