https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69609
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- Maybe sth as simple as Index: gcc/bb-reorder.c =================================================================== --- gcc/bb-reorder.c (revision 233262) +++ gcc/bb-reorder.c (working copy) @@ -889,6 +889,7 @@ bb_to_key (basic_block bb) /* Prefer blocks whose predecessor is an end of some trace or whose predecessor edge is EDGE_DFS_BACK. */ + if (EDGE_COUNT (bb->preds) <= 8) FOR_EACH_EDGE (e, ei, bb->preds) { if ((e->src != ENTRY_BLOCK_PTR_FOR_FN (cfun) or precomputing whether a BB has abnormal preds and disabling the trace in that case (or somehow sorting the edge vectors so that abnormal edges come last so we can stop at the first abnormal edge).