https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110649
Jan Hubicka <hubicka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=10647 Ever confirmed|0 |1 Last reconfirmed| |2023-07-14 Status|UNCONFIRMED |NEW --- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Thanks for bisecting this! We also have PR10647 which is tracked to this change. The change correct loop profile after header copying: test() { for (int i = 0; i < 10; i++) test2(); } has probability of exit conditional 90.9% before loop header copying (since it technically iterates 10 times) while after loop header copying and optimizing out the constant "if (0<10)" test it has only 90% loopback probability. So probably fixing the bug above triggers something else. I will first look at PR10647 and see if I can figure out what is going on there.