public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] match_asm_constraints: Use copy_rtx where needed (PR88001)
@ 2018-12-12 20:22 Segher Boessenkool
  2018-12-13 18:09 ` Jeff Law
  0 siblings, 1 reply; 4+ messages in thread
From: Segher Boessenkool @ 2018-12-12 20:22 UTC (permalink / raw)
  To: gcc-patches; +Cc: Segher Boessenkool

The new insn here (temporarily) illegally shares RTL.  This fixes it.

Tested with an ARC cross, and regstrapped on powerpc64-linux {-m32,-m64}.
Is this okay for trunk?


Segher


2018-12-12  Segher Boessenkool  <segher@kernel.crashing.org>

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

---
 gcc/function.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/function.c b/gcc/function.c
index 69523c1..60e96f3 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -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);
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-12-15 12:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-12 20:22 [PATCH] match_asm_constraints: Use copy_rtx where needed (PR88001) Segher Boessenkool
2018-12-13 18:09 ` Jeff Law
2018-12-14  8:26   ` Segher Boessenkool
2018-12-15 12:12   ` Segher Boessenkool

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).