2015-12-10 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx-vblendpd-256-1.c
blob39e7c1bd55335515e363c2a1a67ac4116c7e99d2
1 /* { dg-do run } */
2 /* { dg-require-effective-target avx } */
3 /* { dg-options "-O2 -mavx" } */
5 #include "avx-check.h"
7 #ifndef MASK
8 #define MASK 12
9 #endif
11 void static
12 avx_test (void)
14 int i;
15 union256d u, s1, s2;
16 double e [4];
18 s1.x = _mm256_set_pd (34545, 95567, 23443, 5675);
19 s2.x = _mm256_set_pd (674, 57897, 93459, 45624);
20 u.x = _mm256_blend_pd (s1.x, s2.x, MASK);
22 for (i = 0; i < 4; i++)
23 e[i] = (MASK & (0x01 << i)) ? s2.a[i] : s1.a[i];
25 if (check_union256d (u, e))
26 abort ();