From 8faa81184f856447084a9ee41a63fc4be6bca572 Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Fri, 24 Feb 2017 23:41:02 +0100 Subject: [PATCH] pa: Fixes for RTL checking * config/pa/pa.c (pa_combine_instructions): Do not share RTL. Make the special USEs with the pattern of the insn, not the insn itself. From-SVN: r245726 --- gcc/ChangeLog | 5 +++++ gcc/config/pa/pa.c | 26 ++++++++++++-------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a48aebafd8d..35b1609da1f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-02-24 Segher Boessenkool + + * config/pa/pa.c (pa_combine_instructions): Do not share RTL. Make + the special USEs with the pattern of the insn, not the insn itself. + 2017-02-24 Matthew Fortune PR target/79473 diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index b0b331175fb..3f7b2c71a2f 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -9178,17 +9178,17 @@ pa_combine_instructions (void) || anchor_attr == PA_COMBINE_TYPE_FMPY)) { /* Emit the new instruction and delete the old anchor. */ - emit_insn_before (gen_rtx_PARALLEL - (VOIDmode, - gen_rtvec (2, PATTERN (anchor), - PATTERN (floater))), - anchor); + rtvec vtemp = gen_rtvec (2, copy_rtx (PATTERN (anchor)), + copy_rtx (PATTERN (floater))); + rtx temp = gen_rtx_PARALLEL (VOIDmode, vtemp); + emit_insn_before (temp, anchor); SET_INSN_DELETED (anchor); /* Emit a special USE insn for FLOATER, then delete the floating insn. */ - emit_insn_before (gen_rtx_USE (VOIDmode, floater), floater); + temp = copy_rtx (PATTERN (floater)); + emit_insn_before (gen_rtx_USE (VOIDmode, temp), floater); delete_insn (floater); continue; @@ -9196,21 +9196,19 @@ pa_combine_instructions (void) else if (floater && anchor_attr == PA_COMBINE_TYPE_UNCOND_BRANCH) { - rtx temp; /* Emit the new_jump instruction and delete the old anchor. */ - temp - = emit_jump_insn_before (gen_rtx_PARALLEL - (VOIDmode, - gen_rtvec (2, PATTERN (anchor), - PATTERN (floater))), - anchor); + rtvec vtemp = gen_rtvec (2, copy_rtx (PATTERN (anchor)), + copy_rtx (PATTERN (floater))); + rtx temp = gen_rtx_PARALLEL (VOIDmode, vtemp); + temp = emit_jump_insn_before (temp, anchor); JUMP_LABEL (temp) = JUMP_LABEL (anchor); SET_INSN_DELETED (anchor); /* Emit a special USE insn for FLOATER, then delete the floating insn. */ - emit_insn_before (gen_rtx_USE (VOIDmode, floater), floater); + temp = copy_rtx (PATTERN (floater)); + emit_insn_before (gen_rtx_USE (VOIDmode, temp), floater); delete_insn (floater); continue; } -- 2.30.2