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: Jakub Jelinek <jakub at redhat dot com>
- To: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, dje dot gcc at gmail dot com
- Date: Fri, 17 Apr 2015 16:49:38 +0200
- 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>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Apr 17, 2015 at 08:28:02AM -0500, Bill Schmidt wrote:
> On Fri, 2015-04-17 at 07:27 -0500, Bill Schmidt wrote:
> > Note that Jakub requested a small change in the bugzilla commentary,
> > which I've implemented. I'm doing a regstrap now.
> >
> > Bill
> >
>
> Here's the revised and tested patch. OK for trunk and gcc-5-branch?
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.
for (i = 0; i < GET_RTX_LENGTH (code); ++i)
if (fmt[i] == 'e' || fmt[i] == 'u')
{
unsigned int special_op = SH_NONE;
ok &= rtx_is_swappable_p (XEXP (op, i), &special_op);
/* Ensure we never have two kinds of special handling
for the same insn. */
if (*special != SH_NONE && special_op != SH_NONE
&& *special != special_op)
return 0;
*special = special_op;
}
else if (fmt[i] == 'E')
for (j = 0; j < XVECLEN (op, i); ++j)
{
unsigned int special_op = SH_NONE;
ok &= rtx_is_swappable_p (XVECEXP (op, i, j), &special_op);
/* Ensure we never have two kinds of special handling
for the same insn. */
if (*special != SH_NONE && special_op != SH_NONE
&& *special != special_op)
return 0;
*special = special_op;
}
If the comments are correct, then supposedly if say on the PARALLEL with
a SET that is SH_EXTRACT and a CLOBBER that is SH_NONE, both returning 1,
the outcome should by return 1 (that is the case), but *special should be
SH_EXTRACT, rather than the last case wins right now (SH_NONE).
If so, then perhaps after each of the ok &= rtx_is_swappable_p ...
line should be
if (special_op == SH_NONE)
continue;
so that we never store SH_NONE (leave that just to the initial store), and
then just
if (*special != SH_NONE && *special != special_op)
return 0;
Jakub