aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c
blob: 7282110ab371630ba19b01681f2762f1d556ec0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* { dg-do run } */
/* { dg-options "-O2 -mavx512cd" } */
/* { dg-require-effective-target avx512cd } */

#define HAVE_512
#define AVX512CD

#include "avx512f-helper.h"

#define SIZE (AVX512F_LEN / 32)

CALC (int *res, __mmask16 src)
{
  int i;

  for (i = 0; i < SIZE; i++)
    res[i] = src;
}

static void
TEST (void)
{
  int i;
  UNION_TYPE (AVX512F_LEN, i_d) res;
  int res_ref[SIZE];
  __mmask16 src;

  for (i = 0; i < SIZE; i++)
    {
      res.a[i] = -1;
    }

  res.x = INTRINSIC (_broadcastmw_epi32) (src);

  CALC (res_ref, src);

  if (UNION_CHECK (AVX512F_LEN, i_d) (res, res_ref))
    abort ();
}