| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-mavx2 -O2" } */ |
| 3 |
/* { dg-require-effective-target avx2 } */ |
| 4 |
|
| 5 |
#include "avx2-check.h" |
| 6 |
|
| 7 |
static void |
| 8 |
avx2_test (void) |
| 9 |
{ |
| 10 |
union256i_d u, s1, s2; |
| 11 |
int e[8]; |
| 12 |
int i; |
| 13 |
|
| 14 |
s1.x = _mm256_set_epi32 (1, 2, 3, 4, 10, 20, 30, 90000); |
| 15 |
|
| 16 |
s2.x = _mm256_set_epi32 (88, 44, 3, 22, 11, 98, 76, -100); |
| 17 |
|
| 18 |
u.x = _mm256_cmpeq_epi32 (s1.x, s2.x); |
| 19 |
|
| 20 |
for (i = 0; i < 8; i++) |
| 21 |
e[i] = (s1.a[i] == s2.a[i]) ? -1 : 0; |
| 22 |
|
| 23 |
if (check_union256i_d (u, e)) |
| 24 |
abort (); |
| 25 |
} |