aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/avx512fp16-9a.c
blob: 580ffb51e45841945b7285aee8915483efdadf04 (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
/* { dg-do compile } */
/* { dg-options "-O2 -mavx512fp16" } */

#include <immintrin.h>

__m128h
__attribute__ ((noinline, noclone))
set1_128 (_Float16 x)
{
  return _mm_set1_ph (x);
}

__m256h
__attribute__ ((noinline, noclone))
set1_256 (_Float16 x)
{
  return _mm256_set1_ph (x);
}

__m512h
__attribute__ ((noinline, noclone))
set1_512 (_Float16 x)
{
  return _mm512_set1_ph (x);
}

/* { dg-final { scan-assembler-times "vpbroadcastw\[ \t]\+\[^\n\r]*\[xyz\]mm0" 3 } } */