https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100934
--- Comment #7 from Jeffrey A. Law <law at gcc dot gnu.org> --- So when we're finding jump threads we know if we thread through the loop latch and we note when that's going to create an irreducible region. We generally suppress threading through the latch before the loop optimizers have run, but allow it afterwards. But I'm not aware of a really good place to adjust the loop bound estimates, particularly for the backwards threader. THe backwards threader uses copy_bbs API, so much of the guts of what's happening is opaque. Peek at jump_thread_path_registry:::duplicate_thread_path. All the backwards threader bits go through there at some point.