Debian Codegraph @

gcc/testsuite/gcc.target/i386/avx10_2-comibf-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-march=x86-64-v3 -mavx10.2 -O2 -fno-trapping-math" } */
3 /* { dg-final { scan-assembler-times "vcomisbf16\[ \\t\]+\[^{}\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 6 } } */
4 /* { dg-final { scan-assembler-times {j[a-z]+\s} 6 } } */
5
6 __bf16
7 foo_eq (__bf16 a, __bf16 b, __bf16 c, __bf16 d)
8 {
9 return a == b ? c + d : c - d;
10 }
11
12 __bf16
13 foo_ne (__bf16 a, __bf16 b, __bf16 c, __bf16 d)
14 {
15 return a != b ? c + d : c - d;
16 }
17
18 __bf16
19 foo_lt (__bf16 a, __bf16 b, __bf16 c, __bf16 d)
20 {
21 return a < b ? c + d : c - d;
22 }
23
24 __bf16
25 foo_le (__bf16 a, __bf16 b, __bf16 c, __bf16 d)
26 {
27 return a <= b ? c + d : c - d;
28 }
29
30 __bf16
31 foo_gt (__bf16 a, __bf16 b, __bf16 c, __bf16 d)
32 {
33 return a > b ? c + d : c - d;
34 }
35
36 __bf16
37 foo_ge (__bf16 a, __bf16 b, __bf16 c, __bf16 d)
38 {
39 return a >= b ? c + d : c - d;
40 }