https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83189
--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> --- The fix at updating time is to promote to non-guessed 0 when it is demanded. Index: tree-ssa-loop-manip.c =================================================================== --- tree-ssa-loop-manip.c (revision 256419) +++ tree-ssa-loop-manip.c (working copy) @@ -1378,7 +1378,8 @@ tree_transform_and_unroll_loop (struct l { /* Avoid dropping loop body profile counter to 0 because of zero count in loop's preheader. */ - freq_e = freq_e.force_nonzero (); + if (freq_h.nonzero_p () && !(freq_e == profile_count::zero ())) + freq_e = freq_e.force_nonzero (); scale_loop_frequencies (loop, freq_e.probability_in (freq_h)); } What is odd however is that predictive comonning is trying to do something about loop executed 0 times. This should be fixed incrementally though. I will test this change.