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
This commit is contained in:
parent
26658b7c9e
commit
33e89989f6
4 changed files with 34 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
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));
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
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.
|
||||
|
||||
|
|
23
gcc/testsuite/gcc.target/i386/pr69551.c
Normal file
23
gcc/testsuite/gcc.target/i386/pr69551.c
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* 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;
|
||||
}
|
Loading…
Add table
Reference in a new issue