On 08/13/2018 06:58 AM, Martin Liška wrote:
> Hi.
>
> Following patch handles and issue seen in Linux kernel. It's about
> __builtin_expects seen in a PHI node.
>
> Another issue I saw is compilation with -frounding-math. In that case
> we should use non-rounding math for folding of probability value in
> __builtin_with_probability.
>
> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
>
> Ready to be installed?
> Martin
>
> gcc/ChangeLog:
>
> 2018-08-13 Martin Liska <mli...@suse.cz>
>
> PR tree-optimization/86925
> * predict.c (expr_expected_value_1): When taking
> later predictor, assign also probability.
> Use fold_build2_initializer_loc in order to fold
> the expression in -frounding-math.
>
> gcc/testsuite/ChangeLog:
>
> 2018-08-13 Martin Liska <mli...@suse.cz>
>
> PR tree-optimization/86925
> * gcc.dg/predict-20.c: New test.
> * gcc.dg/predict-21.c: New test.
OK.
jeff