https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92788
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The problem is exactly in the EH edge purging being delayed, if it would be done before thread_through_all_blocks, then it might work. But not sure if the edge purging doesn't invalidate something that thread_through_all_blocks relies on (and we'd need to repeat the EH edge purging after thread_through_all_blcoks).