+ /* If we are partitioning hot/cold basic_blocks, we don't want to mess
+ up jumps that cross between hot/cold sections.
+
+ Basic block partitioning may result in some jumps that appear
+ to be optimizable (or blocks that appear to be mergeable), but which
+ really must be left untouched (they are required to make it safely
+ across partition boundaries). See the comments at the top of
+ bb-reorder.c:partition_hot_cold_basic_blocks for complete
+ details. */
+
+ if (flag_reorder_blocks_and_partition
+ && first != EXIT_BLOCK_PTR
+ && find_reg_note (BB_END (first), REG_CROSSING_JUMP, NULL_RTX))
+ return false;
+