aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/avx10_2-comibf-1.c
blob: 3862f1e0d90028db55252e692844c92655f460d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* { dg-do compile } */
/* { dg-options "-march=x86-64-v3 -mavx10.2 -O2 -fno-trapping-math" } */
/* { dg-final { scan-assembler-times "vcomisbf16\[ \\t\]+\[^{}\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 6 } } */
/* { dg-final { scan-assembler-times {j[a-z]+\s} 6 } } */

__bf16
foo_eq (__bf16 a, __bf16 b, __bf16 c, __bf16 d)
{
  return a == b ? c + d : c - d;
}

__bf16
foo_ne (__bf16 a, __bf16 b, __bf16 c, __bf16 d)
{
  return a != b ? c + d : c - d;
}

__bf16
foo_lt (__bf16 a, __bf16 b, __bf16 c, __bf16 d)
{
  return a < b ? c + d : c - d;
}

__bf16
foo_le (__bf16 a, __bf16 b, __bf16 c, __bf16 d)
{
  return a <= b ? c + d : c - d;
}

__bf16
foo_gt (__bf16 a, __bf16 b, __bf16 c, __bf16 d)
{
  return a > b ? c + d : c - d;
}

__bf16
foo_ge (__bf16 a, __bf16 b, __bf16 c, __bf16 d)
{
  return a >= b ? c + d : c - d;
}