| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-O2 -mavx512cd" } */ |
| 3 |
/* { dg-require-effective-target avx512cd } */ |
| 4 |
/* { dg-skip-if "PR target/114150" { *-*-solaris2.* && { ! gas } } } */ |
| 5 |
|
| 6 |
#define HAVE_512 |
| 7 |
#define AVX512CD |
| 8 |
|
| 9 |
#include "avx512f-helper.h" |
| 10 |
|
| 11 |
#define SIZE (AVX512F_LEN / 32) |
| 12 |
|
| 13 |
static void |
| 14 |
CALC (int *res, __mmask16 src) |
| 15 |
{ |
| 16 |
int i; |
| 17 |
|
| 18 |
for (i = 0; i < SIZE; i++) |
| 19 |
res[i] = src; |
| 20 |
} |
| 21 |
|
| 22 |
void |
| 23 |
TEST (void) |
| 24 |
{ |
| 25 |
int i; |
| 26 |
UNION_TYPE (AVX512F_LEN, i_d) res; |
| 27 |
int res_ref[SIZE]; |
| 28 |
__mmask16 src = 0; |
| 29 |
|
| 30 |
for (i = 0; i < SIZE; i++) |
| 31 |
{ |
| 32 |
res.a[i] = -1; |
| 33 |
} |
| 34 |
|
| 35 |
res.x = INTRINSIC (_broadcastmw_epi32) (src); |
| 36 |
|
| 37 |
CALC (res_ref, src); |
| 38 |
|
| 39 |
if (UNION_CHECK (AVX512F_LEN, i_d) (res, res_ref)) |
| 40 |
abort (); |
| 41 |
} |