https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68523
--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> --- Scratch that, ch changes the loop but is not the culprit. Note there is one further edge at expand time: 2->9 with prob 0%. This is created by unswitch. The transform is fine afaics, but it doesn't update the execution freqs properly, giving the wrong counts here.