On Mon, 24 Jun 2019 at 19:51, Richard Sandiford
<richard.sandif...@arm.com> wrote:
>
> Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> writes:
> > @@ -1415,6 +1460,19 @@ forward_propagate_into (df_ref use)
> >    if (!def_set)
> >      return false;
> >
> > +  if (reg_prop_only
> > +      && !REG_P (SET_SRC (def_set))
> > +      && !REG_P (SET_DEST (def_set)))
> > +    return false;
>
> This should be:
>
>   if (reg_prop_only
>       && (!REG_P (SET_SRC (def_set)) || !REG_P (SET_DEST (def_set))))
>     return false;
>
> so that we return false if either operand isn't a register.
Oops, sorry about that  -:(
>
> > +
> > +  /* Allow propagations into a loop only for reg-to-reg copies, since
> > +     replacing one register by another shouldn't increase the cost.  */
> > +
> > +  if (DF_REF_BB (def)->loop_father != DF_REF_BB (use)->loop_father
> > +      && !REG_P (SET_SRC (def_set))
> > +      && !REG_P (SET_DEST (def_set)))
> > +    return false;
>
> Same here.
>
> OK with that change, thanks.
Thanks for the review, will make the changes and commit the patch
after re-testing.

Thanks,
Prathamesh
>
> Richard

Reply via email to