2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx-vandpd-256-1.c
blobb0675ec6586b8b515952b3f6f792e0e21f53b3aa
1 /* { dg-do run } */
2 /* { dg-require-effective-target avx } */
3 /* { dg-options "-O2 -mavx" } */
5 #include "avx-check.h"
7 void static
8 avx_test (void)
10 int i;
11 union256d u, s1, s2;
13 union
15 double d[4];
16 long long ll[4];
17 }source1, source2, e;
19 s1.x = _mm256_set_pd (345.45, 95567, 2344.3, 567.5);
20 s2.x = _mm256_set_pd (674, 57.897, 934.59, 4562.4);
22 _mm256_storeu_pd (source1.d, s1.x);
23 _mm256_storeu_pd (source2.d, s2.x);
25 u.x = _mm256_and_pd (s1.x, s2.x);
27 for (i = 0; i < 4; i++)
28 e.ll[i] = source1.ll[i] & source2.ll[i];
30 if (check_union256d (u, e.d))
31 abort ();