public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Bill Schmidt <wschmidt@linux.vnet.ibm.com>, gcc-patches@gcc.gnu.org
Cc: ebotcazou@adacore.com, dje.gcc@gmail.com
Subject: Re: [PATCH] Simplify vector compare-not-select sequence
Date: Thu, 09 Jul 2015 03:05:00 -0000	[thread overview]
Message-ID: <559DE51C.6060002@redhat.com> (raw)
In-Reply-To: <1436190062.4922.5.camel@oc8801110288.ibm.com>

On 07/06/2015 07:41 AM, Bill Schmidt wrote:
> Hi,
>
> Due to specifics of the POWER architecture, some forms of a vector
> compare followed by a vector select are represented in RTL as a compare,
> followed by a logical NOT, followed by the select.  This tends to end up
> generating an extra instruction.  This patch adds a case to
> simplify-rtx.c to remove the logical NOT by reversing the outcomes of
> the select.  I've added a POWER-specific test case that demonstrates
> that the issue is fixed.
>
> Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no
> regressions.  Is this ok for trunk?
>
> Thanks,
> Bill
>
>
> [gcc]
>
> 2015-07-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
>
> 	* simplify-rtx.c (simplify_ternary_operation): Add simplification
> 	for (!c) != {0,...,0} ? a : b for vector modes.
>
> [gcc/testsuite]
>
> 2015-07-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
>
> 	* gcc.target/powerpc/vec-cmp-sel.c: New test.
OK.
jeff

  reply	other threads:[~2015-07-09  3:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06 13:41 Bill Schmidt
2015-07-09  3:05 ` Jeff Law [this message]
2015-08-02 10:18 ` Andreas Schwab
2015-08-03 15:16   ` Bill Schmidt
2015-08-03 17:35     ` Andreas Schwab
2015-08-04 14:12       ` Bill Schmidt

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=559DE51C.6060002@redhat.com \
    --to=law@redhat.com \
    --cc=dje.gcc@gmail.com \
    --cc=ebotcazou@adacore.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).