public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bill Schmidt <wschmidt@linux.vnet.ibm.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches@gcc.gnu.org, dje.gcc@gmail.com
Subject: Re: [PATCH, 5.1, rs6000] Fix PR65787
Date: Fri, 17 Apr 2015 16:32:00 -0000	[thread overview]
Message-ID: <1429288364.20720.17.camel@gnopaine> (raw)
In-Reply-To: <1429282924.20720.13.camel@gnopaine>

Hi,

On Fri, 2015-04-17 at 10:02 -0500, Bill Schmidt wrote:
> On Fri, 2015-04-17 at 16:49 +0200, Jakub Jelinek wrote:
> > You have actually mailed the original patch again, not the revised one.
> 
> > That said, PARALLEL seems to be already handled by rtx_is_swappable_p,
> > so if it isn't handled correctly, perhaps there is a bug in that function.
> > 

Quite right.  I've fixed this as you suggested in the attached patch.
Bootstrapped and tested on powerpc64le-linux-gnu with no regressions.
Is this version ok?

Sorry for apparently not knowing my own code as well as I should... :/

Thanks,
Bill


2015-04-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR target/65787
	* config/rs6000/rs6000.c (rtx_is_swappable_p): Remove previous
	fix; ensure that a subsequent SH_NONE operand does not overwrite
	an existing *special value.


Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 222182)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -34204,17 +34204,6 @@ rtx_is_swappable_p (rtx op, unsigned int *special)
       else
 	return 0;
 
-    case PARALLEL:
-      /* A vec_extract operation may be wrapped in a PARALLEL with a
-	 clobber, so account for that possibility.  */
-      if (XVECLEN (op, 0) != 2)
-	return 0;
-
-      if (GET_CODE (XVECEXP (op, 0, 1)) != CLOBBER)
-	return 0;
-
-      return rtx_is_swappable_p (XVECEXP (op, 0, 0), special);
-
     case UNSPEC:
       {
 	/* Various operations are unsafe for this optimization, at least
@@ -34308,6 +34297,8 @@ rtx_is_swappable_p (rtx op, unsigned int *special)
 	{
 	  unsigned int special_op = SH_NONE;
 	  ok &= rtx_is_swappable_p (XVECEXP (op, i, j), &special_op);
+	  if (special_op == SH_NONE)
+	    continue;
 	  /* Ensure we never have two kinds of special handling
 	     for the same insn.  */
 	  if (*special != SH_NONE && special_op != SH_NONE


  reply	other threads:[~2015-04-17 16:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-16 21:46 Bill Schmidt
2015-04-17 12:27 ` Bill Schmidt
2015-04-17 13:28   ` Bill Schmidt
2015-04-17 14:42     ` David Edelsohn
2015-04-17 14:49     ` Jakub Jelinek
2015-04-17 15:02       ` Bill Schmidt
2015-04-17 16:32         ` Bill Schmidt [this message]
2015-04-17 16:40           ` Jakub Jelinek
2015-04-17 17:47             ` Jakub Jelinek
2015-04-17 18:06               ` Bill Schmidt
2015-04-17 18:27                 ` Jakub Jelinek
2015-04-17 19:00                   ` David Edelsohn
2015-04-17 20:29                   ` 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=1429288364.20720.17.camel@gnopaine \
    --to=wschmidt@linux.vnet.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.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).