| 1 |
/* PR gcc/116725 */ |
| 2 |
/* { dg-do assemble } */ |
| 3 |
/* { dg-options "-masm=intel -mavx512dq -mavx512fp16 -mavx512vl" } */ |
| 4 |
/* { dg-require-effective-target masm_intel } */ |
| 5 |
/* { dg-require-effective-target avx512dq } */ |
| 6 |
/* { dg-require-effective-target avx512fp16 } */ |
| 7 |
/* { dg-require-effective-target avx512vl } */ |
| 8 |
|
| 9 |
#include <stdio.h> |
| 10 |
|
| 11 |
typedef double __m128d __attribute__ ((__vector_size__ (16))); |
| 12 |
typedef float __m128f __attribute__ ((__vector_size__ (16))); |
| 13 |
typedef int __v16si __attribute__ ((__vector_size__ (64))); |
| 14 |
typedef _Float16 __m256h __attribute__ ((__vector_size__ (32))); |
| 15 |
typedef long long __m512i __attribute__((__vector_size__(64))); |
| 16 |
typedef _Float16 __m128h __attribute__ ((__vector_size__ (16), __may_alias__)); |
| 17 |
typedef int __v4si __attribute__ ((__vector_size__ (16))); |
| 18 |
typedef long long __m128i __attribute__ ((__vector_size__ (16))); |
| 19 |
|
| 20 |
int main(void) { |
| 21 |
__m128d vec = {1.0, 2.0}; |
| 22 |
char res = __builtin_ia32_fpclasssd_mask(vec, 1, 1); |
| 23 |
printf("%d\n", res); |
| 24 |
|
| 25 |
__m128f vec2 = {1.0, 2.0, 3.0, 4.0}; |
| 26 |
char res2 = __builtin_ia32_fpclassss_mask(vec2, 1, 1); |
| 27 |
printf("%d\n", res2); |
| 28 |
|
| 29 |
__m128h vec3 = {2.0, 1.0, 3.0}; |
| 30 |
__v4si vec4 = {}; |
| 31 |
__v4si res3 = __builtin_ia32_vcvtph2dq128_mask(vec3, vec4, -1); |
| 32 |
printf("%d\n", res3[0]); |
| 33 |
|
| 34 |
__v4si res4 = __builtin_ia32_vcvtph2udq128_mask(vec3, vec4, -1); |
| 35 |
printf("%d\n", res4[0]); |
| 36 |
|
| 37 |
__m128i vec5 = {}; |
| 38 |
__m128i res5 = __builtin_ia32_vcvtph2qq128_mask(vec3, vec5, -1); |
| 39 |
printf("%d\n", res5[0]); |
| 40 |
|
| 41 |
__m128i res6 = __builtin_ia32_vcvtph2uqq128_mask(vec3, vec5, -1); |
| 42 |
printf("%d\n", res6[0]); |
| 43 |
} |