Debian Codegraph @

gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-fast-math-1.c

raw
1 /* { dg-do compile { target { ! ia32 } } } */
2 /* { dg-options "-march=x86-64-v3 -mavx10.2 -O2" } */
3 /* { dg-final { scan-assembler-times "vmulbf16\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
4 /* { dg-final { scan-assembler-times "vrcpbf16\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
5
6 typedef __bf16 v4bf __attribute__ ((__vector_size__ (8)));
7 typedef __bf16 v2bf __attribute__ ((__vector_size__ (4)));
8
9
10 __attribute__((optimize("fast-math")))
11 v4bf
12 foo_div_fast_math_4 (v4bf a, v4bf b)
13 {
14 return a / b;
15 }
16
17 __attribute__((optimize("fast-math")))
18 v2bf
19 foo_div_fast_math_2 (v2bf a, v2bf b)
20 {
21 return a / b;
22 }