On Mon, Sep 30, 2019 at 7:51 PM Alexander Monakov <amona...@ispras.ru> wrote:
>
> On Mon, 30 Sep 2019, Alexander Monakov wrote:
>
> > +static unsigned
> > +average_cost (unsigned then_cost, unsigned else_cost, edge e)
> > +{
> > +  return else_cost + e->probability.apply ((int) then_cost - else_cost);
>
> Ugh, I made a wrong last-minute edit here, we want signed cost difference so
> the argument to probability.apply should be
>
>   (int) (then_cost - else_cost)
>
> or
>
>   (int) then_cost - (int) else_cost.
>
> The patch I bootstrapped and passed Martin for testing correctly had
>
>   (gcov_type) then_cost - else_cost
>
> (gcov_type is int64).

OK for trunk with that fixed.  Not OK for backports.

Thanks,
Richard.

> Alexander

Reply via email to