Debian Codegraph @

gcc/testsuite/gcc.target/i386/avx512fp16-scalar-bitwise-1a.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-Ofast -mavx512fp16 -mavx512vl" } */
3
4 _Float16
5 f1 (_Float16 x)
6 {
7 return __builtin_fabsf16 (x);
8 }
9
10 _Float16
11 f2 (_Float16 x, _Float16 y)
12 {
13 return __builtin_copysignf16 (x, y);
14 }
15
16 _Float16
17 f3 (_Float16 x)
18 {
19 return -x;
20 }
21
22 _Float16
23 f4 (_Float16 x, _Float16 y)
24 {
25 return x * __builtin_copysignf16 (1, y);
26 }
27
28
29 /* { dg-final { scan-assembler-times "vandps\[^\n\r\]*xmm\[0-9\]" 1 } } */
30 /* { dg-final { scan-assembler-times "vpternlogd\[^\n\r\]*xmm\[0-9\]" 2 } } */
31 /* { dg-final { scan-assembler-times "vxorps\[^\n\r\]*xmm\[0-9\]" 1 } } */