Debian Codegraph @

gcc/testsuite/gcc.target/i386/avx512fp16-3a.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mavx512fp16" } */
3
4 typedef _Float16 __v32hf __attribute__ ((__vector_size__ (64)));
5 typedef _Float16 __m512h __attribute__ ((__vector_size__ (64), __may_alias__));
6
7 __m512h
8 __attribute__ ((noinline, noclone))
9 foo1 (_Float16 x)
10 {
11 return __extension__ (__m512h)(__v32hf) { x, 0.0f, 0.0f, 0.0f,
12 0.0f, 0.0f, 0.0f, 0.0f,
13 0.0f, 0.0f, 0.0f, 0.0f,
14 0.0f, 0.0f, 0.0f, 0.0f,
15 0.0f, 0.0f, 0.0f, 0.0f,
16 0.0f, 0.0f, 0.0f, 0.0f,
17 0.0f, 0.0f, 0.0f, 0.0f,
18 0.0f, 0.0f, 0.0f, 0.0f };
19 }
20
21 __m512h
22 __attribute__ ((noinline, noclone))
23 foo2 (_Float16 *x)
24 {
25 return __extension__ (__m512h)(__v32hf) { *x, 0.0f, 0.0f, 0.0f,
26 0.0f, 0.0f, 0.0f, 0.0f,
27 0.0f, 0.0f, 0.0f, 0.0f,
28 0.0f, 0.0f, 0.0f, 0.0f,
29 0.0f, 0.0f, 0.0f, 0.0f,
30 0.0f, 0.0f, 0.0f, 0.0f,
31 0.0f, 0.0f, 0.0f, 0.0f,
32 0.0f, 0.0f, 0.0f, 0.0f };
33 }
34
35 /* { dg-final { scan-assembler-times "vmovw\[^\n\r]*xmm0" 3 { target { ! ia32 } } } } */
36 /* { dg-final { scan-assembler-times "vmovw\[^\n\r]*xmm0" 2 { target { ia32 } } } } */