2015-12-10 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx2-vpmovzxwd-2.c
blobb4d2b2da685cfcdddfa6600f515f6238059dd523
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_movzxwd (unsigned short *s, int *r)
10 int i;
12 for (i = 0; i < 8; i++)
13 r[i] = s[i];
16 static void
17 avx2_test (void)
19 union128i_w s;
20 union256i_d res;
21 int res_ref[8];
23 s.x = _mm_set_epi16 (1, 2, 3, 4, 200, 5000, 6, 8);
25 res.x = _mm256_cvtepu16_epi32 (s.x);
27 compute_movzxwd (s.a, res_ref);
29 if (check_union256i_d (res, res_ref))
30 abort ();