aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2017-02-24 23:41:02 +0100
committerSegher Boessenkool <segher@gcc.gnu.org>2017-02-24 23:41:02 +0100
commit8faa81184f856447084a9ee41a63fc4be6bca572 (patch)
treee71e3f7acaa6f3c6fc50a1cb66335b3a4894ed9e
parent7f811f38cec5a8c81b6acc44776860c7f0bf9ab1 (diff)
downloadgcc-8faa81184f856447084a9ee41a63fc4be6bca572.zip
gcc-8faa81184f856447084a9ee41a63fc4be6bca572.tar.gz
gcc-8faa81184f856447084a9ee41a63fc4be6bca572.tar.bz2
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
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/pa/pa.c26
2 files changed, 17 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a48aeba..35b1609 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2017-02-24 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * 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 <matthew.fortune@imgtec.com>
PR target/79473
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index b0b3311..3f7b2c7 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;
}