Hi,
PPC64 lto profiledbootstrap failes because counts get negative in iteger 
scalling.
Because of lost comdat samples, we end up with function called twice being
inlinined into an call happening few thousdand times.  gcov_scale is then large
and apply_scale should not truncate it to 32bit.

Bootstrapped/regtested x86_64-linux, comitted.

Honza

Index: ChangeLog
===================================================================
--- ChangeLog   (revision 202127)
+++ ChangeLog   (working copy)
@@ -1,3 +1,7 @@
+2013-08-31  Jan Hubicka  <j...@suse.cz>
+
+       * basic-block.h (apply_scale): Make scale parmeter gcov_type.
+
 2013-08-31  Uros Bizjak  <ubiz...@gmail.com>
 
        * config/alpha/alpha.c (alpha_emit_conditional_move): Update
Index: basic-block.h
===================================================================
--- basic-block.h       (revision 202100)
+++ basic-block.h       (working copy)
@@ -958,7 +958,7 @@ combine_probabilities (int prob1, int pr
    constrained to be < REG_BR_PROB_BASE.  */
 
 static inline gcov_type
-apply_scale (gcov_type freq, int scale)
+apply_scale (gcov_type freq, gcov_type scale)
 {
   return RDIV (freq * scale, REG_BR_PROB_BASE);
 }

Reply via email to