On Wed, Jan 2, 2019 at 12:14 PM Martin Liška <mli...@suse.cz> wrote:
>
> Hi.
>
> Following patch moves a probability calculation to a place where
> it's really used. Otherwise one can end up with division by zero
> that can't happen as there's no edge for which the probability
> would be used.
>
> Patch survives tests on x86_64-linux-gnu and bootstrap fine.
>
> Ready for trunk?
OK.

Richard.

> Thanks,
> Martin
>
> gcc/ChangeLog:
>
> 2019-01-02  Martin Liska  <mli...@suse.cz>
>
>         PR tree-optimization/88650
>         * predict.c (set_even_probabilities): Calculate probability
>         remainer only when really used.
>
> gcc/testsuite/ChangeLog:
>
> 2019-01-02  Martin Liska  <mli...@suse.cz>
>
>         PR tree-optimization/88650
>         * gfortran.dg/predict-3.f90: New test.
> ---
>  gcc/predict.c                           | 16 +++++++-------
>  gcc/testsuite/gfortran.dg/predict-3.f90 | 28 +++++++++++++++++++++++++
>  2 files changed, 37 insertions(+), 7 deletions(-)
>  create mode 100644 gcc/testsuite/gfortran.dg/predict-3.f90
>
>

Reply via email to