https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112277
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org Ever confirmed|0 |1 Last reconfirmed| |2023-10-30 Status|UNCONFIRMED |NEW --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. This seems to be a limit of loop splitting which should handle this situation but is hindered by us having only a single forwarder from the branch (on the false edge). It only considers "edges" where it has a block that only executes on the path which makes it not try "both" directions here and fail. (get_cond_invariant_branch, branch_removable_p and the dominance check) if (c_lsm.6_6 < 0) goto <bb 5>; [41.00%] else goto <bb 4>; [59.00%] <bb 4> [local count: 563821836]: <bb 5> [local count: 955630226]: # c_lsm.6_4 = PHI <c_lsm.6_6(4), n.1_2(3)> # c_lsm_flag.7_10 = PHI <c_lsm_flag.7_11(4), 1(3)>