Fix invalid RTL sharing caused by STV changes
diff mbox series

Message ID alpine.LSU.2.20.1908210925040.32458@zhemvz.fhfr.qr
State New
Headers show
Series
  • Fix invalid RTL sharing caused by STV changes
Related show

Commit Message

Richard Biener Aug. 21, 2019, 7:25 a.m. UTC
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.

Patch
diff mbox series

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)
 	    {