https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93264
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2020-01-16 CC| |hubicka at gcc dot gnu.org, | |jakub at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- It tries to redirect a crossing jump from cold to hot partition to a new bb that is in cold partition. cfg_layout_redirect_edge_and_branch has code to handle this case, but only if the branch is simplejump: 4429 if (e->flags & EDGE_CROSSING 4430 && BB_PARTITION (e->src) == BB_PARTITION (dest) 4431 && simplejump_p (BB_END (src))) 4432 { 4433 if (dump_file) 4434 fprintf (dump_file, 4435 "Removing crossing jump while redirecting edge form %i to %i\n", 4436 e->src->index, dest->index); 4437 delete_insn (BB_END (src)); 4438 remove_barriers_from_footer (src); 4439 e->flags |= EDGE_FALLTHRU; 4440 } which is not the case here: (insn 577 350 578 27 (set (reg:DI 309) (high:DI (label_ref:DI 220))) "pr71550.c":19:20 -1 (insn_list:REG_LABEL_OPERAND 220 (nil))) (insn 578 577 579 27 (set (reg:DI 308) (lo_sum:DI (reg:DI 309) (label_ref:DI 220))) "pr71550.c":19:20 -1 (insn_list:REG_LABEL_OPERAND 220 (expr_list:REG_EQUAL (label_ref:DI 220) (nil)))) (jump_insn/j 579 578 220 27 (set (pc) (reg:DI 308)) "pr71550.c":19:20 -1 (nil) -> 220) The generic code really doesn't know what it should remove to replace it with the fallthru edge. So, I'd say something in the caller or a few callers up should have punted on it before, but no idea what.