2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx2-vpaddw-2.c
blobf7dbf2053ac61794afc159ae0be8d8c13a6ff4eb
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_w u, s1, s2;
11 short e[16];
12 unsigned i;
14 s1.x = _mm256_set_epi16 (100, 74, 50000, 4, 6999, 39999, 1000, 4,
15 874, 2783, 29884, 2904, 2889, 3279, 1, 3);
16 s2.x = _mm256_set_epi16 (88, 44, 33, 220, 4556, 2999, 2, 9000,
17 238, 194, 274, 17, 3, 5739, 2, 379);
19 u.x = _mm256_add_epi16 (s1.x, s2.x);
21 for (i = 0; i < 16; i++)
22 e[i] = s1.a[i] + s2.a[i];
24 if (check_union256i_w (u, e))
25 abort ();