profile-count.c (safe_scale_64bit): Fix GCC4.x path.
authorJan Hubicka <hubicka@ucw.cz>
Thu, 12 Oct 2017 18:48:59 +0000 (20:48 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 12 Oct 2017 18:48:59 +0000 (18:48 +0000)
commit83d502cf40077b7115c8e6342218186223a42474
treeaf470e3cd4226d18bee47f5dc8c2f23cb9ac0e07
parent8b48488fbe122c3fa56be84fd048846207466eb0
profile-count.c (safe_scale_64bit): Fix GCC4.x path.

* profile-count.c (safe_scale_64bit): Fix GCC4.x path.
(profile_probability): Set max_probability
to (uint32_t) 1 << (n_bits - 2) and update accessors to avoid overlfows
in temporaries.
* profile-count.c (profile_probability::differs_from_p): Do not
rely on max_probaiblity == 10000

* gcc.dg/predict-13.c: Update template for probaility change.
* gcc.dg/predict-8.c: Likewise.

From-SVN: r253692
gcc/ChangeLog
gcc/profile-count.c
gcc/profile-count.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/ipa/inlinehint-4.c
gcc/testsuite/gcc.dg/predict-13.c
gcc/testsuite/gcc.dg/predict-8.c