PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx2-vpsrlqi-2.c
blob1aa23fedc5d7875cd0bc4509a15e5dfe74eaf750
1 /* { dg-do run } */
2 /* { dg-require-effective-target avx2 } */
3 /* { dg-options "-O3 -mavx2" } */
5 #include <string.h>
6 #include "avx2-check.h"
8 #define N 0x5
10 static void
11 compute_psrlqi256 (long long int *s1, long long int *r)
13 int i;
15 memset (r, 0, 32);
17 if (N < 64)
18 for (i = 0; i < 4; ++i)
19 r[i] = s1[i] >> N;
22 void static
23 avx2_test (void)
25 union256i_q s1, res;
26 long long int res_ref[4];
27 int i, j;
28 int fail = 0;
30 for (i = 0; i < 10; i++)
32 for (j = 0; j < 4; j++)
33 s1.a[j] = j * i;
35 res.x = _mm256_srli_epi64 (s1.x, N);
37 compute_psrlqi256 (s1.a, res_ref);
39 fail += check_union256i_q (res, res_ref);
42 if (fail != 0)
43 abort ();