http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50823
--- Comment #13 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-06 13:03:40 UTC --- This fixes it: Index: gcc/ipa-inline.c =================================================================== --- gcc/ipa-inline.c (revision 182044) +++ gcc/ipa-inline.c (working copy) @@ -808,7 +808,6 @@ edge_badness (struct cgraph_edge *edge, else if (flag_guess_branch_prob) { int div = edge->frequency * (1<<10) / CGRAPH_FREQ_MAX; - int growth_for_all; div = MAX (div, 1); gcc_checking_assert (edge->frequency <= CGRAPH_FREQ_MAX); @@ -846,14 +845,12 @@ edge_badness (struct cgraph_edge *edge, if (dump) fprintf (dump_file, "Badness overflow\n"); } - growth_for_all = estimate_growth (callee); - badness += growth_for_all; if (dump) { fprintf (dump_file, - " %i: guessed profile. frequency %f, overall growth %i," + " %i: guessed profile. frequency %f," " benefit %f%%, divisor %i\n", - (int) badness, (double)edge->frequency / CGRAPH_FREQ_BASE, growth_for_all, + (int) badness, (double)edge->frequency / CGRAPH_FREQ_BASE, relative_time_benefit (callee_info, edge, time_growth) * 100 / 256.0, div); } } I'm going to bootstrap, test and apply this given that Honza seems to have no interest in fixing his own regressions. [and this particular patch was on my agenda for quite some time]