https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107876
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- It's a latent issue before this rev. since clean_up_after_unswitching ends up removing all exit edges from one copy, keeping an infinite loop. The function uses remove_edge () for this, not remove_edge_and_dominated_blocks. Testing a patch.