This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH], PR target/81593, Optimize PowerPC vector sets coming from a vector extracts
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Date: Thu, 3 Aug 2017 10:01:41 -0500
- Subject: Re: [PATCH], PR target/81593, Optimize PowerPC vector sets coming from a vector extracts
- Authentication-results: sourceware.org; auth=none
- References: <20170727232113.GA8723@ibm-tiger.the-meissners.org> <20170728210848.GC13471@gate.crashing.org> <20170802142855.GA11603@ibm-tiger.the-meissners.org>
Hi Mike,
On Wed, Aug 02, 2017 at 10:28:55AM -0400, Michael Meissner wrote:
> On Fri, Jul 28, 2017 at 04:08:50PM -0500, Segher Boessenkool wrote:
> > I think calling this with the rtx elementN args makes this only more
> > complicated (the function comment doesn't say what they are or what
> > NULL means, btw).
You didn't handle the first part of this as far as I see? It's the
big complicating issue here.
> + If ELEMENT1 is null, use the top 64-bit double word of ARG1. If it is
> + non-NULL, it is a 0 or 1 constant that gives the vector element number to
> + use for extracting the 64-bit double word from ARG1.
> +
> + If ELEMENT2 is null, use the top 64-bit double word of ARG2. If it is
> + non-NULL, it is a 0 or 1 constant that gives the vector element number to
> + use for extracting the 64-bit double word from ARG2.
> +
> + The element number is based on the user element ordering, set by the
> + endianess and by the -maltivec={le,be} options. */
("endianness", two n's).
I don't like using NULL as a magic value at all; it does not simplify
this interface, it complicates it instead.
Can you move the "which half is high" decision to the callers?
Segher