Index: include/clang/Basic/BuiltinsX86.def =================================================================== --- include/clang/Basic/BuiltinsX86.def +++ include/clang/Basic/BuiltinsX86.def @@ -1962,6 +1962,14 @@ TARGET_BUILTIN(__builtin_ia32_rsqrt14pd256_mask, "V4dV4dV4dUc","","avx512vl") TARGET_BUILTIN(__builtin_ia32_rsqrt14ps128_mask, "V4fV4fV4fUc","","avx512vl") TARGET_BUILTIN(__builtin_ia32_rsqrt14ps256_mask, "V8fV8fV8fUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_fpclasspd128_mask, "UcV2dIiUc","","avx512dq,avx512vl") +TARGET_BUILTIN(__builtin_ia32_fpclasspd256_mask, "UcV4dIiUc","","avx512dq,avx512vl") +TARGET_BUILTIN(__builtin_ia32_fpclassps128_mask, "UcV4fIiUc","","avx512dq,avx512vl") +TARGET_BUILTIN(__builtin_ia32_fpclassps256_mask, "UcV8fIiUc","","avx512dq,avx512vl") +TARGET_BUILTIN(__builtin_ia32_fpclassps512_mask, "UsV16fIiUs","","avx512dq") +TARGET_BUILTIN(__builtin_ia32_fpclasspd512_mask, "UcV8dIiUc","","avx512dq") +TARGET_BUILTIN(__builtin_ia32_fpclasssd_mask, "UcV2dIiUc","","avx512dq") +TARGET_BUILTIN(__builtin_ia32_fpclassss_mask, "UcV4fIiUc","","avx512dq") #undef BUILTIN #undef TARGET_BUILTIN Index: lib/Headers/avx512dqintrin.h =================================================================== --- lib/Headers/avx512dqintrin.h +++ lib/Headers/avx512dqintrin.h @@ -773,6 +773,45 @@ (__m512) __builtin_ia32_reduceps512_mask ((__v16sf) __A, __B, \ (__v16sf) _mm512_setzero_ps(), (__mmask16) __U, __R);}) +#define _mm512_mask_fpclass_ps_mask( __U, __A, __imm) __extension__ ({ \ +__builtin_ia32_fpclassps512_mask ((__v16sf)( __A),\ + ( __imm),\ + ( __U));\ +}) + +#define _mm512_fpclass_ps_mask( __A, __imm) __extension__ ({ \ +__builtin_ia32_fpclassps512_mask ((__v16sf)( __A),\ + ( __imm),\ + (__mmask16) -1);\ +}) + +#define _mm512_mask_fpclass_pd_mask( __U, __A, __imm) __extension__ ({ \ +__builtin_ia32_fpclasspd512_mask ((__v8df)( __A),\ + ( __imm),( __U));\ +}) + +#define _mm512_fpclass_pd_mask( __A, __imm) __extension__ ({ \ +__builtin_ia32_fpclasspd512_mask ((__v8df)( __A),\ + ( __imm),\ + (__mmask8) -1);\ +}) + +#define _mm_fpclass_sd_mask( __A, __imm) __extension__ ({ \ +__builtin_ia32_fpclasssd_mask ((__v2df)( __A), ( __imm), (__mmask8) -1);\ +}) + +#define _mm_fpclass_sd_mask( __U,__A, __imm) __extension__ ({ \ +__builtin_ia32_fpclasssd_mask ((__v2df)( __A), ( __imm), (__mmask8) __U);\ +}) + +#define _mm_fpclass_ss_mask( __A, __imm) __extension__ ({ \ +__builtin_ia32_fpclassss_mask ((__v4sf)( __A), ( __imm), (__mmask8) -1);\ +}) + +#define _mm_mask_fpclass_ss_mask(__U ,__A, __imm) __extension__ ({ \ +__builtin_ia32_fpclassss_mask ((__v4sf)( __A), ( __imm), (__mmask8) __U);\ +}) + #undef __DEFAULT_FN_ATTRS #endif Index: lib/Headers/avx512vldqintrin.h =================================================================== --- lib/Headers/avx512vldqintrin.h +++ lib/Headers/avx512vldqintrin.h @@ -948,6 +948,50 @@ (__m256) __builtin_ia32_reduceps256_mask ((__v8sf) __A, __B, \ (__v8sf) _mm256_setzero_ps(), (__mmask8) __U); }) +#define _mm_mask_fpclass_pd_mask( __U, __A, __imm) __extension__ ({ \ +__builtin_ia32_fpclasspd128_mask ((__v2df)( __A),\ + ( __imm),( __U));\ +}) + +#define _mm_fpclass_pd_mask( __A, __imm) __extension__ ({ \ +__builtin_ia32_fpclasspd128_mask ((__v2df)( __A),\ + ( __imm),\ + (__mmask8) -1);\ +}) + +#define _mm256_mask_fpclass_pd_mask( __U, __A, __imm) __extension__ ({ \ +__builtin_ia32_fpclasspd256_mask ((__v4df)( __A),\ + ( __imm),( __U));\ +}) + +#define _mm256_fpclass_pd_mask( __A, __imm) __extension__ ({ \ +__builtin_ia32_fpclasspd256_mask ((__v4df)( __A),\ + ( __imm),\ + (__mmask8) -1);\ +}) + +#define _mm_mask_fpclass_ps_mask( __U, __A, __imm) __extension__ ({ \ +__builtin_ia32_fpclassps128_mask ((__v4sf)( __A),\ + ( __imm),( __U));\ +}) + +#define _mm_fpclass_ps_mask( __A, __imm) __extension__ ({ \ +__builtin_ia32_fpclassps128_mask ((__v4sf)( __A),\ + ( __imm),\ + (__mmask8) -1);\ +}) + +#define _mm256_mask_fpclass_ps_mask( __U, __A, __imm) __extension__ ({ \ +__builtin_ia32_fpclassps256_mask ((__v8sf)( __A),\ + ( __imm),( __U));\ +}) + +#define _mm256_fpclass_ps_mask( __A, __imm) __extension__ ({ \ +__builtin_ia32_fpclassps256_mask ((__v8sf)( __A),\ + ( __imm),\ + (__mmask8) -1);\ +}) + #undef __DEFAULT_FN_ATTRS #endif