https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85964
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- For the FSM part since we walk the whole function for _each_ control stmt name this analysis part, find_jump_threads_backwards (basic_block bb, bool speed_p), is quadratic in the number of BBs. There's limiting via PARAM_FSM_MAXIMUM_PHI_ARGUMENTS but I guess it should instead limit itself on the maximum length of a jump threading path and do that already during analysis rather than only later throwing away non-profitable ones.