Fix merging of 2 predictors (PR tree-optimization/86925).
authorMartin Liska <mliska@suse.cz>
Wed, 15 Aug 2018 08:55:15 +0000 (10:55 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 15 Aug 2018 08:55:15 +0000 (08:55 +0000)
commit7c8357def14d184fd95d506f0155c62a7141a921
treef6bc1fc8f9dbd6e1c5544d6c8d9a027c792a424e
parent0806181f233acd921de0881a65423eafc7cf8a5e
Fix merging of 2 predictors (PR tree-optimization/86925).

2018-08-15  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.
2018-08-15  Martin Liska  <mliska@suse.cz>

        PR tree-optimization/86925
* gcc.dg/predict-20.c: New test.
* gcc.dg/predict-21.c: New test.

From-SVN: r263552
gcc/ChangeLog
gcc/predict.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/predict-20.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/predict-21.c [new file with mode: 0644]