This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix merging of 2 predictors (PR tree-optimization/86925).
- From: Jeff Law <law at redhat dot com>
- To: Martin Liška <mliska at suse dot cz>, gcc-patches at gcc dot gnu dot org
- Cc: Jan Hubicka <hubicka at ucw dot cz>
- Date: Tue, 14 Aug 2018 22:20:02 -0600
- Subject: Re: [PATCH] Fix merging of 2 predictors (PR tree-optimization/86925).
- References: <be73e285-f871-b297-bd55-bc399efc8ed0@suse.cz>
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 <mliska@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 <mliska@suse.cz>
>
> PR tree-optimization/86925
> * gcc.dg/predict-20.c: New test.
> * gcc.dg/predict-21.c: New test.
OK.
jeff