This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix invalid RTL sharing caused by STV changes


I am testing the following and will commit it as obvious.

Richard.

2019-08-21  Richard Biener  <rguenther@suse.de>

	PR target/91498
	* config/i386/i386-features.c
	(general_scalar_chain::make_vector_copies): Copy stack temporary
	rtx when using it multiple times.
	(general_scalar_chain::convert_reg): Likewise.

Index: gcc/config/i386/i386-features.c
===================================================================
--- gcc/config/i386/i386-features.c	(revision 274764)
+++ gcc/config/i386/i386-features.c	(working copy)
@@ -706,7 +706,7 @@ general_scalar_chain::make_vector_copies
 				gen_rtx_SUBREG (SImode, reg, 4));
 	      }
 	    else
-	      emit_move_insn (tmp, reg);
+	      emit_move_insn (copy_rtx (tmp), reg);
 	    emit_insn (gen_rtx_SET (gen_rtx_SUBREG (vmode, vreg, 0),
 				    gen_gpr_to_xmm_move_src (vmode, tmp)));
 	  }
@@ -810,7 +810,7 @@ general_scalar_chain::convert_reg (unsig
 				  adjust_address (tmp, SImode, 4));
 		}
 	      else
-		emit_move_insn (scopy, tmp);
+		emit_move_insn (scopy, copy_rtx (tmp));
 	    }
 	  else if (!TARGET_64BIT && smode == DImode)
 	    {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]