blob: 28b2ad35975cd99f14eab4e071d22da55a49e4bc (
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
|
/* { dg-do compile } */
/* { dg-options "-march=x86-64-v3 -O2" } */
/* { dg-final { scan-assembler-times "vcomisbf16\[ \\t\]+\[^{}\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 6 } } */
/* { dg-final { scan-assembler-times "set\[aeglnb\]+" 6 } } */
#define AVX10_ATTR \
__attribute__((noinline, __target__("avx10.2"), optimize("no-trapping-math")))
AVX10_ATTR
int foo1_avx10 (__bf16 a, __bf16 b, __bf16 c, __bf16 d)
{
return a == b && c < d;
}
AVX10_ATTR
int foo2_avx10 (__bf16 a, __bf16 b, __bf16 c, __bf16 d)
{
return a > b || c != d;
}
AVX10_ATTR
int foo3_avx10 (__bf16 a, __bf16 b, __bf16 c, __bf16 d)
{
return (a >= b) * (c <= d);
}
|