From: Eric Botcazou Date: Tue, 2 Oct 2018 10:20:08 +0000 (+0000) Subject: reorg.c (make_return_insns): Use emit_copy_of_insn_after for the insns in the delay... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5d11b4bf36d7fc16f634a9d508ab5cc2ec47ab8d;p=gcc.git reorg.c (make_return_insns): Use emit_copy_of_insn_after for the insns in the delay slot and add_insn_after... * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the insns in the delay slot and add_insn_after for the jump insn. From-SVN: r264780 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 025f809eb60..25026fce591 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-10-02 Eric Botcazou + + * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the + insns in the delay slot and add_insn_after for the jump insn. + 2018-10-02 Richard Biener * tree-inline.c (expand_call_inline): Use the location of diff --git a/gcc/reorg.c b/gcc/reorg.c index f8a986cea1d..2f0ed547d27 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -3638,18 +3638,13 @@ make_return_insns (rtx_insn *first) insns for its delay slots, if it needs some. */ if (ANY_RETURN_P (PATTERN (jump_insn))) { - rtx_insn *prev = PREV_INSN (insn); + rtx_insn *after = PREV_INSN (insn); delete_related_insns (insn); - for (i = 1; i < XVECLEN (pat, 0); i++) - { - rtx_insn *in_seq_insn = as_a (XVECEXP (pat, 0, i)); - prev = emit_insn_after_setloc (PATTERN (in_seq_insn), prev, - INSN_LOCATION (in_seq_insn)); - } - - insn = emit_jump_insn_after_setloc (PATTERN (jump_insn), prev, - INSN_LOCATION (jump_insn)); + insn = jump_insn; + for (i = 1; i < pat->len (); i++) + after = emit_copy_of_insn_after (pat->insn (i), after); + add_insn_after (insn, after, NULL); emit_barrier_after (insn); if (slots)