https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82831
--- Comment #18 from Martin Liška <marxin at gcc dot gnu.org> --- > The result is suboptimal though, since you end up with a (cold) block in the > hot partition whose only predecessors are in the cold partition. What > happens in this case if copy_bb_p returns false for the problematic block, > i.e. if you move the test I added lines 579-584 into the copy_bb_p predicate > itself? Does this result in a better reordered sequence of blocks? Can you please cook a patch for that which I can test?