Debian Codegraph @

gcc/testsuite/gcc.target/i386/pr102230.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mavx512fp16" } */
3 /* Cope with --enable-frame-pointer. */
4 /* { dg-additional-options "-fomit-frame-pointer" } */
5
6 typedef _Float16 v4hf __attribute__ ((vector_size (8)));
7 typedef _Float16 v2hf __attribute__ ((vector_size (4)));
8
9 v4hf
10 v4hf_abi_1 (v4hf a)
11 {
12 return a;
13 }
14
15 v4hf
16 v4hf_abi_3 (v4hf a, v4hf b, v4hf c)
17 {
18 return c;
19 }
20
21 /* { dg-final { scan-assembler-times "movq\[\\t \]*%mm2, %mm0" 1 { target ia32 } } } */
22 /* { dg-final { scan-assembler-times "vmovaps\[\\t \]*%xmm2, %xmm0" 1 { target { ! ia32 } } } } */
23
24 v4hf
25 v4hf_abi_4 (v4hf a, v4hf b, v4hf c, v4hf d)
26 {
27 return d;
28 }
29
30 /* { dg-final { scan-assembler-times "movq\[\\t \]*4\\(%esp\\), %mm0" 1 { target ia32 } } } */
31 /* { dg-final { scan-assembler-times "vmovaps\[\\t \]*%xmm3, %xmm0" 1 { target { ! ia32 } } } } */
32
33 v2hf
34 v2hf_test (v2hf a, v2hf b, v2hf c, v2hf d)
35 {
36 return b;
37 }
38
39 /* { dg-final { scan-assembler-times "movl\[\\t \]*8\\(%esp\\), %eax" 1 { target ia32 } } } */
40 /* { dg-final { scan-assembler-times "vmovaps\[\\t \]*%xmm1, %xmm0" 1 { target { ! ia32 } } } } */