match_asm_constraints: Use copy_rtx where needed (PR88001)
authorSegher Boessenkool <segher@kernel.crashing.org>
Fri, 14 Dec 2018 08:29:34 +0000 (09:29 +0100)
committerSegher Boessenkool <segher@gcc.gnu.org>
Fri, 14 Dec 2018 08:29:34 +0000 (09:29 +0100)
The new insn here (temporarily) illegally shares RTL.  This fixes it.

PR rtl-optimization/88001
* function.c (match_asm_constraints_1): Don't invalidly share RTL.

From-SVN: r267122

gcc/ChangeLog
gcc/function.c

index 39521bc129e95a5549b97bf2bfb392e40b88bdf5..6222a3f74ef554ebff5f5a66a8a236344be0863e 100644 (file)
@@ -1,3 +1,8 @@
+2018-12-14  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       PR rtl-optimization/88001
+       * function.c (match_asm_constraints_1): Don't invalidly share RTL.
+
 2018-12-14  Bin Cheng  <bin.cheng@linux.alibaba.com>
 
        * auto-profile.c (afdo_annotate_cfg): Call update_max_bb_count even
index 69523c1d72309b7ba0e7a0e6ccfadcd3974dac75..60e96f30ccb672de832a5ba921180f89dbd9858e 100644 (file)
@@ -6529,7 +6529,7 @@ match_asm_constraints_1 (rtx_insn *insn, rtx *p_sets, int noutputs)
       output_matched[match] = true;
 
       start_sequence ();
-      emit_move_insn (output, input);
+      emit_move_insn (output, copy_rtx (input));
       insns = get_insns ();
       end_sequence ();
       emit_insn_before (insns, insn);