This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, 5.1, rs6000] Fix PR65787
- From: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, dje dot gcc at gmail dot com
- Date: Fri, 17 Apr 2015 13:06:22 -0500
- Subject: Re: [PATCH, 5.1, rs6000] Fix PR65787
- Authentication-results: sourceware.org; auth=none
- References: <1429220775 dot 20720 dot 4 dot camel at gnopaine> <1429273663 dot 20720 dot 6 dot camel at gnopaine> <1429277282 dot 20720 dot 8 dot camel at gnopaine> <20150417144938 dot GR1725 at tucnak dot redhat dot com> <1429282924 dot 20720 dot 13 dot camel at gnopaine> <1429288364 dot 20720 dot 17 dot camel at gnopaine> <20150417163959 dot GS1725 at tucnak dot redhat dot com> <20150417174652 dot GT1725 at tucnak dot redhat dot com>
Yep, thanks -- I just finished testing that, and it fixes the problem
with no regressions. Thanks for the help.
Is this ok to commit?
Thanks,
Bill
On Fri, 2015-04-17 at 19:46 +0200, Jakub Jelinek wrote:
> On Fri, Apr 17, 2015 at 06:39:59PM +0200, Jakub Jelinek wrote:
> > The " && special_op != SH_NONE" test from the second if can go then,
> > because it is never true. And I'd really think that you shouldn't change
> > just the fmt[i] == 'E' handling, but also the fmt[i] == 'e' || fmt[i] == 'u'
> > handling a few lines earlier (both the added
> > "if (special_op == SH_NONE) continue;" there and
> > removal of " && special_op != SH_NONE".
>
> In particular, this is what I had in mind.
>
> 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.
>
> --- gcc/config/rs6000/rs6000.c.jj 2015-04-17 19:09:59.000000000 +0200
> +++ gcc/config/rs6000/rs6000.c 2015-04-17 19:28:43.264784372 +0200
> @@ -34204,17 +34204,6 @@ rtx_is_swappable_p (rtx op, unsigned int
> 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
> @@ -34296,10 +34285,11 @@ rtx_is_swappable_p (rtx op, unsigned int
> {
> unsigned int special_op = SH_NONE;
> ok &= rtx_is_swappable_p (XEXP (op, i), &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
> - && *special != special_op)
> + if (*special != SH_NONE && *special != special_op)
> return 0;
> *special = special_op;
> }
> @@ -34308,10 +34298,11 @@ rtx_is_swappable_p (rtx op, unsigned int
> {
> 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
> - && *special != special_op)
> + if (*special != SH_NONE && *special != special_op)
> return 0;
> *special = special_op;
> }
>
>
> Jakub
>
- References:
- [PATCH, 5.1, rs6000] Fix PR65787
- Re: [PATCH, 5.1, rs6000] Fix PR65787
- Re: [PATCH, 5.1, rs6000] Fix PR65787
- Re: [PATCH, 5.1, rs6000] Fix PR65787
- Re: [PATCH, 5.1, rs6000] Fix PR65787
- Re: [PATCH, 5.1, rs6000] Fix PR65787
- Re: [PATCH, 5.1, rs6000] Fix PR65787
- Re: [PATCH, 5.1, rs6000] Fix PR65787