[PATCH] Fix PR 61225
Segher Boessenkool
segher@kernel.crashing.org
Wed Dec 10 13:47:00 GMT 2014
On Tue, Dec 09, 2014 at 12:15:30PM -0700, Jeff Law wrote:
> >>@@ -3323,7 +3396,11 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn
> >>*i1, rtx_insn *i0,
> >> rtx old = newpat;
> >> total_sets = 1 + extra_sets;
> >> newpat = gen_rtx_PARALLEL (VOIDmode, rtvec_alloc (total_sets));
> >>- XVECEXP (newpat, 0, 0) = old;
> >>+
> >>+ if (to_combined_insn)
> >>+ XVECEXP (newpat, 0, --total_sets) = old;
> >>+ else
> >>+ XVECEXP (newpat, 0, 0) = old;
> >> }
> >
> >Is this correct? If so, it needs a big fat comment, because it is
> >not exactly obvious :-)
> >
> >Also, it doesn't handle at all the case where the new pattern already is
> >a PARALLEL; can that never happen?
> I'd convinced myself it was. But yes, a comment here would be good.
>
> Presumably you're thinking about a PARALLEL that satisfies single_set_p?
I wasn't thinking about anything in particular; this code does not handle
a PARALLEL newpat with to_combined_insn correctly, and it doesn't say it
cannot happen.
But yes, I don't see why it could not happen? E.g. a parallel of multiple
sets with all but one of those dead?
Why should it be single_set here anyway? (Maybe I need more coffee, sorry
if so).
Segher
More information about the Gcc-patches
mailing list