Commit d5d9703a by Uros Bizjak Committed by Uros Bizjak

i386.c (dimode_scalar_chain::convert_reg): Use pextrd for TARGET_SSE4_1 when creating scalar copy.

	* config/i386/i386.c (dimode_scalar_chain::convert_reg):
	Use pextrd for TARGET_SSE4_1 when creating scalar copy.

From-SVN: r245161
parent 86010a08
2017-02-03 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (dimode_scalar_chain::convert_reg):
Use pextrd for TARGET_SSE4_1 when creating scalar copy.
2017-02-03 Walter Lee <walt@tilera.com>
PR target/78862
......
......@@ -3622,11 +3622,26 @@ dimode_scalar_chain::convert_reg (unsigned regno)
if (scalar_copy)
{
rtx vcopy = gen_reg_rtx (V2DImode);
start_sequence ();
if (TARGET_INTER_UNIT_MOVES_FROM_VEC)
if (TARGET_SSE4_1)
{
rtx tmp = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (1, const0_rtx));
emit_insn
(gen_rtx_SET
(gen_rtx_SUBREG (SImode, scopy, 0),
gen_rtx_VEC_SELECT (SImode,
gen_rtx_SUBREG (V4SImode, reg, 0), tmp)));
tmp = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (1, const1_rtx));
emit_insn
(gen_rtx_SET
(gen_rtx_SUBREG (SImode, scopy, 4),
gen_rtx_VEC_SELECT (SImode,
gen_rtx_SUBREG (V4SImode, reg, 0), tmp)));
}
else if (TARGET_INTER_UNIT_MOVES_FROM_VEC)
{
rtx vcopy = gen_reg_rtx (V2DImode);
emit_move_insn (vcopy, gen_rtx_SUBREG (V2DImode, reg, 0));
emit_move_insn (gen_rtx_SUBREG (SImode, scopy, 0),
gen_rtx_SUBREG (SImode, vcopy, 0));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment