On Fri, Sep 28, 2012 at 10:43 PM, Jan Hubicka <hubi...@ucw.cz> wrote: > Hi, > shrink_wrap_one_built_in_call forgets to update counts.
Hi, Can you look at the one-liner from http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00794.html too, please? The patch there is this: Index: tree-ssa-tail-merge.c =================================================================== --- tree-ssa-tail-merge.c (revision 191129) +++ tree-ssa-tail-merge.c (working copy) @@ -1478,6 +1478,8 @@ bb2->frequency = BB_FREQ_MAX; bb1->frequency = 0; + bb2->count += bb1->count; + /* Do updates that use bb1, before deleting bb1. */ release_last_vdef (bb1); same_succ_flush_bb (bb1); That looks correct to me, but you're much more familiar with this code than I am :-) Ciao! Steven