Commit 8eef33ca by Richard Guenther Committed by Richard Biener

re PR target/52407 (sse2 simd uint32_t and int64_t and stack variable initialization)

2012-02-28  Richard Guenther  <rguenther@suse.de>

	PR target/52407
	* config/i386/i386.c (ix86_expand_vector_set): Fix element
	ordering for the VEC_CONCAT for two element vectors for
	V2SFmode, V2SImode and V2DImode.

	* gcc.dg/torture/pr52407.c: New testcase.

From-SVN: r184627
parent e3ed9d60
2012-02-28 Richard Guenther <rguenther@suse.de>
PR target/52407
* config/i386/i386.c (ix86_expand_vector_set): Fix element
ordering for the VEC_CONCAT for two element vectors for
V2SFmode, V2SImode and V2DImode.
2012-02-28 Richard Earnshaw <rearnsha@arm.com> 2012-02-28 Richard Earnshaw <rearnsha@arm.com>
PR target/49448 PR target/49448
......
...@@ -33562,9 +33562,9 @@ ix86_expand_vector_set (bool mmx_ok, rtx target, rtx val, int elt) ...@@ -33562,9 +33562,9 @@ ix86_expand_vector_set (bool mmx_ok, rtx target, rtx val, int elt)
tmp = gen_reg_rtx (GET_MODE_INNER (mode)); tmp = gen_reg_rtx (GET_MODE_INNER (mode));
ix86_expand_vector_extract (true, tmp, target, 1 - elt); ix86_expand_vector_extract (true, tmp, target, 1 - elt);
if (elt == 0) if (elt == 0)
tmp = gen_rtx_VEC_CONCAT (mode, tmp, val);
else
tmp = gen_rtx_VEC_CONCAT (mode, val, tmp); tmp = gen_rtx_VEC_CONCAT (mode, val, tmp);
else
tmp = gen_rtx_VEC_CONCAT (mode, tmp, val);
emit_insn (gen_rtx_SET (VOIDmode, target, tmp)); emit_insn (gen_rtx_SET (VOIDmode, target, tmp));
return; return;
} }
...@@ -33578,9 +33578,9 @@ ix86_expand_vector_set (bool mmx_ok, rtx target, rtx val, int elt) ...@@ -33578,9 +33578,9 @@ ix86_expand_vector_set (bool mmx_ok, rtx target, rtx val, int elt)
tmp = gen_reg_rtx (GET_MODE_INNER (mode)); tmp = gen_reg_rtx (GET_MODE_INNER (mode));
ix86_expand_vector_extract (false, tmp, target, 1 - elt); ix86_expand_vector_extract (false, tmp, target, 1 - elt);
if (elt == 0) if (elt == 0)
tmp = gen_rtx_VEC_CONCAT (mode, tmp, val);
else
tmp = gen_rtx_VEC_CONCAT (mode, val, tmp); tmp = gen_rtx_VEC_CONCAT (mode, val, tmp);
else
tmp = gen_rtx_VEC_CONCAT (mode, tmp, val);
emit_insn (gen_rtx_SET (VOIDmode, target, tmp)); emit_insn (gen_rtx_SET (VOIDmode, target, tmp));
return; return;
2012-02-28 Richard Guenther <rguenther@suse.de>
PR target/52407
* gcc.dg/torture/pr52407.c: New testcase.
2012-02-28 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> 2012-02-28 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* gcc.target/arm/vfp1.c (dg_do run): Run on all eabi variants. * gcc.target/arm/vfp1.c (dg_do run): Run on all eabi variants.
......
/* { dg-do run } */
extern void abort (void);
typedef long long T;
typedef T vl_t __attribute__((vector_size(2 * sizeof (T))));
vl_t ul[4], vl[4] = { { 1, 2 }, { 3, 4 }, { 5, 6 }, { 7, 8 } };
static void
mul_vl_l(vl_t *u, vl_t *v, T x, int m)
{
vl_t w;
T *p = (T *)&w;
p[0] = p[1] = x;
while (m--)
*u++ = *v++ * w;
}
int
main(int argc, char *argv[])
{
int i;
T *pl;
pl = (T *) &ul;
mul_vl_l(ul, vl, 2, 4);
for (i = 0; i < 8; i++)
if (pl[i] != 2 * (i + 1))
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