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