Debian Codegraph @

gcc/testsuite/gcc.target/i386/avx512bw-extendbf2sf.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-mavx512bw -mavx512vl -O2 -ffast-math" } */
3 /* { dg-final { scan-assembler-times {(?n)(?:vpermi2w|vpunpcklwd)} 6 } } */
4
5 typedef float v4sf __attribute__((vector_size(16)));
6 typedef float v8sf __attribute__((vector_size(32)));
7 typedef float v16sf __attribute__((vector_size(64)));
8 typedef __bf16 v4bf __attribute__((vector_size(8)));
9 typedef __bf16 v8bf __attribute__((vector_size(16)));
10 typedef __bf16 v16bf __attribute__((vector_size(32)));
11
12 v4sf
13 foo (v4bf b, v4bf a)
14 {
15 return __builtin_convertvector (a, v4sf);
16 }
17
18 v8sf
19 foo2 (v8bf b, v8bf a)
20 {
21 return __builtin_convertvector (a, v8sf);
22 }
23
24 v16sf
25 foo3 (v16bf b, v16bf a)
26 {
27 return __builtin_convertvector (a, v16sf);
28 }
29
30 v4sf
31 foo_mem (v4bf* a)
32 {
33 return __builtin_convertvector (*a, v4sf);
34 }
35
36 v8sf
37 foo2_mem (v8bf* a)
38 {
39 return __builtin_convertvector (*a, v8sf);
40 }
41
42 v16sf
43 foo3_mem (v16bf* a)
44 {
45 return __builtin_convertvector (*a, v16sf);
46 }