https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110640
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- We end up with <bb 10> [local count: 78745003]: <bb 11> [local count: 78745003]: *c.5_6 = _7; f.7_32 = f; if (f.7_32 != 0) goto <bb 12>; [89.00%] else goto <bb 10>; [11.00%] <bb 12> [local count: 70083053]: f = 0; goto <bb 10>; [100.00%] disabling loop header copying (-fdisable-tree-ch2) also avoids the issue.