| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-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_2_512 |
| 8 |
#define AVX10_512BIT |
| 9 |
#endif |
| 10 |
#include "avx10-helper.h" |
| 11 |
#define SIZE (AVX512F_LEN / 16) |
| 12 |
#include "avx512f-mask-type.h" |
| 13 |
|
| 14 |
void |
| 15 |
TEST (void) |
| 16 |
{ |
| 17 |
int i; |
| 18 |
__mmask32 res1, res2, exp = 0; |
| 19 |
UNION_TYPE (AVX512F_LEN, bf16_uw) src1, src2; |
| 20 |
MASK_TYPE mask = MASK_VALUE; |
| 21 |
|
| 22 |
for (i = 0; i < SIZE; i++) |
| 23 |
{ |
| 24 |
float x = 0.5; |
| 25 |
float y = 0.25; |
| 26 |
src2.a[i] = convert_fp32_to_bf16 (y); |
| 27 |
src1.a[i] = convert_fp32_to_bf16 (x); |
| 28 |
if (src1.a[i] == src2.a[i]) |
| 29 |
exp |= 1 << i; |
| 30 |
} |
| 31 |
|
| 32 |
res1 = INTRINSIC (_cmp_pbh_mask) (src1.x, src2.x, 0); |
| 33 |
res2 = INTRINSIC (_mask_cmp_pbh_mask) (mask, src1.x, src2.x, 0); |
| 34 |
|
| 35 |
if (exp != res1 || exp != res2) |
| 36 |
abort (); |
| 37 |
} |