PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx2-vpaddb-2.c
blob8abeb50c02d41f9c4655483ad134a21e081a820f
1 /* { dg-do run } */
2 /* { dg-options "-mavx2 -O2" } */
3 /* { dg-require-effective-target avx2 } */
5 #include "avx2-check.h"
7 void static
8 avx2_test (void)
10 union256i_b u, s1, s2;
11 char e[32];
12 unsigned i;
14 s1.x = _mm256_set_epi8 (10, 74, 50, 4, 6, 99, 1, 4, 87, 83, 84,
15 29, 81, 79, 1, 3, 1, 5, 2, 47, 20, 2, 72,
16 92, 9, 4, 23, 17, 99, 43, 72, 17);
18 s2.x = _mm256_set_epi8 (88, 44, 33, 20, 56, 99, 2, 90, 38, 4, 200,
19 17, 3, 39, 2, 37, 27, 95, 17, 74, 72, 43,
20 27, 112, 71, 50, 32, 72, 84, 17, 27, 96);
22 u.x = _mm256_add_epi8 (s1.x, s2.x);
24 for (i = 0; i < 32; i++)
25 e[i] = s1.a[i] + s2.a[i];
27 if (check_union256i_b (u, e))
28 abort ();