public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Edelsohn <dje.gcc@gmail.com>
To: Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH, rs6000] Improve swap optimization to modify general xxpermdi patterns
Date: Mon, 31 Aug 2015 00:23:00 -0000	[thread overview]
Message-ID: <CAGWvny=O2Hv6afu0RfF0FGsL0+Eir8Ji28sdV4D6qD7JdDxssQ@mail.gmail.com> (raw)
In-Reply-To: <1440976788.4682.15.camel@gnopaine>

On Sun, Aug 30, 2015 at 7:19 PM, Bill Schmidt
<wschmidt@linux.vnet.ibm.com> wrote:
> Hi,
>
> The VSX swap optimization currently misses opportunities to optimize
> loops when expressions corresponding to xxpermdi instructions are
> present (other than xxswapd instructions associated with loads and
> stores).  These occur commonly when interleaving vector double or vector
> unsigned long operands, or when concatenating two doubles or unsigned
> longs to make a V2DI or V2DF result.  This patch adds logic to recognize
> these insns and adjust them to account for swapped doublewords in the
> computation.
>
> Both opportunities arise in a simple test case that performs a reduction
> on complex multiplications, which I've added here.
>
> Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no
> regressions.  Is this ok for trunk?
>
> Thanks,
> Bill
>
>
> [gcc]
>
> 2015-08-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
>
>         * config/rs6000/rs6000.c (swap_web_entry): Enlarge
>         special_handling bitfield.
>         (special_handling_values): Add SH_XXPERMDI and SH_CONCAT.
>         (rtx_is_swappable_p): Add handling for vec_select/vec_concat
> form
>         that represents a general xxpermdi.
>         (insn_is_swappable_p): Add handling for vec_concat of two
>         doublewords, which maps to a specific xxpermdi.
>         (adjust_xxpermdi): New function.
>         (adjust_concat): Likewise.
>         (handle_special_swappables): Call adjust_xxpermdi and
>         adjust_concat.
>         (dump_swap_insn_table): Handle SH_XXPERMDI and SH_CONCAT.
>
> [gcc/testsuite]
>
> 2015-08-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
>
>         * gcc.target/powerpc/swaps-p8-19.c: New test.

Okay.

Thanks, David

      reply	other threads:[~2015-08-31  0:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-31  0:08 Bill Schmidt
2015-08-31  0:23 ` David Edelsohn [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='CAGWvny=O2Hv6afu0RfF0FGsL0+Eir8Ji28sdV4D6qD7JdDxssQ@mail.gmail.com' \
    --to=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=wschmidt@linux.vnet.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).