Debian Codegraph @

gcc/testsuite/gcc.target/i386/part-vect-vec_cmpbf.c

raw
1 /* { dg-do compile { target { ! ia32 } } } */
2 /* { dg-options "-O2 -mavx10.2" } */
3 /* { dg-final { scan-assembler-times "vcmpbf16" 10 } } */
4
5 typedef __bf16 __attribute__((__vector_size__ (4))) v2bf;
6 typedef __bf16 __attribute__((__vector_size__ (8))) v4bf;
7
8
9 #define VCMPMN(type, op, name) \
10 type \
11 __attribute__ ((noinline, noclone)) \
12 vec_cmp_##type##type##name (type a, type b) \
13 { \
14 return a op b; \
15 }
16
17 VCMPMN (v4bf, <, lt)
18 VCMPMN (v2bf, <, lt)
19 VCMPMN (v4bf, <=, le)
20 VCMPMN (v2bf, <=, le)
21 VCMPMN (v4bf, >, gt)
22 VCMPMN (v2bf, >, gt)
23 VCMPMN (v4bf, >=, ge)
24 VCMPMN (v2bf, >=, ge)
25 VCMPMN (v4bf, ==, eq)
26 VCMPMN (v2bf, ==, eq)