Debian Codegraph @

gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxbf16-2.c

raw
1 /* { dg-do run } */
2 /* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2" } */
3 /* { dg-require-effective-target avx10_2 } */
4
5 #ifndef AVX10_2
6 #define AVX10_2
7 #define AVX10_512BIT
8 #endif
9 #include "avx10-helper.h"
10 #define SIZE (AVX512F_LEN / 16)
11 #include <stdbool.h>
12 #include "avx10-minmax-helper.h"
13 #include "avx512f-mask-type.h"
14
15 void static
16 CALC (__bf16 *r, __bf16 *s1, __bf16 *s2, int R)
17 {
18 for(int i = 0; i < SIZE; i++)
19 r[i] = minmax___bf16(&s1[i], &s2[i], R);
20 }
21
22 void
23 TEST (void)
24 {
25 int i, sign;
26 UNION_TYPE (AVX512F_LEN, bf16_bf) res1, res2, res3, src1, src2;
27 MASK_TYPE mask = MASK_VALUE;
28 __bf16 res_ref[SIZE];
29
30 UNIT_TEST(0, pbh, bf16_bf, __bf16);
31 UNIT_TEST(1, pbh, bf16_bf, __bf16);
32 UNIT_TEST(4, pbh, bf16_bf, __bf16);
33 UNIT_TEST(5, pbh, bf16_bf, __bf16);
34 UNIT_TEST(16, pbh, bf16_bf, __bf16);
35 UNIT_TEST(17, pbh, bf16_bf, __bf16);
36 }