* profile-count.c (safe_scale_64bit): Fix GCC4.x path.
commit9c0c95d80b9e6769fb36bd50a05c9c7d81e66504
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 12 Oct 2017 18:48:59 +0000 (12 18:48 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 12 Oct 2017 18:48:59 +0000 (12 18:48 +0000)
treeaf470e3cd4226d18bee47f5dc8c2f23cb9ac0e07
parent261fc575195492afbedce5ebd872a2a25fe6efb1
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253692 138bc75d-0d04-0410-961f-82ee72b054a4
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