2015-12-10 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx2-vpmovsxdq-2.c
blob7e87f316fb076b6ff1acb1960a4c6eeb6a70135f
1 /* { dg-do run } */
2 /* { dg-options "-mavx2 -O2" } */
3 /* { dg-require-effective-target avx2 } */
5 #include "avx2-check.h"
7 static void
8 compute_movsxdq (int *s, long long int *r)
10 int i;
12 for (i = 0; i < 4; i++)
13 r[i] = s[i];
16 static void
17 avx2_test (void)
19 union128i_d s;
20 union256i_q res;
21 long long int res_ref[4];
23 s.x = _mm_set_epi32 (1, -2, 3, 4);
25 res.x = _mm256_cvtepi32_epi64 (s.x);
27 compute_movsxdq (s.a, res_ref);
29 if (check_union256i_q (res, res_ref))
30 abort ();