Debian Codegraph @

gcc/testsuite/gcc.target/i386/avx512fp16-1c.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-mavx512fp16 -O2" } */
3
4 /* { dg-final { scan-assembler-times "vpbroadcastw" 1 { target { ! ia32 } } } } */
5 /* { dg-final { scan-assembler-times "vpblendw" 1 { target { ! ia32 } } } } */
6 /* { dg-final { scan-assembler-times "vmovsh" 1 { target { ! ia32 } } } } */
7
8 /* { dg-final { scan-assembler-times "vpinsrw" 2 { target ia32 } } } */
9
10 typedef _Float16 __v8hf __attribute__ ((__vector_size__ (16)));
11 typedef _Float16 __m128h __attribute__ ((__vector_size__ (16), __may_alias__));
12
13 __m128h
14 __attribute__ ((noinline, noclone))
15 foo1 (__m128h a, _Float16 f)
16 {
17 __v8hf x = (__v8hf) a;
18 x[2] = f;
19 return (__m128h) x;
20 }
21
22 __m128h
23 __attribute__ ((noinline, noclone))
24 foo2 (__m128h a, _Float16 f)
25 {
26 __v8hf x = (__v8hf) a;
27 x[0] = f;
28 return (__m128h) x;
29 }