https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95654
--- Comment #10 from Tobias Burnus <burnus at gcc dot gnu.org> --- (In reply to Tobias Burnus from comment #9) > See also thread at: > https://gcc.gnu.org/pipermail/gcc-patches/2020-September/thread.html#554054 Regarding the patch there, the proper way is to adapt can_duplicate_block_p, which calls the associated cfg_hooks->can_duplicate_block_p. Currently, there is the stub (in gimple_cfg_hooks) tree-cfg.c: gimple_can_duplicate_bb_p and (for rtl_cfg_hooks and cfg_layout_rtl_cfg_hooks) cfgrtl.c: cfg_layout_can_duplicate_bb_p the latter avoids duplicate tablejumps and calls targetm.cannot_copy_insn_p.