Commit 33e89989 by Jakub Jelinek Committed by Jakub Jelinek

re PR target/69551 (Wrong code with single element vector insert)

	PR target/69551
	* config/i386/i386.c (ix86_expand_vector_set) <case V4SImode>: For
	SSE1, copy target into the temporary reg first before recursing
	on it.

	* gcc.target/i386/pr69551.c: New test.

From-SVN: r232982
parent 26658b7c
2016-01-29 Jakub Jelinek <jakub@redhat.com>
PR target/69551
* config/i386/i386.c (ix86_expand_vector_set) <case V4SImode>: For
SSE1, copy target into the temporary reg first before recursing
on it.
2016-01-29 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/sse.md (sse2_cvtps2pd<mask_name>): Replace vBm
......
......@@ -46744,6 +46744,7 @@ ix86_expand_vector_set (bool mmx_ok, rtx target, rtx val, int elt)
{
/* For SSE1, we have to reuse the V4SF code. */
rtx t = gen_reg_rtx (V4SFmode);
emit_move_insn (t, gen_lowpart (V4SFmode, target));
ix86_expand_vector_set (false, t, gen_lowpart (SFmode, val), elt);
emit_move_insn (target, gen_lowpart (mode, t));
}
2016-01-29 Jakub Jelinek <jakub@redhat.com>
PR target/69551
* gcc.target/i386/pr69551.c: New test.
PR target/66137
* gcc.target/i386/pr66137.c: New test.
......
/* PR target/69551 */
/* { dg-do run { target sse_runtime } } */
/* { dg-options "-O2 -mno-sse2 -msse" } */
typedef unsigned char v16qi __attribute__ ((vector_size (16)));
typedef unsigned int v4si __attribute__ ((vector_size (16)));
char __attribute__ ((noinline, noclone))
test (v4si vec)
{
vec[1] = 0x5fb856;
return ((v16qi) vec)[0];
}
int
main ()
{
char z = test ((v4si) { -1, -1, -1, -1 });
if (z != -1)
__builtin_abort ();
return 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