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