PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx2-vpmovzxbw-2.c
blob5ef4b1535755d1c2ee9a0a4ab44a6b978cfce715
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_movzxbw (unsigned char *s, short *r)
10 int i;
12 for (i = 0; i < 16; i++)
13 r[i] = s[i];
16 static void
17 avx2_test (void)
19 union128i_b s;
20 union256i_w res;
21 short res_ref[16];
23 s.x = _mm_set_epi8 (1, 2, 3, 4, 200, 50, 6, 8, 1, 2, 3, 4, 200, 5, 6, 8);
25 res.x = _mm256_cvtepu8_epi16 (s.x);
27 compute_movzxbw (s.a, res_ref);
29 if (check_union256i_w (res, res_ref))
30 abort ();