summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/avx512dq-vbroadcasti32x2-1.c
blob: 95cfcbd252103d81ea1cdcf0dc684d1a90e9a704 (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
/* { dg-do compile } */
/* { dg-options "-mavx512dq -mavx512vl -O2" } */
/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[\\n\]" 1 } } */
/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */

#include <immintrin.h>

volatile __m512i x;
volatile __m256i y;
volatile __m128i z;
volatile __mmask16 mx;
volatile __mmask8 my;

void extern
avx512dq_test (void)
{
  x = _mm512_broadcast_i32x2 (z);
  x = _mm512_mask_broadcast_i32x2 (x, mx, z);
  x = _mm512_maskz_broadcast_i32x2 (mx, z);
  y = _mm256_broadcast_i32x2 (z);
  y = _mm256_mask_broadcast_i32x2 (y, my, z);
  y = _mm256_maskz_broadcast_i32x2 (my, z);
  z = _mm_broadcast_i32x2 (z);
  z = _mm_mask_broadcast_i32x2 (z, my, z);
  z = _mm_maskz_broadcast_i32x2 (my, z);

}