Index: include/clang/Basic/BuiltinsX86.def =================================================================== --- include/clang/Basic/BuiltinsX86.def +++ include/clang/Basic/BuiltinsX86.def @@ -1749,6 +1749,164 @@ TARGET_BUILTIN(__builtin_ia32_vpermt2varqi256_maskz, "V32cV32cV32cV32cUi","","avx512vbmi,avx512vl") TARGET_BUILTIN(__builtin_ia32_vcomisd, "iV2dV2dIiIi","","avx512f") TARGET_BUILTIN(__builtin_ia32_vcomiss, "iV4fV4fIiIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_ptestmb512, "ULLiV64cV64cULLi","","avx512bw") +TARGET_BUILTIN(__builtin_ia32_ptestmw512, "UiV32sV32sUi","","avx512bw") +TARGET_BUILTIN(__builtin_ia32_ptestnmb512, "ULLiV64cV64cULLi","","avx512bw") +TARGET_BUILTIN(__builtin_ia32_ptestnmw512, "UiV32sV32sUi","","avx512bw") +TARGET_BUILTIN(__builtin_ia32_storedquhi512_mask, "vV32s*V32sUi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_storedquqi512_mask, "vV64c*V64cULLi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pslld512_mask, "V16iV16iV4iV16iUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_psllq512_mask, "V8LLiV8LLiV2LLiV8LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_psllv16si_mask, "V16iV16iV16iV16iUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_psllv8di_mask, "V8LLiV8LLiV8LLiV8LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_psrad512_mask, "V16iV16iV4iV16iUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_psraq512_mask, "V8LLiV8LLiV2LLiV8LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_psrav16si_mask, "V16iV16iV16iV16iUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_psrav8di_mask, "V8LLiV8LLiV8LLiV8LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_psrld512_mask, "V16iV16iV4iV16iUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_psrlq512_mask, "V8LLiV8LLiV2LLiV8LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_psrlv16si_mask, "V16iV16iV16iV16iUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_psrlv8di_mask, "V8LLiV8LLiV8LLiV8LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pternlogd512_mask, "V16iV16iV16iV16iIiUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pternlogd512_maskz, "V16iV16iV16iV16iIiUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pternlogq512_mask, "V8LLiV8LLiV8LLiV8LLiIiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pternlogq512_maskz, "V8LLiV8LLiV8LLiV8LLiIiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_ptestnmd512, "UsV16iV16iUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_ptestnmq512, "UcV8LLiV8LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_punpckhdq512_mask, "V16iV16iV16iV16iUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_punpckhqdq512_mask, "V8LLiV8LLiV8LLiV8LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_punpckldq512_mask, "V16iV16iV16iV16iUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_punpcklqdq512_mask, "V8LLiV8LLiV8LLiV8LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_rndscalesd_round_mask, "V2dV2dV2dV2dUcIiIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_rndscaless_round_mask, "V4fV4fV4fV4fUcIiIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_scalefpd512_mask, "V8dV8dV8dV8dUcIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_scalefps512_mask, "V16fV16fV16fV16fUsIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_scalefsd_round_mask, "V2dV2dV2dV2dUcIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_scalefss_round_mask, "V4fV4fV4fV4fUcIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_shuf_f32x4_mask, "V16fV16fV16fIiV16fUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_shuf_f64x2_mask, "V8dV8dV8dIiV8dUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_shuf_i32x4_mask, "V16iV16iV16iIiV16iUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_shuf_i64x2_mask, "V8LLiV8LLiV8LLiIiV8LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_shufpd512_mask, "V8dV8dV8dIiV8dUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_shufps512_mask, "V16fV16fV16fIiV16fUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_sqrtsd_round_mask, "V2dV2dV2dV2dUcIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_sqrtss_round_mask, "V4fV4fV4fV4fUcIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_unpckhpd512_mask, "V8dV8dV8dV8dUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_unpckhps512_mask, "V16fV16fV16fV16fUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_unpcklpd512_mask, "V8dV8dV8dV8dUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_unpcklps512_mask, "V16fV16fV16fV16fUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vcvtsd2si64, "LLiV2dIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vcvtsd2si32, "iV2dIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vcvtsd2usi32, "UiV2dIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vcvtsd2usi64, "ULLiV2dIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vcvtss2si32, "iV4fIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vcvtss2si64, "LLiV4fIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vcvtss2usi32, "UiV4fIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vcvtss2usi64, "ULLiV4fIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vcvttsd2si32, "iV2dIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vcvttsd2si64, "LLiV2dIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vcvttsd2usi32, "UiV2dIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vcvttsd2usi64, "ULLiV2dIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vcvttss2si32, "iV4fIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vcvttss2si64, "LLiV4fIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vcvttss2usi32, "UiV4fIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vcvttss2usi64, "ULLiV4fIi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vpermi2vard512_mask, "V16iV16iV16iV16iUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vpermi2varpd512_mask, "V8dV8dV8LLiV8dUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vpermi2varps512_mask, "V16fV16fV16iV16fUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vpermi2varq512_mask, "V8LLiV8LLiV8LLiV8LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vpermilpd512_mask, "V8dV8dIiV8dUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vpermilps512_mask, "V16fV16fIiV16fUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vpermilvarpd512_mask, "V8dV8dV8LLiV8dUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vpermilvarps512_mask, "V16fV16fV16iV16fUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vpermt2vard512_maskz, "V16iV16iV16iV16iUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vpermt2varpd512_maskz, "V8dV8LLiV8dV8dUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vpermt2varps512_maskz, "V16fV16iV16fV16fUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_vpermt2varq512_maskz, "V8LLiV8LLiV8LLiV8LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_ptestmb128, "UsV16cV16cUs","","avx512bw,avx512vl") +TARGET_BUILTIN(__builtin_ia32_ptestmb256, "UiV32cV32cUi","","avx512bw,avx512vl") +TARGET_BUILTIN(__builtin_ia32_ptestmw128, "UcV8sV8sUc","","avx512bw,avx512vl") +TARGET_BUILTIN(__builtin_ia32_ptestmw256, "UsV16sV16sUs","","avx512bw,avx512vl") +TARGET_BUILTIN(__builtin_ia32_ptestnmb128, "UsV16cV16cUs","","avx512bw,avx512vl") +TARGET_BUILTIN(__builtin_ia32_ptestnmb256, "UiV32cV32cUi","","avx512bw,avx512vl") +TARGET_BUILTIN(__builtin_ia32_ptestnmw128, "UcV8sV8sUc","","avx512bw,avx512vl") +TARGET_BUILTIN(__builtin_ia32_ptestnmw256, "UsV16sV16sUs","","avx512bw,avx512vl") +TARGET_BUILTIN(__builtin_ia32_storedquhi128_mask, "vV8s*V8sUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_storedquhi256_mask, "vV16s*V16sUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_storedquqi128_mask, "vV16c*V16cUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_storedquqi256_mask, "vV32c*V32cUi","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pternlogd128_mask, "V4iV4iV4iV4iIiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pternlogd128_maskz, "V4iV4iV4iV4iIiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pternlogd256_mask, "V8iV8iV8iV8iIiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pternlogd256_maskz, "V8iV8iV8iV8iIiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pternlogq128_mask, "V2LLiV2LLiV2LLiV2LLiIiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pternlogq128_maskz, "V2LLiV2LLiV2LLiV2LLiIiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pternlogq256_mask, "V4LLiV4LLiV4LLiV4LLiIiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pternlogq256_maskz, "V4LLiV4LLiV4LLiV4LLiIiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_ptestmd128, "UcV4iV4iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_ptestmd256, "UcV8iV8iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_ptestmq128, "UcV2LLiV2LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_ptestmq256, "UcV4LLiV4LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_ptestnmd128, "UcV4iV4iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_ptestnmd256, "UcV8iV8iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_ptestnmq128, "UcV2LLiV2LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_ptestnmq256, "UcV4LLiV4LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_punpckhdq128_mask, "V4iV4iV4iV4iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_punpckhdq256_mask, "V8iV8iV8iV8iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_punpckhqdq128_mask, "V2LLiV2LLiV2LLiV2LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_punpckhqdq256_mask, "V4LLiV4LLiV4LLiV4LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_punpckldq128_mask, "V4iV4iV4iV4iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_punpckldq256_mask, "V8iV8iV8iV8iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_punpcklqdq128_mask, "V2LLiV2LLiV2LLiV2LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_punpcklqdq256_mask, "V4LLiV4LLiV4LLiV4LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_rcp14pd128_mask, "V2dV2dV2dUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_rcp14pd256_mask, "V4dV4dV4dUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_rcp14ps128_mask, "V4fV4fV4fUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_rcp14ps256_mask, "V8fV8fV8fUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_rsqrt14pd128_mask, "V2dV2dV2dUc","","avx512vl") +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_shuf_f32x4_256_mask, "V8fV8fV8fIiV8fUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_shuf_f64x2_256_mask, "V4dV4dV4dIiV4dUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_shuf_i32x4_256_mask, "V8iV8iV8iIiV8iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_shuf_i64x2_256_mask, "V4LLiV4LLiV4LLiIiV4LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_shufpd128_mask, "V2dV2dV2dIiV2dUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_shufpd256_mask, "V4dV4dV4dIiV4dUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_shufps128_mask, "V4fV4fV4fIiV4fUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_shufps256_mask, "V8fV8fV8fIiV8fUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_storeapd128_mask, "vV2d*V2dUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_storeapd256_mask, "vV4d*V4dUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_storeaps128_mask, "vV4f*V4fUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_storeaps256_mask, "vV8f*V8fUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_storedqudi128_mask, "vV2LLi*V2LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_storedqudi256_mask, "vV4LLi*V4LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_storedqusi128_mask, "vV4i*V4iUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_storedqusi256_mask, "vV8i*V8iUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_storeupd128_mask, "vV2d*V2dUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_storeupd256_mask, "vV4d*V4dUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_storeups128_mask, "vV4f*V4fUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_storeups256_mask, "vV8f*V8fUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_unpckhpd128_mask, "V2dV2dV2dV2dUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_unpckhpd256_mask, "V4dV4dV4dV4dUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_unpckhps128_mask, "V4fV4fV4fV4fUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_unpckhps256_mask, "V8fV8fV8fV8fUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_unpcklpd128_mask, "V2dV2dV2dV2dUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_unpcklpd256_mask, "V4dV4dV4dV4dUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_unpcklps128_mask, "V4fV4fV4fV4fUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_unpcklps256_mask, "V8fV8fV8fV8fUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_vpermilpd_mask, "V2dV2dIiV2dUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_vpermilpd256_mask, "V4dV4dIiV4dUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_vpermilps_mask, "V4fV4fIiV4fUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_vpermilps256_mask, "V8fV8fIiV8fUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_vpermilvarpd_mask, "V2dV2dV2LLiV2dUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_vpermilvarpd256_mask, "V4dV4dV4LLiV4dUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_vpermilvarps_mask, "V4fV4fV4iV4fUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_vpermilvarps256_mask, "V8fV8fV8iV8fUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_vplzcntd_128_mask, "V4iV4iV4iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_vplzcntd_256_mask, "V8iV8iV8iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_vplzcntq_128_mask, "V2LLiV2LLiV2LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_vplzcntq_256_mask, "V4LLiV4LLiV4LLiUc","","avx512vl") #undef BUILTIN #undef TARGET_BUILTIN Index: lib/Headers/avx512bwintrin.h =================================================================== --- lib/Headers/avx512bwintrin.h +++ lib/Headers/avx512bwintrin.h @@ -1934,6 +1934,81 @@ __M); } +static __inline__ __mmask64 __DEFAULT_FN_ATTRS +_mm512_test_epi8_mask (__m512i __A, __m512i __B) +{ + return (__mmask64) __builtin_ia32_ptestmb512 ((__v64qi) __A, + (__v64qi) __B, + (__mmask64) -1); +} + +static __inline__ __mmask64 __DEFAULT_FN_ATTRS +_mm512_mask_test_epi8_mask (__mmask64 __U, __m512i __A, __m512i __B) +{ + return (__mmask64) __builtin_ia32_ptestmb512 ((__v64qi) __A, + (__v64qi) __B, __U); +} + +static __inline__ __mmask32 __DEFAULT_FN_ATTRS +_mm512_test_epi16_mask (__m512i __A, __m512i __B) +{ + return (__mmask32) __builtin_ia32_ptestmw512 ((__v32hi) __A, + (__v32hi) __B, + (__mmask32) -1); +} + +static __inline__ __mmask32 __DEFAULT_FN_ATTRS +_mm512_mask_test_epi16_mask (__mmask32 __U, __m512i __A, __m512i __B) +{ + return (__mmask32) __builtin_ia32_ptestmw512 ((__v32hi) __A, + (__v32hi) __B, __U); +} + +static __inline__ __mmask64 __DEFAULT_FN_ATTRS +_mm512_testn_epi8_mask (__m512i __A, __m512i __B) +{ + return (__mmask64) __builtin_ia32_ptestnmb512 ((__v64qi) __A, + (__v64qi) __B, + (__mmask64) -1); +} + +static __inline__ __mmask64 __DEFAULT_FN_ATTRS +_mm512_mask_testn_epi8_mask (__mmask64 __U, __m512i __A, __m512i __B) +{ + return (__mmask64) __builtin_ia32_ptestnmb512 ((__v64qi) __A, + (__v64qi) __B, __U); +} + +static __inline__ __mmask32 __DEFAULT_FN_ATTRS +_mm512_testn_epi16_mask (__m512i __A, __m512i __B) +{ + return (__mmask32) __builtin_ia32_ptestnmw512 ((__v32hi) __A, + (__v32hi) __B, + (__mmask32) -1); +} + +static __inline__ __mmask32 __DEFAULT_FN_ATTRS +_mm512_mask_testn_epi16_mask (__mmask32 __U, __m512i __A, __m512i __B) +{ + return (__mmask32) __builtin_ia32_ptestnmw512 ((__v32hi) __A, + (__v32hi) __B, __U); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm512_mask_storeu_epi16 (void *__P, __mmask32 __U, __m512i __A) +{ + __builtin_ia32_storedquhi512_mask ((__v32hi *) __P, + (__v32hi) __A, + (__mmask32) __U); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm512_mask_storeu_epi8 (void *__P, __mmask64 __U, __m512i __A) +{ + __builtin_ia32_storedquqi512_mask ((__v64qi *) __P, + (__v64qi) __A, + (__mmask64) __U); +} #undef __DEFAULT_FN_ATTRS #endif Index: lib/Headers/avx512fintrin.h =================================================================== --- lib/Headers/avx512fintrin.h +++ lib/Headers/avx512fintrin.h @@ -39,6 +39,96 @@ typedef unsigned char __mmask8; typedef unsigned short __mmask16; +typedef enum +{ + _MM_PERM_AAAA = 0x00, _MM_PERM_AAAB = 0x01, _MM_PERM_AAAC = 0x02, + _MM_PERM_AAAD = 0x03, _MM_PERM_AABA = 0x04, _MM_PERM_AABB = 0x05, + _MM_PERM_AABC = 0x06, _MM_PERM_AABD = 0x07, _MM_PERM_AACA = 0x08, + _MM_PERM_AACB = 0x09, _MM_PERM_AACC = 0x0A, _MM_PERM_AACD = 0x0B, + _MM_PERM_AADA = 0x0C, _MM_PERM_AADB = 0x0D, _MM_PERM_AADC = 0x0E, + _MM_PERM_AADD = 0x0F, _MM_PERM_ABAA = 0x10, _MM_PERM_ABAB = 0x11, + _MM_PERM_ABAC = 0x12, _MM_PERM_ABAD = 0x13, _MM_PERM_ABBA = 0x14, + _MM_PERM_ABBB = 0x15, _MM_PERM_ABBC = 0x16, _MM_PERM_ABBD = 0x17, + _MM_PERM_ABCA = 0x18, _MM_PERM_ABCB = 0x19, _MM_PERM_ABCC = 0x1A, + _MM_PERM_ABCD = 0x1B, _MM_PERM_ABDA = 0x1C, _MM_PERM_ABDB = 0x1D, + _MM_PERM_ABDC = 0x1E, _MM_PERM_ABDD = 0x1F, _MM_PERM_ACAA = 0x20, + _MM_PERM_ACAB = 0x21, _MM_PERM_ACAC = 0x22, _MM_PERM_ACAD = 0x23, + _MM_PERM_ACBA = 0x24, _MM_PERM_ACBB = 0x25, _MM_PERM_ACBC = 0x26, + _MM_PERM_ACBD = 0x27, _MM_PERM_ACCA = 0x28, _MM_PERM_ACCB = 0x29, + _MM_PERM_ACCC = 0x2A, _MM_PERM_ACCD = 0x2B, _MM_PERM_ACDA = 0x2C, + _MM_PERM_ACDB = 0x2D, _MM_PERM_ACDC = 0x2E, _MM_PERM_ACDD = 0x2F, + _MM_PERM_ADAA = 0x30, _MM_PERM_ADAB = 0x31, _MM_PERM_ADAC = 0x32, + _MM_PERM_ADAD = 0x33, _MM_PERM_ADBA = 0x34, _MM_PERM_ADBB = 0x35, + _MM_PERM_ADBC = 0x36, _MM_PERM_ADBD = 0x37, _MM_PERM_ADCA = 0x38, + _MM_PERM_ADCB = 0x39, _MM_PERM_ADCC = 0x3A, _MM_PERM_ADCD = 0x3B, + _MM_PERM_ADDA = 0x3C, _MM_PERM_ADDB = 0x3D, _MM_PERM_ADDC = 0x3E, + _MM_PERM_ADDD = 0x3F, _MM_PERM_BAAA = 0x40, _MM_PERM_BAAB = 0x41, + _MM_PERM_BAAC = 0x42, _MM_PERM_BAAD = 0x43, _MM_PERM_BABA = 0x44, + _MM_PERM_BABB = 0x45, _MM_PERM_BABC = 0x46, _MM_PERM_BABD = 0x47, + _MM_PERM_BACA = 0x48, _MM_PERM_BACB = 0x49, _MM_PERM_BACC = 0x4A, + _MM_PERM_BACD = 0x4B, _MM_PERM_BADA = 0x4C, _MM_PERM_BADB = 0x4D, + _MM_PERM_BADC = 0x4E, _MM_PERM_BADD = 0x4F, _MM_PERM_BBAA = 0x50, + _MM_PERM_BBAB = 0x51, _MM_PERM_BBAC = 0x52, _MM_PERM_BBAD = 0x53, + _MM_PERM_BBBA = 0x54, _MM_PERM_BBBB = 0x55, _MM_PERM_BBBC = 0x56, + _MM_PERM_BBBD = 0x57, _MM_PERM_BBCA = 0x58, _MM_PERM_BBCB = 0x59, + _MM_PERM_BBCC = 0x5A, _MM_PERM_BBCD = 0x5B, _MM_PERM_BBDA = 0x5C, + _MM_PERM_BBDB = 0x5D, _MM_PERM_BBDC = 0x5E, _MM_PERM_BBDD = 0x5F, + _MM_PERM_BCAA = 0x60, _MM_PERM_BCAB = 0x61, _MM_PERM_BCAC = 0x62, + _MM_PERM_BCAD = 0x63, _MM_PERM_BCBA = 0x64, _MM_PERM_BCBB = 0x65, + _MM_PERM_BCBC = 0x66, _MM_PERM_BCBD = 0x67, _MM_PERM_BCCA = 0x68, + _MM_PERM_BCCB = 0x69, _MM_PERM_BCCC = 0x6A, _MM_PERM_BCCD = 0x6B, + _MM_PERM_BCDA = 0x6C, _MM_PERM_BCDB = 0x6D, _MM_PERM_BCDC = 0x6E, + _MM_PERM_BCDD = 0x6F, _MM_PERM_BDAA = 0x70, _MM_PERM_BDAB = 0x71, + _MM_PERM_BDAC = 0x72, _MM_PERM_BDAD = 0x73, _MM_PERM_BDBA = 0x74, + _MM_PERM_BDBB = 0x75, _MM_PERM_BDBC = 0x76, _MM_PERM_BDBD = 0x77, + _MM_PERM_BDCA = 0x78, _MM_PERM_BDCB = 0x79, _MM_PERM_BDCC = 0x7A, + _MM_PERM_BDCD = 0x7B, _MM_PERM_BDDA = 0x7C, _MM_PERM_BDDB = 0x7D, + _MM_PERM_BDDC = 0x7E, _MM_PERM_BDDD = 0x7F, _MM_PERM_CAAA = 0x80, + _MM_PERM_CAAB = 0x81, _MM_PERM_CAAC = 0x82, _MM_PERM_CAAD = 0x83, + _MM_PERM_CABA = 0x84, _MM_PERM_CABB = 0x85, _MM_PERM_CABC = 0x86, + _MM_PERM_CABD = 0x87, _MM_PERM_CACA = 0x88, _MM_PERM_CACB = 0x89, + _MM_PERM_CACC = 0x8A, _MM_PERM_CACD = 0x8B, _MM_PERM_CADA = 0x8C, + _MM_PERM_CADB = 0x8D, _MM_PERM_CADC = 0x8E, _MM_PERM_CADD = 0x8F, + _MM_PERM_CBAA = 0x90, _MM_PERM_CBAB = 0x91, _MM_PERM_CBAC = 0x92, + _MM_PERM_CBAD = 0x93, _MM_PERM_CBBA = 0x94, _MM_PERM_CBBB = 0x95, + _MM_PERM_CBBC = 0x96, _MM_PERM_CBBD = 0x97, _MM_PERM_CBCA = 0x98, + _MM_PERM_CBCB = 0x99, _MM_PERM_CBCC = 0x9A, _MM_PERM_CBCD = 0x9B, + _MM_PERM_CBDA = 0x9C, _MM_PERM_CBDB = 0x9D, _MM_PERM_CBDC = 0x9E, + _MM_PERM_CBDD = 0x9F, _MM_PERM_CCAA = 0xA0, _MM_PERM_CCAB = 0xA1, + _MM_PERM_CCAC = 0xA2, _MM_PERM_CCAD = 0xA3, _MM_PERM_CCBA = 0xA4, + _MM_PERM_CCBB = 0xA5, _MM_PERM_CCBC = 0xA6, _MM_PERM_CCBD = 0xA7, + _MM_PERM_CCCA = 0xA8, _MM_PERM_CCCB = 0xA9, _MM_PERM_CCCC = 0xAA, + _MM_PERM_CCCD = 0xAB, _MM_PERM_CCDA = 0xAC, _MM_PERM_CCDB = 0xAD, + _MM_PERM_CCDC = 0xAE, _MM_PERM_CCDD = 0xAF, _MM_PERM_CDAA = 0xB0, + _MM_PERM_CDAB = 0xB1, _MM_PERM_CDAC = 0xB2, _MM_PERM_CDAD = 0xB3, + _MM_PERM_CDBA = 0xB4, _MM_PERM_CDBB = 0xB5, _MM_PERM_CDBC = 0xB6, + _MM_PERM_CDBD = 0xB7, _MM_PERM_CDCA = 0xB8, _MM_PERM_CDCB = 0xB9, + _MM_PERM_CDCC = 0xBA, _MM_PERM_CDCD = 0xBB, _MM_PERM_CDDA = 0xBC, + _MM_PERM_CDDB = 0xBD, _MM_PERM_CDDC = 0xBE, _MM_PERM_CDDD = 0xBF, + _MM_PERM_DAAA = 0xC0, _MM_PERM_DAAB = 0xC1, _MM_PERM_DAAC = 0xC2, + _MM_PERM_DAAD = 0xC3, _MM_PERM_DABA = 0xC4, _MM_PERM_DABB = 0xC5, + _MM_PERM_DABC = 0xC6, _MM_PERM_DABD = 0xC7, _MM_PERM_DACA = 0xC8, + _MM_PERM_DACB = 0xC9, _MM_PERM_DACC = 0xCA, _MM_PERM_DACD = 0xCB, + _MM_PERM_DADA = 0xCC, _MM_PERM_DADB = 0xCD, _MM_PERM_DADC = 0xCE, + _MM_PERM_DADD = 0xCF, _MM_PERM_DBAA = 0xD0, _MM_PERM_DBAB = 0xD1, + _MM_PERM_DBAC = 0xD2, _MM_PERM_DBAD = 0xD3, _MM_PERM_DBBA = 0xD4, + _MM_PERM_DBBB = 0xD5, _MM_PERM_DBBC = 0xD6, _MM_PERM_DBBD = 0xD7, + _MM_PERM_DBCA = 0xD8, _MM_PERM_DBCB = 0xD9, _MM_PERM_DBCC = 0xDA, + _MM_PERM_DBCD = 0xDB, _MM_PERM_DBDA = 0xDC, _MM_PERM_DBDB = 0xDD, + _MM_PERM_DBDC = 0xDE, _MM_PERM_DBDD = 0xDF, _MM_PERM_DCAA = 0xE0, + _MM_PERM_DCAB = 0xE1, _MM_PERM_DCAC = 0xE2, _MM_PERM_DCAD = 0xE3, + _MM_PERM_DCBA = 0xE4, _MM_PERM_DCBB = 0xE5, _MM_PERM_DCBC = 0xE6, + _MM_PERM_DCBD = 0xE7, _MM_PERM_DCCA = 0xE8, _MM_PERM_DCCB = 0xE9, + _MM_PERM_DCCC = 0xEA, _MM_PERM_DCCD = 0xEB, _MM_PERM_DCDA = 0xEC, + _MM_PERM_DCDB = 0xED, _MM_PERM_DCDC = 0xEE, _MM_PERM_DCDD = 0xEF, + _MM_PERM_DDAA = 0xF0, _MM_PERM_DDAB = 0xF1, _MM_PERM_DDAC = 0xF2, + _MM_PERM_DDAD = 0xF3, _MM_PERM_DDBA = 0xF4, _MM_PERM_DDBB = 0xF5, + _MM_PERM_DDBC = 0xF6, _MM_PERM_DDBD = 0xF7, _MM_PERM_DDCA = 0xF8, + _MM_PERM_DDCB = 0xF9, _MM_PERM_DDCC = 0xFA, _MM_PERM_DDCD = 0xFB, + _MM_PERM_DDDA = 0xFC, _MM_PERM_DDDB = 0xFD, _MM_PERM_DDDC = 0xFE, + _MM_PERM_DDDD = 0xFF +} _MM_PERM_ENUM; + /* Rounding mode macros. */ #define _MM_FROUND_TO_NEAREST_INT 0x00 #define _MM_FROUND_TO_NEG_INF 0x01 @@ -3703,6 +3793,1603 @@ __builtin_ia32_vcomiss ((__v4sf) (__A), (__v4sf) (__B), ( __P), ( __R));\ }) +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_sll_epi32 (__m512i __A, __m128i __B) +{ + return (__m512i) __builtin_ia32_pslld512_mask ((__v16si) __A, + (__v4si) __B, + (__v16si) + _mm512_setzero_si512 (), + (__mmask16) -1); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask_sll_epi32 (__m512i __W, __mmask16 __U, __m512i __A, __m128i __B) +{ + return (__m512i) __builtin_ia32_pslld512_mask ((__v16si) __A, + (__v4si) __B, + (__v16si) __W, + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_sll_epi32 (__mmask16 __U, __m512i __A, __m128i __B) +{ + return (__m512i) __builtin_ia32_pslld512_mask ((__v16si) __A, + (__v4si) __B, + (__v16si) + _mm512_setzero_si512 (), + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_sll_epi64 (__m512i __A, __m128i __B) +{ + return (__m512i) __builtin_ia32_psllq512_mask ((__v8di) __A, + (__v2di) __B, + (__v8di) + _mm512_setzero_si512 (), + (__mmask8) -1); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask_sll_epi64 (__m512i __W, __mmask8 __U, __m512i __A, __m128i __B) +{ + return (__m512i) __builtin_ia32_psllq512_mask ((__v8di) __A, + (__v2di) __B, + (__v8di) __W, + (__mmask8) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_sll_epi64 (__mmask8 __U, __m512i __A, __m128i __B) +{ + return (__m512i) __builtin_ia32_psllq512_mask ((__v8di) __A, + (__v2di) __B, + (__v8di) + _mm512_setzero_si512 (), + (__mmask8) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_sllv_epi32 (__m512i __X, __m512i __Y) +{ + return (__m512i) __builtin_ia32_psllv16si_mask ((__v16si) __X, + (__v16si) __Y, + (__v16si) + _mm512_setzero_si512 (), + (__mmask16) -1); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask_sllv_epi32 (__m512i __W, __mmask16 __U, __m512i __X, __m512i __Y) +{ + return (__m512i) __builtin_ia32_psllv16si_mask ((__v16si) __X, + (__v16si) __Y, + (__v16si) __W, + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_sllv_epi32 (__mmask16 __U, __m512i __X, __m512i __Y) +{ + return (__m512i) __builtin_ia32_psllv16si_mask ((__v16si) __X, + (__v16si) __Y, + (__v16si) + _mm512_setzero_si512 (), + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_sllv_epi64 (__m512i __X, __m512i __Y) +{ + return (__m512i) __builtin_ia32_psllv8di_mask ((__v8di) __X, + (__v8di) __Y, + (__v8di) + _mm512_undefined_pd (), + (__mmask8) -1); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask_sllv_epi64 (__m512i __W, __mmask8 __U, __m512i __X, __m512i __Y) +{ + return (__m512i) __builtin_ia32_psllv8di_mask ((__v8di) __X, + (__v8di) __Y, + (__v8di) __W, + (__mmask8) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_sllv_epi64 (__mmask8 __U, __m512i __X, __m512i __Y) +{ + return (__m512i) __builtin_ia32_psllv8di_mask ((__v8di) __X, + (__v8di) __Y, + (__v8di) + _mm512_setzero_si512 (), + (__mmask8) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_sra_epi32 (__m512i __A, __m128i __B) +{ + return (__m512i) __builtin_ia32_psrad512_mask ((__v16si) __A, + (__v4si) __B, + (__v16si) + _mm512_setzero_si512 (), + (__mmask16) -1); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask_sra_epi32 (__m512i __W, __mmask16 __U, __m512i __A, __m128i __B) +{ + return (__m512i) __builtin_ia32_psrad512_mask ((__v16si) __A, + (__v4si) __B, + (__v16si) __W, + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_sra_epi32 (__mmask16 __U, __m512i __A, __m128i __B) +{ + return (__m512i) __builtin_ia32_psrad512_mask ((__v16si) __A, + (__v4si) __B, + (__v16si) + _mm512_setzero_si512 (), + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_sra_epi64 (__m512i __A, __m128i __B) +{ + return (__m512i) __builtin_ia32_psraq512_mask ((__v8di) __A, + (__v2di) __B, + (__v8di) + _mm512_setzero_si512 (), + (__mmask8) -1); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask_sra_epi64 (__m512i __W, __mmask8 __U, __m512i __A, __m128i __B) +{ + return (__m512i) __builtin_ia32_psraq512_mask ((__v8di) __A, + (__v2di) __B, + (__v8di) __W, + (__mmask8) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_sra_epi64 (__mmask8 __U, __m512i __A, __m128i __B) +{ + return (__m512i) __builtin_ia32_psraq512_mask ((__v8di) __A, + (__v2di) __B, + (__v8di) + _mm512_setzero_si512 (), + (__mmask8) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_srav_epi32 (__m512i __X, __m512i __Y) +{ + return (__m512i) __builtin_ia32_psrav16si_mask ((__v16si) __X, + (__v16si) __Y, + (__v16si) + _mm512_setzero_si512 (), + (__mmask16) -1); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask_srav_epi32 (__m512i __W, __mmask16 __U, __m512i __X, __m512i __Y) +{ + return (__m512i) __builtin_ia32_psrav16si_mask ((__v16si) __X, + (__v16si) __Y, + (__v16si) __W, + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_srav_epi32 (__mmask16 __U, __m512i __X, __m512i __Y) +{ + return (__m512i) __builtin_ia32_psrav16si_mask ((__v16si) __X, + (__v16si) __Y, + (__v16si) + _mm512_setzero_si512 (), + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_srav_epi64 (__m512i __X, __m512i __Y) +{ + return (__m512i) __builtin_ia32_psrav8di_mask ((__v8di) __X, + (__v8di) __Y, + (__v8di) + _mm512_setzero_si512 (), + (__mmask8) -1); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask_srav_epi64 (__m512i __W, __mmask8 __U, __m512i __X, __m512i __Y) +{ + return (__m512i) __builtin_ia32_psrav8di_mask ((__v8di) __X, + (__v8di) __Y, + (__v8di) __W, + (__mmask8) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_srav_epi64 (__mmask8 __U, __m512i __X, __m512i __Y) +{ + return (__m512i) __builtin_ia32_psrav8di_mask ((__v8di) __X, + (__v8di) __Y, + (__v8di) + _mm512_setzero_si512 (), + (__mmask8) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_srl_epi32 (__m512i __A, __m128i __B) +{ + return (__m512i) __builtin_ia32_psrld512_mask ((__v16si) __A, + (__v4si) __B, + (__v16si) + _mm512_setzero_si512 (), + (__mmask16) -1); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask_srl_epi32 (__m512i __W, __mmask16 __U, __m512i __A, __m128i __B) +{ + return (__m512i) __builtin_ia32_psrld512_mask ((__v16si) __A, + (__v4si) __B, + (__v16si) __W, + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_srl_epi32 (__mmask16 __U, __m512i __A, __m128i __B) +{ + return (__m512i) __builtin_ia32_psrld512_mask ((__v16si) __A, + (__v4si) __B, + (__v16si) + _mm512_setzero_si512 (), + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_srl_epi64 (__m512i __A, __m128i __B) +{ + return (__m512i) __builtin_ia32_psrlq512_mask ((__v8di) __A, + (__v2di) __B, + (__v8di) + _mm512_setzero_si512 (), + (__mmask8) -1); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask_srl_epi64 (__m512i __W, __mmask8 __U, __m512i __A, __m128i __B) +{ + return (__m512i) __builtin_ia32_psrlq512_mask ((__v8di) __A, + (__v2di) __B, + (__v8di) __W, + (__mmask8) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_srl_epi64 (__mmask8 __U, __m512i __A, __m128i __B) +{ + return (__m512i) __builtin_ia32_psrlq512_mask ((__v8di) __A, + (__v2di) __B, + (__v8di) + _mm512_setzero_si512 (), + (__mmask8) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_srlv_epi32 (__m512i __X, __m512i __Y) +{ + return (__m512i) __builtin_ia32_psrlv16si_mask ((__v16si) __X, + (__v16si) __Y, + (__v16si) + _mm512_setzero_si512 (), + (__mmask16) -1); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask_srlv_epi32 (__m512i __W, __mmask16 __U, __m512i __X, __m512i __Y) +{ + return (__m512i) __builtin_ia32_psrlv16si_mask ((__v16si) __X, + (__v16si) __Y, + (__v16si) __W, + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_srlv_epi32 (__mmask16 __U, __m512i __X, __m512i __Y) +{ + return (__m512i) __builtin_ia32_psrlv16si_mask ((__v16si) __X, + (__v16si) __Y, + (__v16si) + _mm512_setzero_si512 (), + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_srlv_epi64 (__m512i __X, __m512i __Y) +{ + return (__m512i) __builtin_ia32_psrlv8di_mask ((__v8di) __X, + (__v8di) __Y, + (__v8di) + _mm512_setzero_si512 (), + (__mmask8) -1); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask_srlv_epi64 (__m512i __W, __mmask8 __U, __m512i __X, __m512i __Y) +{ + return (__m512i) __builtin_ia32_psrlv8di_mask ((__v8di) __X, + (__v8di) __Y, + (__v8di) __W, + (__mmask8) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_srlv_epi64 (__mmask8 __U, __m512i __X, __m512i __Y) +{ + return (__m512i) __builtin_ia32_psrlv8di_mask ((__v8di) __X, + (__v8di) __Y, + (__v8di) + _mm512_setzero_si512 (), + (__mmask8) __U); +} + +#define _mm512_ternarylogic_epi32( __A, __B, __C, imm) __extension__ ({ \ +__builtin_ia32_pternlogd512_mask ((__v16si)( __A),\ + (__v16si)( __B),\ + (__v16si)( __C),\ + ( imm), (__mmask16) -1);\ +}) + +#define _mm512_mask_ternarylogic_epi32( __A, __U, __B, __C, imm) __extension__ ({ \ +__builtin_ia32_pternlogd512_mask ((__v16si)( __A),\ + (__v16si)( __B),\ + (__v16si)( __C),\ + ( imm), (__mmask16)( __U));\ +}) + +#define _mm512_maskz_ternarylogic_epi32( __U, __A, __B, __C, imm) __extension__ ({ \ +__builtin_ia32_pternlogd512_maskz ((__v16si)( __A),\ + (__v16si)( __B),\ + (__v16si)( __C),\ + ( imm), (__mmask16)( __U));\ +}) + +#define _mm512_ternarylogic_epi64( __A, __B, __C, imm) __extension__ ({ \ +__builtin_ia32_pternlogq512_mask ((__v8di)( __A),\ + (__v8di)( __B),\ + (__v8di)( __C),( imm),\ + (__mmask8) -1);\ +}) + +#define _mm512_mask_ternarylogic_epi64( __A, __U, __B, __C, imm) __extension__ ({ \ +__builtin_ia32_pternlogq512_mask ((__v8di)( __A),\ + (__v8di)( __B),\ + (__v8di)( __C),( imm),\ + (__mmask8)( __U));\ +}) + +#define _mm512_maskz_ternarylogic_epi64( __U, __A, __B, __C, imm) __extension__ ({ \ +__builtin_ia32_pternlogq512_maskz ((__v8di)( __A),\ + (__v8di)( __B),\ + (__v8di)( __C),\ + ( imm), (__mmask8)( __U));\ +}) + +static __inline__ __mmask16 __DEFAULT_FN_ATTRS +_mm512_testn_epi32_mask (__m512i __A, __m512i __B) +{ + return (__mmask16) __builtin_ia32_ptestnmd512 ((__v16si) __A, + (__v16si) __B, + (__mmask16) -1); +} + +static __inline__ __mmask16 __DEFAULT_FN_ATTRS +_mm512_mask_testn_epi32_mask (__mmask16 __U, __m512i __A, __m512i __B) +{ + return (__mmask16) __builtin_ia32_ptestnmd512 ((__v16si) __A, + (__v16si) __B, __U); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm512_testn_epi64_mask (__m512i __A, __m512i __B) +{ + return (__mmask8) __builtin_ia32_ptestnmq512 ((__v8di) __A, + (__v8di) __B, + (__mmask8) -1); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm512_mask_testn_epi64_mask (__mmask8 __U, __m512i __A, __m512i __B) +{ + return (__mmask8) __builtin_ia32_ptestnmq512 ((__v8di) __A, + (__v8di) __B, __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_unpackhi_epi32 (__m512i __A, __m512i __B) +{ + return (__m512i) __builtin_ia32_punpckhdq512_mask ((__v16si) __A, + (__v16si) __B, + (__v16si) + _mm512_setzero_si512 (), + (__mmask16) -1); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask_unpackhi_epi32 (__m512i __W, __mmask16 __U, __m512i __A, + __m512i __B) +{ + return (__m512i) __builtin_ia32_punpckhdq512_mask ((__v16si) __A, + (__v16si) __B, + (__v16si) __W, + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_unpackhi_epi32 (__mmask16 __U, __m512i __A, __m512i __B) +{ + return (__m512i) __builtin_ia32_punpckhdq512_mask ((__v16si) __A, + (__v16si) __B, + (__v16si) + _mm512_setzero_si512 (), + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_unpackhi_epi64 (__m512i __A, __m512i __B) +{ + return (__m512i) __builtin_ia32_punpckhqdq512_mask ((__v8di) __A, + (__v8di) __B, + (__v8di) + _mm512_setzero_si512 (), + (__mmask8) -1); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask_unpackhi_epi64 (__m512i __W, __mmask8 __U, __m512i __A, __m512i __B) +{ + return (__m512i) __builtin_ia32_punpckhqdq512_mask ((__v8di) __A, + (__v8di) __B, + (__v8di) __W, + (__mmask8) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_unpackhi_epi64 (__mmask8 __U, __m512i __A, __m512i __B) +{ + return (__m512i) __builtin_ia32_punpckhqdq512_mask ((__v8di) __A, + (__v8di) __B, + (__v8di) + _mm512_setzero_si512 (), + (__mmask8) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_unpacklo_epi32 (__m512i __A, __m512i __B) +{ + return (__m512i) __builtin_ia32_punpckldq512_mask ((__v16si) __A, + (__v16si) __B, + (__v16si) + _mm512_setzero_si512 (), + (__mmask16) -1); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask_unpacklo_epi32 (__m512i __W, __mmask16 __U, __m512i __A, + __m512i __B) +{ + return (__m512i) __builtin_ia32_punpckldq512_mask ((__v16si) __A, + (__v16si) __B, + (__v16si) __W, + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_unpacklo_epi32 (__mmask16 __U, __m512i __A, __m512i __B) +{ + return (__m512i) __builtin_ia32_punpckldq512_mask ((__v16si) __A, + (__v16si) __B, + (__v16si) + _mm512_setzero_si512 (), + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_unpacklo_epi64 (__m512i __A, __m512i __B) +{ + return (__m512i) __builtin_ia32_punpcklqdq512_mask ((__v8di) __A, + (__v8di) __B, + (__v8di) + _mm512_setzero_si512 (), + (__mmask8) -1); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask_unpacklo_epi64 (__m512i __W, __mmask8 __U, __m512i __A, __m512i __B) +{ + return (__m512i) __builtin_ia32_punpcklqdq512_mask ((__v8di) __A, + (__v8di) __B, + (__v8di) __W, + (__mmask8) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_unpacklo_epi64 (__mmask8 __U, __m512i __A, __m512i __B) +{ + return (__m512i) __builtin_ia32_punpcklqdq512_mask ((__v8di) __A, + (__v8di) __B, + (__v8di) + _mm512_setzero_si512 (), + (__mmask8) __U); +} + +#define _mm_roundscale_round_sd( __A, __B, __imm, __R) __extension__ ({ \ +__builtin_ia32_rndscalesd_round_mask ((__v2df)( __A),\ + (__v2df)( __B), (__v2df) _mm_setzero_pd(),\ + (__mmask8) -1,( __imm),( __R));\ +}) + +#define _mm_roundscale_sd( __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_rndscalesd_round_mask ((__v2df)( __A),\ + (__v2df)( __B), (__v2df) _mm_setzero_pd(),\ + (__mmask8) -1, ( __imm),\ + _MM_FROUND_CUR_DIRECTION);\ +}) + +#define _mm_mask_roundscale_sd( __W, __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_rndscalesd_round_mask ( (__v2df)( __A),\ + (__v2df)( __B),\ + (__v2df)( __W),\ + (__mmask8)( __U),\ + (__imm),\ + _MM_FROUND_CUR_DIRECTION);\ +}) + +#define _mm_mask_roundscale_round_sd( __W, __U, __A, __B, __I, __R) __extension__ ({ \ +__builtin_ia32_rndscalesd_round_mask ( (__v2df)( __A),\ + (__v2df)( __B),\ + (__v2df)( __W),\ + (__mmask8)( __U),\ + __I,\ + __R);\ +}) + +#define _mm_maskz_roundscale_sd( __U, __A, __B, __I) __extension__ ({ \ +__builtin_ia32_rndscalesd_round_mask ( (__v2df)( __A),\ + (__v2df)( __B),\ + (__v2df) _mm_setzero_pd (),\ + (__mmask8)( __U),\ + __I,\ + _MM_FROUND_CUR_DIRECTION);\ +}) + +#define _mm_maskz_roundscale_round_sd( __U, __A, __B, __I, __R) __extension__ ({ \ +__builtin_ia32_rndscalesd_round_mask ( (__v2df)( __A),\ + (__v2df)( __B),\ + (__v2df) _mm_setzero_pd (),\ + (__mmask8)( __U),\ + __I,\ + __R);\ +}) + +#define _mm_roundscale_round_ss( __A, __B, __imm, __R) __extension__ ({ \ +__builtin_ia32_rndscaless_round_mask ((__v4sf)( __A),\ + (__v4sf)( __B), (__v4sf) _mm_setzero_ps(),\ + (__mmask8) -1, __imm, __R);\ +}) + +#define _mm_roundscale_ss( __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_rndscaless_round_mask ((__v4sf)( __A),\ + (__v4sf)( __B), (__v4sf) _mm_setzero_ps(),\ + (__mmask8) -1, ( __imm),\ + _MM_FROUND_CUR_DIRECTION);\ +}) + +#define _mm_mask_roundscale_ss( __W, __U, __A, __B, __I) __extension__ ({ \ +__builtin_ia32_rndscaless_round_mask ( (__v4sf)(( __)A),\ + (__v4sf)( __B),\ + (__v4sf)( __W),\ + (__mmask8)( __U),\ + __I,\ + _MM_FROUND_CUR_DIRECTION);\ +}) + +#define _mm_mask_roundscale_round_ss( __W, __U, __A, __B, __I, __R) __extension__ ({ \ +__builtin_ia32_rndscaless_round_mask ( (__v4sf)( __A),\ + (__v4sf)( __B),\ + (__v4sf)( __W),\ + (__mmask8)( __U),\ + __I,\ + __R);\ +}) + +#define _mm_maskz_roundscale_ss( __U, __A, __B, __I) __extension__ ({ \ +__builtin_ia32_rndscaless_round_mask ( (__v4sf)( __A),\ + (__v4sf)( __B),\ + (__v4sf) _mm_setzero_ps (),\ + (__mmask8)( __U),\ + __I,\ + _MM_FROUND_CUR_DIRECTION);\ +}) + +#define _mm_maskz_roundscale_ss( __U, __A, __B, __I, __R) __extension__ ({ \ +__builtin_ia32_rndscaless_round_mask ( (__v4sf)( __A),\ + (__v4sf)( __B),\ + (__v4sf) _mm_setzero_ps (),\ + (__mmask8)( __U),\ + __I,\ + __R);\ +}) + + +#define _mm512_scalef_round_pd( __A, __B, __R) __extension__ ({ \ +__builtin_ia32_scalefpd512_mask ((__v8df)( __A),\ + (__v8df)( __B),\ + (__v8df)\ + _mm512_undefined_pd (),\ + (__mmask8) -1,( __R));\ +}) + +#define _mm512_mask_scalef_round_pd( __W, __U, __A, __B, __R) __extension__ ({ \ +__builtin_ia32_scalefpd512_mask ((__v8df)( __A),\ + (__v8df)( __B),\ + (__v8df)( __W),\ + (__mmask8)( __U),( __R));\ +}) + +#define _mm512_maskz_scalef_round_pd( __U, __A, __B, __R) __extension__ ({ \ +__builtin_ia32_scalefpd512_mask ((__v8df)( __A),\ + (__v8df)( __B),\ + (__v8df)\ + _mm512_setzero_pd (),\ + (__mmask8)( __U),( __R));\ +}) + +static __inline__ __m512d __DEFAULT_FN_ATTRS +_mm512_scalef_pd (__m512d __A, __m512d __B) +{ + return (__m512d) __builtin_ia32_scalefpd512_mask ((__v8df) __A, + (__v8df) __B, + (__v8df) + _mm512_undefined_pd (), + (__mmask8) -1, + _MM_FROUND_CUR_DIRECTION); +} + +static __inline__ __m512d __DEFAULT_FN_ATTRS +_mm512_mask_scalef_pd (__m512d __W, __mmask8 __U, __m512d __A, __m512d __B) +{ + return (__m512d) __builtin_ia32_scalefpd512_mask ((__v8df) __A, + (__v8df) __B, + (__v8df) __W, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +static __inline__ __m512d __DEFAULT_FN_ATTRS +_mm512_maskz_scalef_pd (__mmask8 __U, __m512d __A, __m512d __B) +{ + return (__m512d) __builtin_ia32_scalefpd512_mask ((__v8df) __A, + (__v8df) __B, + (__v8df) + _mm512_setzero_pd (), + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm512_scalef_round_ps( __A, __B, __R) __extension__ ({ \ +__builtin_ia32_scalefps512_mask ((__v16sf)( __A),\ + (__v16sf)( __B),\ + (__v16sf)\ + _mm512_undefined_ps (),\ + (__mmask16) -1,( __R));\ +}) + +#define _mm512_mask_scalef_round_ps( __W, __U, __A, __B, __R) __extension__ ({ \ +__builtin_ia32_scalefps512_mask ((__v16sf)( __A),\ + (__v16sf)( __B),\ + (__v16sf)( __W),\ + (__mmask16)( __U),( __R));\ +}) + +#define _mm512_maskz_scalef_round_ps( __U, __A, __B, __R) __extension__ ({ \ +__builtin_ia32_scalefps512_mask ((__v16sf)( __A),\ + (__v16sf)( __B),\ + (__v16sf)\ + _mm512_setzero_ps (),\ + (__mmask16)( __U),( __R));\ +}) + +static __inline__ __m512 __DEFAULT_FN_ATTRS +_mm512_scalef_ps (__m512 __A, __m512 __B) +{ + return (__m512) __builtin_ia32_scalefps512_mask ((__v16sf) __A, + (__v16sf) __B, + (__v16sf) + _mm512_undefined_ps (), + (__mmask16) -1, + _MM_FROUND_CUR_DIRECTION); +} + +static __inline__ __m512 __DEFAULT_FN_ATTRS +_mm512_mask_scalef_ps (__m512 __W, __mmask16 __U, __m512 __A, __m512 __B) +{ + return (__m512) __builtin_ia32_scalefps512_mask ((__v16sf) __A, + (__v16sf) __B, + (__v16sf) __W, + (__mmask16) __U, + _MM_FROUND_CUR_DIRECTION); +} + +static __inline__ __m512 __DEFAULT_FN_ATTRS +_mm512_maskz_scalef_ps (__mmask16 __U, __m512 __A, __m512 __B) +{ + return (__m512) __builtin_ia32_scalefps512_mask ((__v16sf) __A, + (__v16sf) __B, + (__v16sf) + _mm512_setzero_ps (), + (__mmask16) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_scalef_round_sd( __A, __B, __R) __extension__ ({ \ +__builtin_ia32_scalefsd_round_mask ((__v2df)( __A),\ + (__v2df)( __B), (__v2df) _mm_setzero_pd(),\ + (__mmask8) -1,\ + ( __R));\ +}) + +static __inline__ __m128d __DEFAULT_FN_ATTRS +_mm_scalef_sd (__m128d __A, __m128d __B) +{ + return (__m128d) __builtin_ia32_scalefsd_round_mask ((__v2df) __A, + (__v2df)( __B), (__v2df) _mm_setzero_pd(), + (__mmask8) -1, + _MM_FROUND_CUR_DIRECTION); +} + + +static __inline__ __m128d __DEFAULT_FN_ATTRS +_mm_mask_scalef_sd (__m128d __W, __mmask8 __U, __m128d __A, __m128d __B) +{ + return (__m128d) __builtin_ia32_scalefsd_round_mask ( (__v2df) __A, + (__v2df) __B, + (__v2df) __W, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + + +#define _mm_mask_scalef_round_sd( __W, __U, __A, __B, __R) __extension__ ({ \ +__builtin_ia32_scalefsd_round_mask ((__v2df)( __A),\ + (__v2df)( __B), (__v2df) __W,\ + (__mmask8) __U,\ + ( __R));\ +}) + +static __inline__ __m128d __DEFAULT_FN_ATTRS +_mm_maskz_scalef_sd (__mmask8 __U, __m128d __A, __m128d __B) +{ + return (__m128d) __builtin_ia32_scalefsd_round_mask ( (__v2df) __A, + (__v2df) __B, + (__v2df) _mm_setzero_pd (), + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_maskz_scalef_round_sd( __U, __A, __B, __R) __extension__ ({ \ +__builtin_ia32_scalefsd_round_mask ((__v2df)( __A),\ + (__v2df)( __B), (__v2df) _mm_setzero_pd (),\ + (__mmask8) __U,\ + ( __R));\ +}) + +#define _mm_scalef_round_ss( __A, __B, __R) __extension__ ({ \ +__builtin_ia32_scalefss_round_mask ((__v4sf)( __A),\ + (__v4sf)( __B), (__v4sf) _mm_setzero_ps(),\ + (__mmask8) -1,\ + ( __R));\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_scalef_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_scalefss_round_mask ((__v4sf) __A, + (__v4sf)( __B), (__v4sf) _mm_setzero_ps(), + (__mmask8) -1, + _MM_FROUND_CUR_DIRECTION); +} + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask_scalef_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_scalefss_round_mask ( (__v4sf) __A, + (__v4sf) __B, + (__v4sf) __W, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_mask_scalef_round_ss( __W, __U, __A, __B, __R) __extension__ ({ \ +__builtin_ia32_scalefss_round_mask ((__v4sf)( __A),\ + (__v4sf)( __B), (__v4sf) __W,\ + (__mmask8) __U,\ + ( __R));\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_maskz_scalef_ss (__mmask8 __U, __m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_scalefss_round_mask ( (__v4sf) __A, + (__v4sf) __B, + (__v4sf) _mm_setzero_ps (), + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_maskz_scalef_round_ss( __U, __A, __B, __R) __extension__ ({ \ +__builtin_ia32_scalefss_round_mask ((__v4sf)( __A),\ + (__v4sf)( __B), (__v4sf) _mm_setzero_ps(),\ + (__mmask8) __U,\ + _MM_FROUND_CUR_DIRECTION);\ +}) + +#define _mm512_i64scatter_ps( __addr, __index, __v1, __scale) __extension__ ({ \ +__builtin_ia32_scatterdiv16sf ((__addr), (__mmask8) 0xFF,\ + (__v8di) (__index), (__v8sf) (__v1), (__scale));\ +}) + +#define _mm512_mask_i64scatter_ps( __addr, __mask, __index, __v1, __scale) __extension__ ({ \ +__builtin_ia32_scatterdiv16sf(__addr,( __mask), (__v8di)( __index),\ + (__v8sf)( __v1),( __scale));\ +}) + +#define _mm512_i64scatter_epi32( __addr, __index, __v1, __scale) __extension__ ({ \ +__builtin_ia32_scatterdiv16si (__addr, (__mmask8) 0xFF,\ + (__v8di)( __index), (__v8si)( __v1),( __scale));\ +}) + +#define _mm512_mask_i64scatter_epi32( __addr, __mask, __index, __v1, __scale) __extension__ ({ \ +__builtin_ia32_scatterdiv16si (__addr,( __mask), (__v8di)( __index),\ + (__v8si)( __v1),( __scale));\ +}) + +#define _mm512_i64scatter_pd( __addr, __index, __v1, __scale) __extension__ ({ \ +__builtin_ia32_scatterdiv8df (__addr, (__mmask8) 0xFF,\ + (__v8di)( __index), (__v8df)( __v1),( __scale));\ +}) + +#define _mm512_mask_i64scatter_pd( __addr, __mask, __index, __v1, __scale) __extension__ ({ \ +__builtin_ia32_scatterdiv8df (__addr,( __mask), (__v8di)( __index),\ + (__v8df)( __v1),( __scale));\ +}) + +#define _mm512_i64scatter_epi64( __addr, __mask,__v1, __scale) __extension__ ({ \ +__builtin_ia32_scatterdiv8di (__addr, (__mmask8) 0xFF,\ + (__v8di) __index, (__v8di)( __v1),( __scale));\ +}) + +#define _mm512_mask_i64scatter_epi64( __addr, __mask,__index, __v1, __scale) __extension__ ({ \ +__builtin_ia32_scatterdiv8di (__addr, __mask, (__v8di)( __index),\ + (__v8di)( __v1),( __scale));\ +}) + +#define _mm512_i32scatter_ps( __addr, __index, __v1, __scale) __extension__ ({ \ +__builtin_ia32_scattersiv16sf (__addr, (__mmask16) 0xFFFF,\ + (__v16si)( __index), (__v16sf)( __v1),( __scale));\ +}) + +#define _mm512_mask_i32scatter_ps( __addr, __mask, __index, __v1, __scale) __extension__ ({ \ +__builtin_ia32_scattersiv16sf (__addr,( __mask), (__v16si)( __index),\ + (__v16sf)( __v1),( __scale));\ +}) + +#define _mm512_i32scatter_epi32( __addr, __index, __v1, __scale) __extension__ ({ \ +__builtin_ia32_scattersiv16si (__addr, (__mmask16) 0xFFFF,\ + (__v16si)( __index), (__v16si)( __v1),( __scale));\ +}) + +#define _mm512_mask_i32scatter_epi32( __addr, __mask, __index, __v1, __scale) __extension__ ({ \ +__builtin_ia32_scattersiv16si (__addr,( __mask), (__v16si)( __index),\ + (__v16si)( __v1),( __scale));\ +}) + +#define _mm512_i32scatter_pd( __addr, __index, __v1, __scale) __extension__ ({ \ +__builtin_ia32_scattersiv8df (__addr, (__mmask8) 0xFF,\ + (__v8si)( __index), (__v8df)( __v1),( __scale));\ +}) + +#define _mm512_mask_i32scatter_pd( __addr, __mask, __index, __v1, __scale) __extension__ ({ \ +__builtin_ia32_scattersiv8df (__addr,( __mask), (__v8si)( __index),\ + (__v8df)( __v1),( __scale));\ +}) + +#define _mm512_i32scatter_epi64( __addr, __mask,__v1, __scale) __extension__ ({ \ +__builtin_ia32_scattersiv8di (__addr, (__mmask8) 0xFF,\ + (__v8si) __index, (__v8di)( __v1),( __scale));\ +}) + +#define _mm512_mask_i32scatter_epi64( __addr, __mask,__index, __v1, __scale) __extension__ ({ \ +__builtin_ia32_scattersiv8di (__addr, __mask, (__v8si)( __index),\ + (__v8di)( __v1),( __scale));\ +}) + +#define _mm512_shuffle_f32x4( __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_f32x4_mask ((__v16sf)( __A),\ + (__v16sf)( __B),( __imm),\ + (__v16sf)\ + _mm512_undefined_ps (),\ + (__mmask16) -1);\ +}) + +#define _mm512_mask_shuffle_f32x4( __W, __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_f32x4_mask ((__v16sf)( __A),\ + (__v16sf)( __B),( __imm),\ + (__v16sf)( __W),\ + (__mmask16)( __U));\ +}) + +#define _mm512_maskz_shuffle_f32x4( __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_f32x4_mask ((__v16sf)( __A),\ + (__v16sf)( __B),( __imm),\ + (__v16sf)\ + _mm512_setzero_ps (),\ + (__mmask16)( __U));\ +}) + +#define _mm512_shuffle_f64x2( __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_f64x2_mask ((__v8df)( __A),\ + (__v8df)( __B),( __imm),\ + (__v8df)\ + _mm512_undefined_pd (),\ + (__mmask8) -1);\ +}) + +#define _mm512_mask_shuffle_f64x2( __W, __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_f64x2_mask ((__v8df)( __A),\ + (__v8df)( __B),( __imm),\ + (__v8df)( __W),\ + (__mmask8)( __U));\ +}) + +#define _mm512_maskz_shuffle_f64x2( __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_f64x2_mask ((__v8df)( __A),\ + (__v8df)( __B),( __imm),\ + (__v8df)\ + _mm512_setzero_pd (),\ + (__mmask8)( __U));\ +}) + +#define _mm512_shuffle_i32x4( __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_i32x4_mask ((__v16si)( __A),\ + (__v16si)( __B),\ + ( __imm),\ + (__v16si)\ + _mm512_setzero_si512 (),\ + (__mmask16) -1);\ +}) + +#define _mm512_mask_shuffle_i32x4( __W, __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_i32x4_mask ((__v16si)( __A),\ + (__v16si)( __B),\ + ( __imm),\ + (__v16si)( __W),\ + (__mmask16)( __U));\ +}) + +#define _mm512_maskz_shuffle_i32x4( __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_i32x4_mask ((__v16si)( __A),\ + (__v16si)( __B),\ + ( __imm),\ + (__v16si)\ + _mm512_setzero_si512 (),\ + (__mmask16)( __U));\ +}) + +#define _mm512_shuffle_i64x2( __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_i64x2_mask ((__v8di)( __A),\ + (__v8di)( __B),( __imm),\ + (__v8di)\ + _mm512_setzero_si512 (),\ + (__mmask8) -1);\ +}) + +#define _mm512_mask_shuffle_i64x2( __W, __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_i64x2_mask ((__v8di)( __A),\ + (__v8di)( __B),( __imm),\ + (__v8di)( __W),\ + (__mmask8)( __U));\ +}) + +#define _mm512_maskz_shuffle_i64x2( __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_i64x2_mask ((__v8di)( __A),\ + (__v8di)( __B),( __imm),\ + (__v8di)\ + _mm512_setzero_si512 (),\ + (__mmask8)( __U));\ +}) + +#define _mm512_shuffle_pd( __M, __V, __imm) __extension__ ({ \ +__builtin_ia32_shufpd512_mask ((__v8df)( __M),\ + (__v8df)( __V),( __imm),\ + (__v8df)\ + _mm512_undefined_pd (),\ + (__mmask8) -1);\ +}) + +#define _mm512_mask_shuffle_pd( __W, __U, __M, __V, __imm) __extension__ ({ \ +__builtin_ia32_shufpd512_mask ((__v8df)( __M),\ + (__v8df)( __V),( __imm),\ + (__v8df)( __W),\ + (__mmask8)( __U));\ +}) + +#define _mm512_maskz_shuffle_pd( __U, __M, __V, __imm) __extension__ ({ \ +__builtin_ia32_shufpd512_mask ((__v8df)( __M),\ + (__v8df)( __V),( __imm),\ + (__v8df)\ + _mm512_setzero_pd (),\ + (__mmask8)( __U));\ +}) + +#define _mm512_shuffle_ps( __M, __V, __imm) __extension__ ({ \ +__builtin_ia32_shufps512_mask ((__v16sf)( __M),\ + (__v16sf)( __V),( __imm),\ + (__v16sf)\ + _mm512_undefined_ps (),\ + (__mmask16) -1);\ +}) + +#define _mm512_mask_shuffle_ps( __W, __U, __M, __V, __imm) __extension__ ({ \ +__builtin_ia32_shufps512_mask ((__v16sf)( __M),\ + (__v16sf)( __V),( __imm),\ + (__v16sf)( __W),\ + (__mmask16)( __U));\ +}) + +#define _mm512_maskz_shuffle_ps( __U, __M, __V, __imm) __extension__ ({ \ +__builtin_ia32_shufps512_mask ((__v16sf)( __M),\ + (__v16sf)( __V),( __imm),\ + (__v16sf)\ + _mm512_setzero_ps (),\ + (__mmask16)( __U));\ +}) + +#define _mm_sqrt_round_sd( __A, __B, __R) __extension__ ({ \ +__builtin_ia32_sqrtsd_round_mask ((__v2df)( __B),\ + (__v2df)( __A),(__v2df) _mm_setzero_pd(),\ + (__mmask8) -1,\ + ( __R));\ +}) + +static __inline__ __m128d __DEFAULT_FN_ATTRS +_mm_mask_sqrt_sd (__m128d __W, __mmask8 __U, __m128d __A, __m128d __B) +{ + return (__m128d) __builtin_ia32_sqrtsd_round_mask ( (__v2df) __B, + (__v2df) __A, + (__v2df) __W, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_mask_sqrt_round_sd( __W, __U, __A, __B, __R) __extension__ ({ \ +__builtin_ia32_sqrtsd_round_mask ((__v2df)( __B),\ + (__v2df)( __A),(__v2df) __W,\ + (__mmask8) __U,\ + ( __R));\ +}) + +static __inline__ __m128d __DEFAULT_FN_ATTRS +_mm_maskz_sqrt_sd (__mmask8 __U, __m128d __A, __m128d __B) +{ + return (__m128d) __builtin_ia32_sqrtsd_round_mask ( (__v2df) __B, + (__v2df) __A, + (__v2df) _mm_setzero_pd (), + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_maskz_sqrt_round_sd( __U, __A, __B, __R) __extension__ ({ \ +__builtin_ia32_sqrtsd_round_mask ((__v2df)( __B),\ + (__v2df)( __A),(__v2df) _mm_setzero_pd(),\ + (__mmask8) __U,\ + ( __R));\ +}) + +#define _mm_sqrt_round_ss( __A, __B, __R) __extension__ ({ \ +__builtin_ia32_sqrtss_round_mask ((__v4sf)( __B),\ + (__v4sf)( __A),(__v4sf) _mm_setzero_ps(),\ + (__mmask8) -1,\ + ( __R));\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask_sqrt_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_sqrtss_round_mask ( (__v4sf) __B, + (__v4sf) __A, + (__v4sf) __W, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_mask_sqrt_round_ss( __W, __U, __A, __B, __R) __extension__ ({ \ +__builtin_ia32_sqrtss_round_mask ((__v4sf)( __B),\ + (__v4sf)( __A),(__v4sf) __W,\ + (__mmask8) __U,\ + ( __R));\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_maskz_sqrt_ss (__mmask8 __U, __m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_sqrtss_round_mask ( (__v4sf) __A, + (__v4sf) __B, + (__v4sf) _mm_setzero_ps (), + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_maskz_sqrt_round_ss( __U, __A, __B, __R) __extension__ ({ \ +__builtin_ia32_sqrtss_round_mask ((__v4sf)( __B),\ + (__v4sf)( __A),(__v4sf) _mm_setzero_ps(),\ + (__mmask8) __U,\ + _MM_FROUND_CUR_DIRECTION);\ +}) + +static __inline__ __m512d __DEFAULT_FN_ATTRS +_mm512_mask_unpackhi_pd (__m512d __W, __mmask8 __U, __m512d __A, __m512d __B) +{ + return (__m512d) __builtin_ia32_unpckhpd512_mask ((__v8df) __A, + (__v8df) __B, + (__v8df) __W, + (__mmask8) __U); +} + +static __inline__ __m512d __DEFAULT_FN_ATTRS +_mm512_maskz_unpackhi_pd (__mmask8 __U, __m512d __A, __m512d __B) +{ + return (__m512d) __builtin_ia32_unpckhpd512_mask ((__v8df) __A, + (__v8df) __B, + (__v8df) + _mm512_setzero_pd (), + (__mmask8) __U); +} + +static __inline__ __m512 __DEFAULT_FN_ATTRS +_mm512_mask_unpackhi_ps (__m512 __W, __mmask16 __U, __m512 __A, __m512 __B) +{ + return (__m512) __builtin_ia32_unpckhps512_mask ((__v16sf) __A, + (__v16sf) __B, + (__v16sf) __W, + (__mmask16) __U); +} + +static __inline__ __m512 __DEFAULT_FN_ATTRS +_mm512_maskz_unpackhi_ps (__mmask16 __U, __m512 __A, __m512 __B) +{ + return (__m512) __builtin_ia32_unpckhps512_mask ((__v16sf) __A, + (__v16sf) __B, + (__v16sf) + _mm512_setzero_ps (), + (__mmask16) __U); +} + +static __inline__ __m512d __DEFAULT_FN_ATTRS +_mm512_mask_unpacklo_pd (__m512d __W, __mmask8 __U, __m512d __A, __m512d __B) +{ + return (__m512d) __builtin_ia32_unpcklpd512_mask ((__v8df) __A, + (__v8df) __B, + (__v8df) __W, + (__mmask8) __U); +} + +static __inline__ __m512d __DEFAULT_FN_ATTRS +_mm512_maskz_unpacklo_pd (__mmask8 __U, __m512d __A, __m512d __B) +{ + return (__m512d) __builtin_ia32_unpcklpd512_mask ((__v8df) __A, + (__v8df) __B, + (__v8df) + _mm512_setzero_pd (), + (__mmask8) __U); +} + +static __inline__ __m512 __DEFAULT_FN_ATTRS +_mm512_mask_unpacklo_ps (__m512 __W, __mmask16 __U, __m512 __A, __m512 __B) +{ + return (__m512) __builtin_ia32_unpcklps512_mask ((__v16sf) __A, + (__v16sf) __B, + (__v16sf) __W, + (__mmask16) __U); +} + +static __inline__ __m512 __DEFAULT_FN_ATTRS +_mm512_maskz_unpacklo_ps (__mmask16 __U, __m512 __A, __m512 __B) +{ + return (__m512) __builtin_ia32_unpcklps512_mask ((__v16sf) __A, + (__v16sf) __B, + (__v16sf) + _mm512_setzero_ps (), + (__mmask16) __U); +} + +#define _mm_cvt_roundsd_si32( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvtsd2si32 ((__v2df)( __A),( __R));\ +}) + +#define _mm_cvt_roundsd_i32( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvtsd2si32 ((__v2df)( __A),( __R));\ +}) + +#define _mm_cvt_roundsd_si64( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvtsd2si64 ((__v2df)( __A),( __R));\ +}) + +#define _mm_cvt_roundsd_i64( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvtsd2si64 ((__v2df)( __A),( __R));\ +}) + +#define _mm_cvt_roundsd_u32( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvtsd2usi32 ((__v2df)( __A),( __R));\ +}) + +static __inline__ unsigned __DEFAULT_FN_ATTRS +_mm_cvtsd_u32 (__m128d __A) +{ + return (unsigned) __builtin_ia32_vcvtsd2usi32 ((__v2df) __A, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_cvt_roundsd_u64( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvtsd2usi64 ((__v2df)( __A),( __R));\ +}) + +static __inline__ unsigned long long __DEFAULT_FN_ATTRS +_mm_cvtsd_u64 (__m128d __A) +{ + return (unsigned long long) __builtin_ia32_vcvtsd2usi64 ((__v2df) + __A, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_cvt_roundss_si32( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvtss2si32 ((__v4sf)( __A),( __R));\ +}) + +#define _mm_cvt_roundss_i32( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvtss2si32 ((__v4sf)( __A),( __R));\ +}) + +#define _mm_cvt_roundss_si64( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvtss2si64 ((__v4sf)( __A),( __R));\ +}) + +#define _mm_cvt_roundss_i64( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvtss2si64 ((__v4sf)( __A),( __R));\ +}) + +#define _mm_cvt_roundss_u32( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvtss2usi32 ((__v4sf)( __A),( __R));\ +}) + +static __inline__ unsigned __DEFAULT_FN_ATTRS +_mm_cvtss_u32 (__m128 __A) +{ + return (unsigned) __builtin_ia32_vcvtss2usi32 ((__v4sf) __A, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_cvt_roundss_u64( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvtss2usi64 ((__v4sf)( __A),( __R));\ +}) + +static __inline__ unsigned long long __DEFAULT_FN_ATTRS +_mm_cvtss_u64 (__m128 __A) +{ + return (unsigned long long) __builtin_ia32_vcvtss2usi64 ((__v4sf) + __A, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_cvtt_roundsd_i32( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvttsd2si32 ((__v2df)( __A),( __R));\ +}) + +#define _mm_cvtt_roundsd_si32( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvttsd2si32 ((__v2df)( __A),( __R));\ +}) + +static __inline__ int __DEFAULT_FN_ATTRS +_mm_cvttsd_i32 (__m128d __A) +{ + return (int) __builtin_ia32_vcvttsd2si32 ((__v2df) __A, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_cvtt_roundsd_si64( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvttsd2si64 ((__v2df)( __A),( __R));\ +}) + +#define _mm_cvtt_roundsd_i64( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvttsd2si64 ((__v2df)( __A),( __R));\ +}) + +static __inline__ long long __DEFAULT_FN_ATTRS +_mm_cvttsd_i64 (__m128d __A) +{ + return (long long) __builtin_ia32_vcvttsd2si64 ((__v2df) __A, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_cvtt_roundsd_u32( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvttsd2usi32 ((__v2df)( __A),( __R));\ +}) + +static __inline__ unsigned __DEFAULT_FN_ATTRS +_mm_cvttsd_u32 (__m128d __A) +{ + return (unsigned) __builtin_ia32_vcvttsd2usi32 ((__v2df) __A, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_cvtt_roundsd_u64( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvttsd2usi64 ((__v2df)( __A),( __R));\ +}) + +static __inline__ unsigned long long __DEFAULT_FN_ATTRS +_mm_cvttsd_u64 (__m128d __A) +{ + return (unsigned long long) __builtin_ia32_vcvttsd2usi64 ((__v2df) + __A, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_cvtt_roundss_i32( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvttss2si32 ((__v4sf)( __A),( __R));\ +}) + +#define _mm_cvtt_roundss_si32( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvttss2si32 ((__v4sf)( __A),( __R));\ +}) + +static __inline__ int __DEFAULT_FN_ATTRS +_mm_cvttss_i32 (__m128 __A) +{ + return (int) __builtin_ia32_vcvttss2si32 ((__v4sf) __A, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_cvtt_roundss_i64( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvttss2si64 ((__v4sf)( __A),( __R));\ +}) + +#define _mm_cvtt_roundss_si64( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvttss2si64 ((__v4sf)( __A),( __R));\ +}) + +static __inline__ long long __DEFAULT_FN_ATTRS +_mm_cvttss_i64 (__m128 __A) +{ + return (long long) __builtin_ia32_vcvttss2si64 ((__v4sf) __A, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_cvtt_roundss_u32( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvttss2usi32 ((__v4sf)( __A),( __R));\ +}) + +static __inline__ unsigned __DEFAULT_FN_ATTRS +_mm_cvttss_u32 (__m128 __A) +{ + return (unsigned) __builtin_ia32_vcvttss2usi32 ((__v4sf) __A, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_cvtt_roundss_u64( __A, __R) __extension__ ({ \ +__builtin_ia32_vcvttss2usi64 ((__v4sf)( __A),( __R));\ +}) + +static __inline__ unsigned long long __DEFAULT_FN_ATTRS +_mm_cvttss_u64 (__m128 __A) +{ + return (unsigned long long) __builtin_ia32_vcvttss2usi64 ((__v4sf) + __A, + _MM_FROUND_CUR_DIRECTION); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask2_permutex2var_epi32 (__m512i __A, __m512i __I, + __mmask16 __U, __m512i __B) +{ + return (__m512i) __builtin_ia32_vpermi2vard512_mask ((__v16si) __A, + (__v16si) __I + /* idx */ , + (__v16si) __B, + (__mmask16) __U); +} + +static __inline__ __m512d __DEFAULT_FN_ATTRS +_mm512_mask2_permutex2var_pd (__m512d __A, __m512i __I, __mmask8 __U, + __m512d __B) +{ + return (__m512d) __builtin_ia32_vpermi2varpd512_mask ((__v8df) __A, + (__v8di) __I + /* idx */ , + (__v8df) __B, + (__mmask8) __U); +} + +static __inline__ __m512 __DEFAULT_FN_ATTRS +_mm512_mask2_permutex2var_ps (__m512 __A, __m512i __I, __mmask16 __U, + __m512 __B) +{ + return (__m512) __builtin_ia32_vpermi2varps512_mask ((__v16sf) __A, + (__v16si) __I + /* idx */ , + (__v16sf) __B, + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_mask2_permutex2var_epi64 (__m512i __A, __m512i __I, + __mmask8 __U, __m512i __B) +{ + return (__m512i) __builtin_ia32_vpermi2varq512_mask ((__v8di) __A, + (__v8di) __I + /* idx */ , + (__v8di) __B, + (__mmask8) __U); +} + +#define _mm512_permute_pd( __X, __C) __extension__ ({ \ +__builtin_ia32_vpermilpd512_mask ((__v8df)( __X),( __C),\ + (__v8df)\ + _mm512_undefined_pd (),\ + (__mmask8) -1);\ +}) + +#define _mm512_mask_permute_pd( __W, __U, __X, __C) __extension__ ({ \ +__builtin_ia32_vpermilpd512_mask ((__v8df)( __X),( __C),\ + (__v8df)( __W),\ + (__mmask8)( __U));\ +}) + +#define _mm512_maskz_permute_pd( __U, __X, __C) __extension__ ({ \ +__builtin_ia32_vpermilpd512_mask ((__v8df)( __X),( __C),\ + (__v8df)\ + _mm512_setzero_pd (),\ + (__mmask8)( __U));\ +}) + +#define _mm512_permute_ps( __X, __C) __extension__ ({ \ +__builtin_ia32_vpermilps512_mask ((__v16sf)( __X),( __C),\ + (__v16sf)\ + _mm512_undefined_ps (),\ + (__mmask16) -1);\ +}) + +#define _mm512_mask_permute_ps( __W, __U, __X, __C) __extension__ ({ \ +__builtin_ia32_vpermilps512_mask ((__v16sf)( __X),( __C),\ + (__v16sf)( __W),\ + (__mmask16)( __U));\ +}) + +#define _mm512_maskz_permute_ps( __U, __X, __C) __extension__ ({ \ +__builtin_ia32_vpermilps512_mask ((__v16sf)( __X),( __C),\ + (__v16sf)\ + _mm512_setzero_ps (),\ + (__mmask16)( __U));\ +}) + +static __inline__ __m512d __DEFAULT_FN_ATTRS +_mm512_permutevar_pd (__m512d __A, __m512i __C) +{ + return (__m512d) __builtin_ia32_vpermilvarpd512_mask ((__v8df) __A, + (__v8di) __C, + (__v8df) + _mm512_undefined_pd (), + (__mmask8) -1); +} + +static __inline__ __m512d __DEFAULT_FN_ATTRS +_mm512_mask_permutevar_pd (__m512d __W, __mmask8 __U, __m512d __A, __m512i __C) +{ + return (__m512d) __builtin_ia32_vpermilvarpd512_mask ((__v8df) __A, + (__v8di) __C, + (__v8df) __W, + (__mmask8) __U); +} + +static __inline__ __m512d __DEFAULT_FN_ATTRS +_mm512_maskz_permutevar_pd (__mmask8 __U, __m512d __A, __m512i __C) +{ + return (__m512d) __builtin_ia32_vpermilvarpd512_mask ((__v8df) __A, + (__v8di) __C, + (__v8df) + _mm512_setzero_pd (), + (__mmask8) __U); +} + +static __inline__ __m512 __DEFAULT_FN_ATTRS +_mm512_permutevar_ps (__m512 __A, __m512i __C) +{ + return (__m512) __builtin_ia32_vpermilvarps512_mask ((__v16sf) __A, + (__v16si) __C, + (__v16sf) + _mm512_undefined_ps (), + (__mmask16) -1); +} + +static __inline__ __m512 __DEFAULT_FN_ATTRS +_mm512_mask_permutevar_ps (__m512 __W, __mmask16 __U, __m512 __A, __m512i __C) +{ + return (__m512) __builtin_ia32_vpermilvarps512_mask ((__v16sf) __A, + (__v16si) __C, + (__v16sf) __W, + (__mmask16) __U); +} + +static __inline__ __m512 __DEFAULT_FN_ATTRS +_mm512_maskz_permutevar_ps (__mmask16 __U, __m512 __A, __m512i __C) +{ + return (__m512) __builtin_ia32_vpermilvarps512_mask ((__v16sf) __A, + (__v16si) __C, + (__v16sf) + _mm512_setzero_ps (), + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_permutex2var_epi32 (__mmask16 __U, __m512i __A, + __m512i __I, __m512i __B) +{ + return (__m512i) __builtin_ia32_vpermt2vard512_maskz ((__v16si) __I + /* idx */ , + (__v16si) __A, + (__v16si) __B, + (__mmask16) __U); +} + +static __inline__ __m512d __DEFAULT_FN_ATTRS +_mm512_maskz_permutex2var_pd (__mmask8 __U, __m512d __A, __m512i __I, + __m512d __B) +{ + return (__m512d) __builtin_ia32_vpermt2varpd512_maskz ((__v8di) __I + /* idx */ , + (__v8df) __A, + (__v8df) __B, + (__mmask8) __U); +} + +static __inline__ __m512 __DEFAULT_FN_ATTRS +_mm512_maskz_permutex2var_ps (__mmask16 __U, __m512 __A, __m512i __I, + __m512 __B) +{ + return (__m512) __builtin_ia32_vpermt2varps512_maskz ((__v16si) __I + /* idx */ , + (__v16sf) __A, + (__v16sf) __B, + (__mmask16) __U); +} + +static __inline__ __m512i __DEFAULT_FN_ATTRS +_mm512_maskz_permutex2var_epi64 (__mmask8 __U, __m512i __A, + __m512i __I, __m512i __B) +{ + return (__m512i) __builtin_ia32_vpermt2varq512_maskz ((__v8di) __I + /* idx */ , + (__v8di) __A, + (__v8di) __B, + (__mmask8) __U); +} #undef __DEFAULT_FN_ATTRS Index: lib/Headers/avx512vlbwintrin.h =================================================================== --- lib/Headers/avx512vlbwintrin.h +++ lib/Headers/avx512vlbwintrin.h @@ -31,11 +31,6 @@ /* Define the default attributes for the functions in this file. */ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512vl,avx512bw"))) -static __inline __m128i __DEFAULT_FN_ATTRS -_mm_setzero_hi(void){ - return (__m128i){ 0LL, 0LL }; -} - /* Integer compare */ static __inline__ __mmask16 __DEFAULT_FN_ATTRS @@ -2952,6 +2947,160 @@ _mm256_setzero_si256 (), __M); } + +static __inline__ __mmask16 __DEFAULT_FN_ATTRS +_mm_test_epi8_mask (__m128i __A, __m128i __B) +{ + return (__mmask16) __builtin_ia32_ptestmb128 ((__v16qi) __A, + (__v16qi) __B, + (__mmask16) -1); +} + +static __inline__ __mmask16 __DEFAULT_FN_ATTRS +_mm_mask_test_epi8_mask (__mmask16 __U, __m128i __A, __m128i __B) +{ + return (__mmask16) __builtin_ia32_ptestmb128 ((__v16qi) __A, + (__v16qi) __B, __U); +} + +static __inline__ __mmask32 __DEFAULT_FN_ATTRS +_mm256_test_epi8_mask (__m256i __A, __m256i __B) +{ + return (__mmask32) __builtin_ia32_ptestmb256 ((__v32qi) __A, + (__v32qi) __B, + (__mmask32) -1); +} + +static __inline__ __mmask32 __DEFAULT_FN_ATTRS +_mm256_mask_test_epi8_mask (__mmask32 __U, __m256i __A, __m256i __B) +{ + return (__mmask32) __builtin_ia32_ptestmb256 ((__v32qi) __A, + (__v32qi) __B, __U); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm_test_epi16_mask (__m128i __A, __m128i __B) +{ + return (__mmask8) __builtin_ia32_ptestmw128 ((__v8hi) __A, + (__v8hi) __B, + (__mmask8) -1); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm_mask_test_epi16_mask (__mmask8 __U, __m128i __A, __m128i __B) +{ + return (__mmask8) __builtin_ia32_ptestmw128 ((__v8hi) __A, + (__v8hi) __B, __U); +} + +static __inline__ __mmask16 __DEFAULT_FN_ATTRS +_mm256_test_epi16_mask (__m256i __A, __m256i __B) +{ + return (__mmask16) __builtin_ia32_ptestmw256 ((__v16hi) __A, + (__v16hi) __B, + (__mmask16) -1); +} + +static __inline__ __mmask16 __DEFAULT_FN_ATTRS +_mm256_mask_test_epi16_mask (__mmask16 __U, __m256i __A, __m256i __B) +{ + return (__mmask16) __builtin_ia32_ptestmw256 ((__v16hi) __A, + (__v16hi) __B, __U); +} + +static __inline__ __mmask16 __DEFAULT_FN_ATTRS +_mm_testn_epi8_mask (__m128i __A, __m128i __B) +{ + return (__mmask16) __builtin_ia32_ptestnmb128 ((__v16qi) __A, + (__v16qi) __B, + (__mmask16) -1); +} + +static __inline__ __mmask16 __DEFAULT_FN_ATTRS +_mm_mask_testn_epi8_mask (__mmask16 __U, __m128i __A, __m128i __B) +{ + return (__mmask16) __builtin_ia32_ptestnmb128 ((__v16qi) __A, + (__v16qi) __B, __U); +} + +static __inline__ __mmask32 __DEFAULT_FN_ATTRS +_mm256_testn_epi8_mask (__m256i __A, __m256i __B) +{ + return (__mmask32) __builtin_ia32_ptestnmb256 ((__v32qi) __A, + (__v32qi) __B, + (__mmask32) -1); +} + +static __inline__ __mmask32 __DEFAULT_FN_ATTRS +_mm256_mask_testn_epi8_mask (__mmask32 __U, __m256i __A, __m256i __B) +{ + return (__mmask32) __builtin_ia32_ptestnmb256 ((__v32qi) __A, + (__v32qi) __B, __U); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm_testn_epi16_mask (__m128i __A, __m128i __B) +{ + return (__mmask8) __builtin_ia32_ptestnmw128 ((__v8hi) __A, + (__v8hi) __B, + (__mmask8) -1); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm_mask_testn_epi16_mask (__mmask8 __U, __m128i __A, __m128i __B) +{ + return (__mmask8) __builtin_ia32_ptestnmw128 ((__v8hi) __A, + (__v8hi) __B, __U); +} + +static __inline__ __mmask16 __DEFAULT_FN_ATTRS +_mm256_testn_epi16_mask (__m256i __A, __m256i __B) +{ + return (__mmask16) __builtin_ia32_ptestnmw256 ((__v16hi) __A, + (__v16hi) __B, + (__mmask16) -1); +} + +static __inline__ __mmask16 __DEFAULT_FN_ATTRS +_mm256_mask_testn_epi16_mask (__mmask16 __U, __m256i __A, __m256i __B) +{ + return (__mmask16) __builtin_ia32_ptestnmw256 ((__v16hi) __A, + (__v16hi) __B, __U); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm_mask_storeu_epi16 (void *__P, __mmask8 __U, __m128i __A) +{ + __builtin_ia32_storedquhi128_mask ((__v8hi *) __P, + (__v8hi) __A, + (__mmask8) __U); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm256_mask_storeu_epi16 (void *__P, __mmask16 __U, __m256i __A) +{ + __builtin_ia32_storedquhi256_mask ((__v16hi *) __P, + (__v16hi) __A, + (__mmask16) __U); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm_mask_storeu_epi8 (void *__P, __mmask16 __U, __m128i __A) +{ + __builtin_ia32_storedquqi128_mask ((__v16qi *) __P, + (__v16qi) __A, + (__mmask16) __U); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm256_mask_storeu_epi8 (void *__P, __mmask32 __U, __m256i __A) +{ + __builtin_ia32_storedquqi256_mask ((__v32qi *) __P, + (__v32qi) __A, + (__mmask32) __U); +} + + #undef __DEFAULT_FN_ATTRS #endif /* __AVX512VLBWINTRIN_H */ Index: lib/Headers/avx512vlintrin.h =================================================================== --- lib/Headers/avx512vlintrin.h +++ lib/Headers/avx512vlintrin.h @@ -36,6 +36,11 @@ return (__v2di){ 0, 0}; } +static __inline __m128i __DEFAULT_FN_ATTRS +_mm_setzero_hi(void){ + return (__m128i){ 0LL, 0LL }; +} + /* Integer compare */ static __inline__ __mmask8 __DEFAULT_FN_ATTRS_BOTH @@ -6068,6 +6073,1240 @@ _mm256_setzero_si256 (), __M); } + +#define _mm_ternarylogic_epi32( __A, __B, __C, imm) __extension__ ({ \ +__builtin_ia32_pternlogd128_mask ((__v4si)( __A),\ + (__v4si)( __B),\ + (__v4si)( __C),( imm),\ + (__mmask8) -1);\ +}) + +#define _mm_mask_ternarylogic_epi32( __A, __U, __B, __C, imm) __extension__ ({ \ +__builtin_ia32_pternlogd128_mask ((__v4si)( __A),\ + (__v4si)( __B),\ + (__v4si)( __C),( imm),\ + (__mmask8)( __U));\ +}) + +#define _mm_maskz_ternarylogic_epi32( __U, __A, __B, __C, imm) __extension__ ({ \ +__builtin_ia32_pternlogd128_maskz ((__v4si)( __A),\ + (__v4si)( __B),\ + (__v4si)( __C),\ + ( imm),\ + (__mmask8)( __U));\ +}) + +#define _mm256_ternarylogic_epi32( __A, __B, __C, imm) __extension__ ({ \ +__builtin_ia32_pternlogd256_mask ((__v8si)( __A),\ + (__v8si)( __B),\ + (__v8si)( __C),( imm),\ + (__mmask8) -1);\ +}) + +#define _mm256_mask_ternarylogic_epi32( __A, __U, __B, __C, imm) __extension__ ({ \ +__builtin_ia32_pternlogd256_mask ((__v8si)( __A),\ + (__v8si)( __B),\ + (__v8si)( __C),( imm),\ + (__mmask8)( __U));\ +}) + +#define _mm256_maskz_ternarylogic_epi32( __U, __A, __B, __C, imm) __extension__ ({ \ +__builtin_ia32_pternlogd256_maskz ((__v8si)( __A),\ + (__v8si)( __B),\ + (__v8si)( __C),\ + ( imm),\ + (__mmask8)( __U));\ +}) + +#define _mm_ternarylogic_epi64( __A, __B, __C, imm) __extension__ ({ \ +__builtin_ia32_pternlogq128_mask ((__v2di)( __A),\ + (__v2di)( __B),\ + (__v2di)( __C),( imm),\ + (__mmask8) -1);\ +}) + +#define _mm_mask_ternarylogic_epi64( __A, __U, __B, __C, imm) __extension__ ({ \ +__builtin_ia32_pternlogq128_mask ((__v2di)( __A),\ + (__v2di)( __B),\ + (__v2di)( __C),( imm),\ + (__mmask8)( __U));\ +}) + +#define _mm_maskz_ternarylogic_epi64( __U, __A, __B, __C, imm) __extension__ ({ \ +__builtin_ia32_pternlogq128_maskz ((__v2di)( __A),\ + (__v2di)( __B),\ + (__v2di)( __C),\ + ( imm),\ + (__mmask8)( __U));\ +}) + +#define _mm256_ternarylogic_epi64( __A, __B, __C, imm) __extension__ ({ \ +__builtin_ia32_pternlogq256_mask ((__v4di)( __A),\ + (__v4di)( __B),\ + (__v4di)( __C),( imm),\ + (__mmask8) -1);\ +}) + + +#define _mm256_mask_ternarylogic_epi64( __A, __U, __B, __C, imm) __extension__ ({ \ +__builtin_ia32_pternlogq256_mask ((__v4di)( __A),\ + (__v4di)( __B),\ + (__v4di)( __C),( imm),\ + (__mmask8)( __U));\ +}) + + +#define _mm256_maskz_ternarylogic_epi64( __U, __A, __B, __C, imm) __extension__ ({ \ +__builtin_ia32_pternlogq256_maskz ((__v4di)( __A),\ + (__v4di)( __B),\ + (__v4di)( __C),\ + ( imm),\ + (__mmask8)( __U));\ +}) + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm_test_epi32_mask (__m128i __A, __m128i __B) +{ + return (__mmask8) __builtin_ia32_ptestmd128 ((__v4si) __A, + (__v4si) __B, + (__mmask8) -1); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm_mask_test_epi32_mask (__mmask8 __U, __m128i __A, __m128i __B) +{ + return (__mmask8) __builtin_ia32_ptestmd128 ((__v4si) __A, + (__v4si) __B, __U); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm256_test_epi32_mask (__m256i __A, __m256i __B) +{ + return (__mmask8) __builtin_ia32_ptestmd256 ((__v8si) __A, + (__v8si) __B, + (__mmask8) -1); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm256_mask_test_epi32_mask (__mmask8 __U, __m256i __A, __m256i __B) +{ + return (__mmask8) __builtin_ia32_ptestmd256 ((__v8si) __A, + (__v8si) __B, __U); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm_test_epi64_mask (__m128i __A, __m128i __B) +{ + return (__mmask8) __builtin_ia32_ptestmq128 ((__v2di) __A, + (__v2di) __B, + (__mmask8) -1); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm_mask_test_epi64_mask (__mmask8 __U, __m128i __A, __m128i __B) +{ + return (__mmask8) __builtin_ia32_ptestmq128 ((__v2di) __A, + (__v2di) __B, __U); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm256_test_epi64_mask (__m256i __A, __m256i __B) +{ + return (__mmask8) __builtin_ia32_ptestmq256 ((__v4di) __A, + (__v4di) __B, + (__mmask8) -1); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm256_mask_test_epi64_mask (__mmask8 __U, __m256i __A, __m256i __B) +{ + return (__mmask8) __builtin_ia32_ptestmq256 ((__v4di) __A, + (__v4di) __B, __U); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm_testn_epi32_mask (__m128i __A, __m128i __B) +{ + return (__mmask8) __builtin_ia32_ptestnmd128 ((__v4si) __A, + (__v4si) __B, + (__mmask8) -1); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm_mask_testn_epi32_mask (__mmask8 __U, __m128i __A, __m128i __B) +{ + return (__mmask8) __builtin_ia32_ptestnmd128 ((__v4si) __A, + (__v4si) __B, __U); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm256_testn_epi32_mask (__m256i __A, __m256i __B) +{ + return (__mmask8) __builtin_ia32_ptestnmd256 ((__v8si) __A, + (__v8si) __B, + (__mmask8) -1); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm256_mask_testn_epi32_mask (__mmask8 __U, __m256i __A, __m256i __B) +{ + return (__mmask8) __builtin_ia32_ptestnmd256 ((__v8si) __A, + (__v8si) __B, __U); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm_testn_epi64_mask (__m128i __A, __m128i __B) +{ + return (__mmask8) __builtin_ia32_ptestnmq128 ((__v2di) __A, + (__v2di) __B, + (__mmask8) -1); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm_mask_testn_epi64_mask (__mmask8 __U, __m128i __A, __m128i __B) +{ + return (__mmask8) __builtin_ia32_ptestnmq128 ((__v2di) __A, + (__v2di) __B, __U); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm256_testn_epi64_mask (__m256i __A, __m256i __B) +{ + return (__mmask8) __builtin_ia32_ptestnmq256 ((__v4di) __A, + (__v4di) __B, + (__mmask8) -1); +} + +static __inline__ __mmask8 __DEFAULT_FN_ATTRS +_mm256_mask_testn_epi64_mask (__mmask8 __U, __m256i __A, __m256i __B) +{ + return (__mmask8) __builtin_ia32_ptestnmq256 ((__v4di) __A, + (__v4di) __B, __U); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_mask_unpackhi_epi32 (__m128i __W, __mmask8 __U, __m128i __A, + __m128i __B) +{ + return (__m128i) __builtin_ia32_punpckhdq128_mask ((__v4si) __A, + (__v4si) __B, + (__v4si) __W, + (__mmask8) __U); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_maskz_unpackhi_epi32 (__mmask8 __U, __m128i __A, __m128i __B) +{ + return (__m128i) __builtin_ia32_punpckhdq128_mask ((__v4si) __A, + (__v4si) __B, + (__v4si) + _mm_setzero_si128 (), + (__mmask8) __U); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm256_mask_unpackhi_epi32 (__m256i __W, __mmask8 __U, __m256i __A, + __m256i __B) +{ + return (__m256i) __builtin_ia32_punpckhdq256_mask ((__v8si) __A, + (__v8si) __B, + (__v8si) __W, + (__mmask8) __U); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm256_maskz_unpackhi_epi32 (__mmask8 __U, __m256i __A, __m256i __B) +{ + return (__m256i) __builtin_ia32_punpckhdq256_mask ((__v8si) __A, + (__v8si) __B, + (__v8si) + _mm256_setzero_si256 (), + (__mmask8) __U); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_mask_unpackhi_epi64 (__m128i __W, __mmask8 __U, __m128i __A, + __m128i __B) +{ + return (__m128i) __builtin_ia32_punpckhqdq128_mask ((__v2di) __A, + (__v2di) __B, + (__v2di) __W, + (__mmask8) __U); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_maskz_unpackhi_epi64 (__mmask8 __U, __m128i __A, __m128i __B) +{ + return (__m128i) __builtin_ia32_punpckhqdq128_mask ((__v2di) __A, + (__v2di) __B, + (__v2di) + _mm_setzero_di (), + (__mmask8) __U); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm256_mask_unpackhi_epi64 (__m256i __W, __mmask8 __U, __m256i __A, + __m256i __B) +{ + return (__m256i) __builtin_ia32_punpckhqdq256_mask ((__v4di) __A, + (__v4di) __B, + (__v4di) __W, + (__mmask8) __U); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm256_maskz_unpackhi_epi64 (__mmask8 __U, __m256i __A, __m256i __B) +{ + return (__m256i) __builtin_ia32_punpckhqdq256_mask ((__v4di) __A, + (__v4di) __B, + (__v4di) + _mm256_setzero_si256 (), + (__mmask8) __U); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_mask_unpacklo_epi32 (__m128i __W, __mmask8 __U, __m128i __A, + __m128i __B) +{ + return (__m128i) __builtin_ia32_punpckldq128_mask ((__v4si) __A, + (__v4si) __B, + (__v4si) __W, + (__mmask8) __U); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_maskz_unpacklo_epi32 (__mmask8 __U, __m128i __A, __m128i __B) +{ + return (__m128i) __builtin_ia32_punpckldq128_mask ((__v4si) __A, + (__v4si) __B, + (__v4si) + _mm_setzero_si128 (), + (__mmask8) __U); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm256_mask_unpacklo_epi32 (__m256i __W, __mmask8 __U, __m256i __A, + __m256i __B) +{ + return (__m256i) __builtin_ia32_punpckldq256_mask ((__v8si) __A, + (__v8si) __B, + (__v8si) __W, + (__mmask8) __U); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm256_maskz_unpacklo_epi32 (__mmask8 __U, __m256i __A, __m256i __B) +{ + return (__m256i) __builtin_ia32_punpckldq256_mask ((__v8si) __A, + (__v8si) __B, + (__v8si) + _mm256_setzero_si256 (), + (__mmask8) __U); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_mask_unpacklo_epi64 (__m128i __W, __mmask8 __U, __m128i __A, + __m128i __B) +{ + return (__m128i) __builtin_ia32_punpcklqdq128_mask ((__v2di) __A, + (__v2di) __B, + (__v2di) __W, + (__mmask8) __U); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_maskz_unpacklo_epi64 (__mmask8 __U, __m128i __A, __m128i __B) +{ + return (__m128i) __builtin_ia32_punpcklqdq128_mask ((__v2di) __A, + (__v2di) __B, + (__v2di) + _mm_setzero_di (), + (__mmask8) __U); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm256_mask_unpacklo_epi64 (__m256i __W, __mmask8 __U, __m256i __A, + __m256i __B) +{ + return (__m256i) __builtin_ia32_punpcklqdq256_mask ((__v4di) __A, + (__v4di) __B, + (__v4di) __W, + (__mmask8) __U); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm256_maskz_unpacklo_epi64 (__mmask8 __U, __m256i __A, __m256i __B) +{ + return (__m256i) __builtin_ia32_punpcklqdq256_mask ((__v4di) __A, + (__v4di) __B, + (__v4di) + _mm256_setzero_si256 (), + (__mmask8) __U); +} + +static __inline__ __m128d __DEFAULT_FN_ATTRS +_mm_rcp14_pd (__m128d __A) +{ + return (__m128d) __builtin_ia32_rcp14pd128_mask ((__v2df) __A, + (__v2df) + _mm_setzero_pd (), + (__mmask8) -1); +} + +static __inline__ __m128d __DEFAULT_FN_ATTRS +_mm_mask_rcp14_pd (__m128d __W, __mmask8 __U, __m128d __A) +{ + return (__m128d) __builtin_ia32_rcp14pd128_mask ((__v2df) __A, + (__v2df) __W, + (__mmask8) __U); +} + +static __inline__ __m128d __DEFAULT_FN_ATTRS +_mm_maskz_rcp14_pd (__mmask8 __U, __m128d __A) +{ + return (__m128d) __builtin_ia32_rcp14pd128_mask ((__v2df) __A, + (__v2df) + _mm_setzero_pd (), + (__mmask8) __U); +} + +static __inline__ __m256d __DEFAULT_FN_ATTRS +_mm256_rcp14_pd (__m256d __A) +{ + return (__m256d) __builtin_ia32_rcp14pd256_mask ((__v4df) __A, + (__v4df) + _mm256_setzero_pd (), + (__mmask8) -1); +} + +static __inline__ __m256d __DEFAULT_FN_ATTRS +_mm256_mask_rcp14_pd (__m256d __W, __mmask8 __U, __m256d __A) +{ + return (__m256d) __builtin_ia32_rcp14pd256_mask ((__v4df) __A, + (__v4df) __W, + (__mmask8) __U); +} + +static __inline__ __m256d __DEFAULT_FN_ATTRS +_mm256_maskz_rcp14_pd (__mmask8 __U, __m256d __A) +{ + return (__m256d) __builtin_ia32_rcp14pd256_mask ((__v4df) __A, + (__v4df) + _mm256_setzero_pd (), + (__mmask8) __U); +} + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_rcp14_ps (__m128 __A) +{ + return (__m128) __builtin_ia32_rcp14ps128_mask ((__v4sf) __A, + (__v4sf) + _mm_setzero_ps (), + (__mmask8) -1); +} + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask_rcp14_ps (__m128 __W, __mmask8 __U, __m128 __A) +{ + return (__m128) __builtin_ia32_rcp14ps128_mask ((__v4sf) __A, + (__v4sf) __W, + (__mmask8) __U); +} + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_maskz_rcp14_ps (__mmask8 __U, __m128 __A) +{ + return (__m128) __builtin_ia32_rcp14ps128_mask ((__v4sf) __A, + (__v4sf) + _mm_setzero_ps (), + (__mmask8) __U); +} + +static __inline__ __m256 __DEFAULT_FN_ATTRS +_mm256_rcp14_ps (__m256 __A) +{ + return (__m256) __builtin_ia32_rcp14ps256_mask ((__v8sf) __A, + (__v8sf) + _mm256_setzero_ps (), + (__mmask8) -1); +} + +static __inline__ __m256 __DEFAULT_FN_ATTRS +_mm256_mask_rcp14_ps (__m256 __W, __mmask8 __U, __m256 __A) +{ + return (__m256) __builtin_ia32_rcp14ps256_mask ((__v8sf) __A, + (__v8sf) __W, + (__mmask8) __U); +} + +static __inline__ __m256 __DEFAULT_FN_ATTRS +_mm256_maskz_rcp14_ps (__mmask8 __U, __m256 __A) +{ + return (__m256) __builtin_ia32_rcp14ps256_mask ((__v8sf) __A, + (__v8sf) + _mm256_setzero_ps (), + (__mmask8) __U); +} + +static __inline__ __m128d __DEFAULT_FN_ATTRS +_mm_rsqrt14_pd (__m128d __A) +{ + return (__m128d) __builtin_ia32_rsqrt14pd128_mask ((__v2df) __A, + (__v2df) + _mm_setzero_pd (), + (__mmask8) -1); +} + +static __inline__ __m128d __DEFAULT_FN_ATTRS +_mm_mask_rsqrt14_pd (__m128d __W, __mmask8 __U, __m128d __A) +{ + return (__m128d) __builtin_ia32_rsqrt14pd128_mask ((__v2df) __A, + (__v2df) __W, + (__mmask8) __U); +} + +static __inline__ __m128d __DEFAULT_FN_ATTRS +_mm_maskz_rsqrt14_pd (__mmask8 __U, __m128d __A) +{ + return (__m128d) __builtin_ia32_rsqrt14pd128_mask ((__v2df) __A, + (__v2df) + _mm_setzero_pd (), + (__mmask8) __U); +} + +static __inline__ __m256d __DEFAULT_FN_ATTRS +_mm256_rsqrt14_pd (__m256d __A) +{ + return (__m256d) __builtin_ia32_rsqrt14pd256_mask ((__v4df) __A, + (__v4df) + _mm256_setzero_pd (), + (__mmask8) -1); +} + +static __inline__ __m256d __DEFAULT_FN_ATTRS +_mm256_mask_rsqrt14_pd (__m256d __W, __mmask8 __U, __m256d __A) +{ + return (__m256d) __builtin_ia32_rsqrt14pd256_mask ((__v4df) __A, + (__v4df) __W, + (__mmask8) __U); +} + +static __inline__ __m256d __DEFAULT_FN_ATTRS +_mm256_maskz_rsqrt14_pd (__mmask8 __U, __m256d __A) +{ + return (__m256d) __builtin_ia32_rsqrt14pd256_mask ((__v4df) __A, + (__v4df) + _mm256_setzero_pd (), + (__mmask8) __U); +} + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_rsqrt14_ps (__m128 __A) +{ + return (__m128) __builtin_ia32_rsqrt14ps128_mask ((__v4sf) __A, + (__v4sf) + _mm_setzero_ps (), + (__mmask8) -1); +} + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask_rsqrt14_ps (__m128 __W, __mmask8 __U, __m128 __A) +{ + return (__m128) __builtin_ia32_rsqrt14ps128_mask ((__v4sf) __A, + (__v4sf) __W, + (__mmask8) __U); +} + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_maskz_rsqrt14_ps (__mmask8 __U, __m128 __A) +{ + return (__m128) __builtin_ia32_rsqrt14ps128_mask ((__v4sf) __A, + (__v4sf) + _mm_setzero_ps (), + (__mmask8) __U); +} + +static __inline__ __m256 __DEFAULT_FN_ATTRS +_mm256_rsqrt14_ps (__m256 __A) +{ + return (__m256) __builtin_ia32_rsqrt14ps256_mask ((__v8sf) __A, + (__v8sf) + _mm256_setzero_ps (), + (__mmask8) -1); +} + +static __inline__ __m256 __DEFAULT_FN_ATTRS +_mm256_mask_rsqrt14_ps (__m256 __W, __mmask8 __U, __m256 __A) +{ + return (__m256) __builtin_ia32_rsqrt14ps256_mask ((__v8sf) __A, + (__v8sf) __W, + (__mmask8) __U); +} + +static __inline__ __m256 __DEFAULT_FN_ATTRS +_mm256_maskz_rsqrt14_ps (__mmask8 __U, __m256 __A) +{ + return (__m256) __builtin_ia32_rsqrt14ps256_mask ((__v8sf) __A, + (__v8sf) + _mm256_setzero_ps (), + (__mmask8) __U); +} + +#define _mm256_shuffle_f32x4( __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_f32x4_256_mask ((__v8sf)( __A),\ + (__v8sf)( __B),\ + ( __imm),\ + (__v8sf)\ + _mm256_setzero_ps (),\ + (__mmask8) -1);\ +}) + +#define _mm256_mask_shuffle_f32x4( __W, __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_f32x4_256_mask ((__v8sf)( __A),\ + (__v8sf)( __B),\ + ( __imm),\ + (__v8sf)( __W),\ + (__mmask8)( __U));\ +}) + +#define _mm256_maskz_shuffle_f32x4( __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_f32x4_256_mask ((__v8sf)( __A),\ + (__v8sf)( __B),\ + ( __imm),\ + (__v8sf)\ + _mm256_setzero_ps (),\ + (__mmask8)( __U));\ +}) + +#define _mm256_shuffle_f64x2( __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_f64x2_256_mask ((__v4df)( __A),\ + (__v4df)( __B),\ + ( __imm),\ + (__v4df)\ + _mm256_setzero_pd (),\ + (__mmask8) -1);\ +}) + +#define _mm256_mask_shuffle_f64x2( __W, __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_f64x2_256_mask ((__v4df)( __A),\ + (__v4df)( __B),\ + ( __imm),\ + (__v4df)( __W),\ + (__mmask8)( __U));\ +}) + +#define _mm256_maskz_shuffle_f64x2( __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_f64x2_256_mask ((__v4df)( __A),\ + (__v4df)( __B),\ + ( __imm),\ + (__v4df)\ + _mm256_setzero_pd (),\ + (__mmask8)( __U));\ +}) + +#define _mm256_shuffle_i32x4( __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_i32x4_256_mask ((__v8si)( __A),\ + (__v8si)( __B),\ + ( __imm),\ + (__v8si)\ + _mm256_setzero_si256 (),\ + (__mmask8) -1);\ +}) + +#define _mm256_mask_shuffle_i32x4( __W, __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_i32x4_256_mask ((__v8si)( __A),\ + (__v8si)( __B),\ + ( __imm),\ + (__v8si)( __W),\ + (__mmask8)( __U));\ +}) + +#define _mm256_maskz_shuffle_i32x4( __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_i32x4_256_mask ((__v8si)( __A),\ + (__v8si)( __B),\ + ( __imm),\ + (__v8si)\ + _mm256_setzero_si256 (),\ + (__mmask8)( __U));\ +}) + +#define _mm256_shuffle_i64x2( __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_i64x2_256_mask ((__v4di)( __A),\ + (__v4di)( __B),\ + ( __imm),\ + (__v4di)\ + _mm256_setzero_si256 (),\ + (__mmask8) -1);\ +}) + +#define _mm256_mask_shuffle_i64x2( __W, __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_i64x2_256_mask ((__v4di)( __A),\ + (__v4di)( __B),\ + ( __imm),\ + (__v4di)( __W),\ + (__mmask8)( __U));\ +}) + +#define _mm256_maskz_shuffle_i64x2( __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shuf_i64x2_256_mask ((__v4di)( __A),\ + (__v4di)( __B),\ + ( __imm),\ + (__v4di)\ + _mm256_setzero_si256 (),\ + (__mmask8)( __U));\ +}) + +#define _mm_mask_shuffle_pd( __W, __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shufpd128_mask ((__v2df)( __A),\ + (__v2df)( __B),( __imm),\ + (__v2df)( __W),\ + (__mmask8)( __U));\ +}) + +#define _mm_maskz_shuffle_pd( __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shufpd128_mask ((__v2df)( __A),\ + (__v2df)( __B),( __imm),\ + (__v2df)\ + _mm_setzero_pd (),\ + (__mmask8)( __U));\ +}) + +#define _mm256_mask_shuffle_pd( __W, __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shufpd256_mask ((__v4df)( __A),\ + (__v4df)( __B),( __imm),\ + (__v4df)( __W),\ + (__mmask8)( __U));\ +}) + +#define _mm256_maskz_shuffle_pd( __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shufpd256_mask ((__v4df)( __A),\ + (__v4df)( __B),( __imm),\ + (__v4df)\ + _mm256_setzero_pd (),\ + (__mmask8)( __U));\ +}) + +#define _mm_mask_shuffle_ps( __W, __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shufps128_mask ((__v4sf)( __A),\ + (__v4sf)( __B),( __imm),\ + (__v4sf)( __W),\ + (__mmask8)( __U));\ +}) + +#define _mm_maskz_shuffle_ps( __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shufps128_mask ((__v4sf)( __A),\ + (__v4sf)( __B),( __imm),\ + (__v4sf)\ + _mm_setzero_ps (),\ + (__mmask8)( __U));\ +}) + +#define _mm256_mask_shuffle_ps( __W, __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shufps256_mask ((__v8sf)( __A),\ + (__v8sf)( __B),( __imm),\ + (__v8sf)( __W),\ + (__mmask8)( __U));\ +}) + +#define _mm256_maskz_shuffle_ps( __U, __A, __B, __imm) __extension__ ({ \ +__builtin_ia32_shufps256_mask ((__v8sf)( __A),\ + (__v8sf)( __B),( __imm),\ + (__v8sf)\ + _mm256_setzero_ps (),\ + (__mmask8)( __U));\ +}) + +static __inline__ void __DEFAULT_FN_ATTRS +_mm_mask_store_pd (void *__P, __mmask8 __U, __m128d __A) +{ + __builtin_ia32_storeapd128_mask ((__v2df *) __P, + (__v2df) __A, + (__mmask8) __U); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm256_mask_store_pd (void *__P, __mmask8 __U, __m256d __A) +{ + __builtin_ia32_storeapd256_mask ((__v4df *) __P, + (__v4df) __A, + (__mmask8) __U); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm_mask_store_ps (void *__P, __mmask8 __U, __m128 __A) +{ + __builtin_ia32_storeaps128_mask ((__v4sf *) __P, + (__v4sf) __A, + (__mmask8) __U); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm256_mask_store_ps (void *__P, __mmask8 __U, __m256 __A) +{ + __builtin_ia32_storeaps256_mask ((__v8sf *) __P, + (__v8sf) __A, + (__mmask8) __U); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm_mask_storeu_epi64 (void *__P, __mmask8 __U, __m128i __A) +{ + __builtin_ia32_storedqudi128_mask ((__v2di *) __P, + (__v2di) __A, + (__mmask8) __U); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm256_mask_storeu_epi64 (void *__P, __mmask8 __U, __m256i __A) +{ + __builtin_ia32_storedqudi256_mask ((__v4di *) __P, + (__v4di) __A, + (__mmask8) __U); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm_mask_storeu_epi32 (void *__P, __mmask8 __U, __m128i __A) +{ + __builtin_ia32_storedqusi128_mask ((__v4si *) __P, + (__v4si) __A, + (__mmask8) __U); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm256_mask_storeu_epi32 (void *__P, __mmask8 __U, __m256i __A) +{ + __builtin_ia32_storedqusi256_mask ((__v8si *) __P, + (__v8si) __A, + (__mmask8) __U); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm_mask_storeu_pd (void *__P, __mmask8 __U, __m128d __A) +{ + __builtin_ia32_storeupd128_mask ((__v2df *) __P, + (__v2df) __A, + (__mmask8) __U); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm256_mask_storeu_pd (void *__P, __mmask8 __U, __m256d __A) +{ + __builtin_ia32_storeupd256_mask ((__v4df *) __P, + (__v4df) __A, + (__mmask8) __U); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm_mask_storeu_ps (void *__P, __mmask8 __U, __m128 __A) +{ + __builtin_ia32_storeups128_mask ((__v4sf *) __P, + (__v4sf) __A, + (__mmask8) __U); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm256_mask_storeu_ps (void *__P, __mmask8 __U, __m256 __A) +{ + __builtin_ia32_storeups256_mask ((__v8sf *) __P, + (__v8sf) __A, + (__mmask8) __U); +} + +static __inline__ __m128d __DEFAULT_FN_ATTRS +_mm_mask_unpackhi_pd (__m128d __W, __mmask8 __U, __m128d __A, + __m128d __B) +{ + return (__m128d) __builtin_ia32_unpckhpd128_mask ((__v2df) __A, + (__v2df) __B, + (__v2df) __W, + (__mmask8) __U); +} + +static __inline__ __m128d __DEFAULT_FN_ATTRS +_mm_maskz_unpackhi_pd (__mmask8 __U, __m128d __A, __m128d __B) +{ + return (__m128d) __builtin_ia32_unpckhpd128_mask ((__v2df) __A, + (__v2df) __B, + (__v2df) + _mm_setzero_pd (), + (__mmask8) __U); +} + +static __inline__ __m256d __DEFAULT_FN_ATTRS +_mm256_mask_unpackhi_pd (__m256d __W, __mmask8 __U, __m256d __A, + __m256d __B) +{ + return (__m256d) __builtin_ia32_unpckhpd256_mask ((__v4df) __A, + (__v4df) __B, + (__v4df) __W, + (__mmask8) __U); +} + +static __inline__ __m256d __DEFAULT_FN_ATTRS +_mm256_maskz_unpackhi_pd (__mmask8 __U, __m256d __A, __m256d __B) +{ + return (__m256d) __builtin_ia32_unpckhpd256_mask ((__v4df) __A, + (__v4df) __B, + (__v4df) + _mm256_setzero_pd (), + (__mmask8) __U); +} + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask_unpackhi_ps (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_unpckhps128_mask ((__v4sf) __A, + (__v4sf) __B, + (__v4sf) __W, + (__mmask8) __U); +} + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_maskz_unpackhi_ps (__mmask8 __U, __m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_unpckhps128_mask ((__v4sf) __A, + (__v4sf) __B, + (__v4sf) + _mm_setzero_ps (), + (__mmask8) __U); +} + +static __inline__ __m256 __DEFAULT_FN_ATTRS +_mm256_mask_unpackhi_ps (__m256 __W, __mmask8 __U, __m256 __A, + __m256 __B) +{ + return (__m256) __builtin_ia32_unpckhps256_mask ((__v8sf) __A, + (__v8sf) __B, + (__v8sf) __W, + (__mmask8) __U); +} + +static __inline__ __m256 __DEFAULT_FN_ATTRS +_mm256_maskz_unpackhi_ps (__mmask8 __U, __m256 __A, __m256 __B) +{ + return (__m256) __builtin_ia32_unpckhps256_mask ((__v8sf) __A, + (__v8sf) __B, + (__v8sf) + _mm256_setzero_ps (), + (__mmask8) __U); +} + +static __inline__ __m128d __DEFAULT_FN_ATTRS +_mm_mask_unpacklo_pd (__m128d __W, __mmask8 __U, __m128d __A, + __m128d __B) +{ + return (__m128d) __builtin_ia32_unpcklpd128_mask ((__v2df) __A, + (__v2df) __B, + (__v2df) __W, + (__mmask8) __U); +} + +static __inline__ __m128d __DEFAULT_FN_ATTRS +_mm_maskz_unpacklo_pd (__mmask8 __U, __m128d __A, __m128d __B) +{ + return (__m128d) __builtin_ia32_unpcklpd128_mask ((__v2df) __A, + (__v2df) __B, + (__v2df) + _mm_setzero_pd (), + (__mmask8) __U); +} + +static __inline__ __m256d __DEFAULT_FN_ATTRS +_mm256_mask_unpacklo_pd (__m256d __W, __mmask8 __U, __m256d __A, + __m256d __B) +{ + return (__m256d) __builtin_ia32_unpcklpd256_mask ((__v4df) __A, + (__v4df) __B, + (__v4df) __W, + (__mmask8) __U); +} + +static __inline__ __m256d __DEFAULT_FN_ATTRS +_mm256_maskz_unpacklo_pd (__mmask8 __U, __m256d __A, __m256d __B) +{ + return (__m256d) __builtin_ia32_unpcklpd256_mask ((__v4df) __A, + (__v4df) __B, + (__v4df) + _mm256_setzero_pd (), + (__mmask8) __U); +} + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask_unpacklo_ps (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_unpcklps128_mask ((__v4sf) __A, + (__v4sf) __B, + (__v4sf) __W, + (__mmask8) __U); +} + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_maskz_unpacklo_ps (__mmask8 __U, __m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_unpcklps128_mask ((__v4sf) __A, + (__v4sf) __B, + (__v4sf) + _mm_setzero_ps (), + (__mmask8) __U); +} + +static __inline__ __m256 __DEFAULT_FN_ATTRS +_mm256_mask_unpacklo_ps (__m256 __W, __mmask8 __U, __m256 __A, + __m256 __B) +{ + return (__m256) __builtin_ia32_unpcklps256_mask ((__v8sf) __A, + (__v8sf) __B, + (__v8sf) __W, + (__mmask8) __U); +} + +static __inline__ __m256 __DEFAULT_FN_ATTRS +_mm256_maskz_unpacklo_ps (__mmask8 __U, __m256 __A, __m256 __B) +{ + return (__m256) __builtin_ia32_unpcklps256_mask ((__v8sf) __A, + (__v8sf) __B, + (__v8sf) + _mm256_setzero_ps (), + (__mmask8) __U); +} + +#define _mm_mask_permute_pd( __W, __U, __X, __C) __extension__ ({ \ +__builtin_ia32_vpermilpd_mask ((__v2df)( __X),( __C),\ + (__v2df)( __W),\ + (__mmask8)( __U));\ +}) + +#define _mm_maskz_permute_pd( __U, __X, __C) __extension__ ({ \ +__builtin_ia32_vpermilpd_mask ((__v2df)( __X),( __C),\ + (__v2df)\ + _mm_setzero_pd (),\ + (__mmask8)( __U));\ +}) + +#define _mm256_mask_permute_pd( __W, __U, __X, __C) __extension__ ({ \ +__builtin_ia32_vpermilpd256_mask ((__v4df)( __X),( __C),\ + (__v4df)( __W),\ + (__mmask8)( __U));\ +}) + +#define _mm256_maskz_permute_pd( __U, __X, __C) __extension__ ({ \ +__builtin_ia32_vpermilpd256_mask ((__v4df)( __X),( __C),\ + (__v4df)\ + _mm256_setzero_pd (),\ + (__mmask8)( __U));\ +}) + +#define _mm_mask_permute_ps( __W, __U, __X, __C) __extension__ ({ \ +__builtin_ia32_vpermilps_mask ((__v4sf)( __X),( __C),\ + (__v4sf)( __W),\ + (__mmask8)( __U));\ +}) + +#define _mm_maskz_permute_ps( __U, __X, __C) __extension__ ({ \ +__builtin_ia32_vpermilps_mask ((__v4sf)( __X),( __C),\ + (__v4sf)\ + _mm_setzero_ps (),\ + (__mmask8)( __U));\ +}) + +#define _mm256_mask_permute_ps( __W, __U, __X, __C) __extension__ ({ \ +__builtin_ia32_vpermilps256_mask ((__v8sf)( __X),( __C),\ + (__v8sf)( __W),\ + (__mmask8)( __U));\ +}) + +#define _mm256_maskz_permute_ps( __U, __X, __C) __extension__ ({ \ +__builtin_ia32_vpermilps256_mask ((__v8sf)( __X),( __C),\ + (__v8sf)\ + _mm256_setzero_ps (),\ + (__mmask8)( __U));\ +}) + +static __inline__ __m128d __DEFAULT_FN_ATTRS +_mm_mask_permutevar_pd (__m128d __W, __mmask8 __U, __m128d __A, + __m128i __C) +{ + return (__m128d) __builtin_ia32_vpermilvarpd_mask ((__v2df) __A, + (__v2di) __C, + (__v2df) __W, + (__mmask8) __U); +} + +static __inline__ __m128d __DEFAULT_FN_ATTRS +_mm_maskz_permutevar_pd (__mmask8 __U, __m128d __A, __m128i __C) +{ + return (__m128d) __builtin_ia32_vpermilvarpd_mask ((__v2df) __A, + (__v2di) __C, + (__v2df) + _mm_setzero_pd (), + (__mmask8) __U); +} + +static __inline__ __m256d __DEFAULT_FN_ATTRS +_mm256_mask_permutevar_pd (__m256d __W, __mmask8 __U, __m256d __A, + __m256i __C) +{ + return (__m256d) __builtin_ia32_vpermilvarpd256_mask ((__v4df) __A, + (__v4di) __C, + (__v4df) __W, + (__mmask8) + __U); +} + +static __inline__ __m256d __DEFAULT_FN_ATTRS +_mm256_maskz_permutevar_pd (__mmask8 __U, __m256d __A, __m256i __C) +{ + return (__m256d) __builtin_ia32_vpermilvarpd256_mask ((__v4df) __A, + (__v4di) __C, + (__v4df) + _mm256_setzero_pd (), + (__mmask8) + __U); +} + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask_permutevar_ps (__m128 __W, __mmask8 __U, __m128 __A, + __m128i __C) +{ + return (__m128) __builtin_ia32_vpermilvarps_mask ((__v4sf) __A, + (__v4si) __C, + (__v4sf) __W, + (__mmask8) __U); +} + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_maskz_permutevar_ps (__mmask8 __U, __m128 __A, __m128i __C) +{ + return (__m128) __builtin_ia32_vpermilvarps_mask ((__v4sf) __A, + (__v4si) __C, + (__v4sf) + _mm_setzero_ps (), + (__mmask8) __U); +} + +static __inline__ __m256 __DEFAULT_FN_ATTRS +_mm256_mask_permutevar_ps (__m256 __W, __mmask8 __U, __m256 __A, + __m256i __C) +{ + return (__m256) __builtin_ia32_vpermilvarps256_mask ((__v8sf) __A, + (__v8si) __C, + (__v8sf) __W, + (__mmask8) __U); +} + +static __inline__ __m256 __DEFAULT_FN_ATTRS +_mm256_maskz_permutevar_ps (__mmask8 __U, __m256 __A, __m256i __C) +{ + return (__m256) __builtin_ia32_vpermilvarps256_mask ((__v8sf) __A, + (__v8si) __C, + (__v8sf) + _mm256_setzero_ps (), + (__mmask8) __U); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_lzcnt_epi32 (__m128i __A) +{ + return (__m128i) __builtin_ia32_vplzcntd_128_mask ((__v4si) __A, + (__v4si) + _mm_setzero_si128 (), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_mask_lzcnt_epi32 (__m128i __W, __mmask8 __U, __m128i __A) +{ + return (__m128i) __builtin_ia32_vplzcntd_128_mask ((__v4si) __A, + (__v4si) __W, + (__mmask8) __U); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_maskz_lzcnt_epi32 (__mmask8 __U, __m128i __A) +{ + return (__m128i) __builtin_ia32_vplzcntd_128_mask ((__v4si) __A, + (__v4si) + _mm_setzero_si128 (), + (__mmask8) __U); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm256_lzcnt_epi32 (__m256i __A) +{ + return (__m256i) __builtin_ia32_vplzcntd_256_mask ((__v8si) __A, + (__v8si) + _mm256_setzero_si256 (), + (__mmask8) -1); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm256_mask_lzcnt_epi32 (__m256i __W, __mmask8 __U, __m256i __A) +{ + return (__m256i) __builtin_ia32_vplzcntd_256_mask ((__v8si) __A, + (__v8si) __W, + (__mmask8) __U); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm256_maskz_lzcnt_epi32 (__mmask8 __U, __m256i __A) +{ + return (__m256i) __builtin_ia32_vplzcntd_256_mask ((__v8si) __A, + (__v8si) + _mm256_setzero_si256 (), + (__mmask8) __U); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_lzcnt_epi64 (__m128i __A) +{ + return (__m128i) __builtin_ia32_vplzcntq_128_mask ((__v2di) __A, + (__v2di) + _mm_setzero_di (), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_mask_lzcnt_epi64 (__m128i __W, __mmask8 __U, __m128i __A) +{ + return (__m128i) __builtin_ia32_vplzcntq_128_mask ((__v2di) __A, + (__v2di) __W, + (__mmask8) __U); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_maskz_lzcnt_epi64 (__mmask8 __U, __m128i __A) +{ + return (__m128i) __builtin_ia32_vplzcntq_128_mask ((__v2di) __A, + (__v2di) + _mm_setzero_di (), + (__mmask8) __U); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm256_lzcnt_epi64 (__m256i __A) +{ + return (__m256i) __builtin_ia32_vplzcntq_256_mask ((__v4di) __A, + (__v4di) + _mm256_setzero_si256 (), + (__mmask8) -1); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm256_mask_lzcnt_epi64 (__m256i __W, __mmask8 __U, __m256i __A) +{ + return (__m256i) __builtin_ia32_vplzcntq_256_mask ((__v4di) __A, + (__v4di) __W, + (__mmask8) __U); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm256_maskz_lzcnt_epi64 (__mmask8 __U, __m256i __A) +{ + return (__m256i) __builtin_ia32_vplzcntq_256_mask ((__v4di) __A, + (__v4di) + _mm256_setzero_si256 (), + (__mmask8) __U); +} #undef __DEFAULT_FN_ATTRS #undef __DEFAULT_FN_ATTRS_BOTH Index: test/CodeGen/avx512bw-builtins.c =================================================================== --- test/CodeGen/avx512bw-builtins.c +++ test/CodeGen/avx512bw-builtins.c @@ -1311,4 +1311,64 @@ return _mm512_maskz_set1_epi8(__M, __A); } +__mmask64 test_mm512_test_epi8_mask(__m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_test_epi8_mask + // CHECK: @llvm.x86.avx512.ptestm.b.512 + return _mm512_test_epi8_mask(__A, __B); +} + +__mmask64 test_mm512_mask_test_epi8_mask(__mmask64 __U, __m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_mask_test_epi8_mask + // CHECK: @llvm.x86.avx512.ptestm.b.512 + return _mm512_mask_test_epi8_mask(__U, __A, __B); +} + +__mmask32 test_mm512_test_epi16_mask(__m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_test_epi16_mask + // CHECK: @llvm.x86.avx512.ptestm.w. + return _mm512_test_epi16_mask(__A, __B); +} + +__mmask32 test_mm512_mask_test_epi16_mask(__mmask32 __U, __m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_mask_test_epi16_mask + // CHECK: @llvm.x86.avx512.ptestm.w. + return _mm512_mask_test_epi16_mask(__U, __A, __B); +} + +__mmask64 test_mm512_testn_epi8_mask(__m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_testn_epi8_mask + // CHECK: @llvm.x86.avx512.ptestnm.b. + return _mm512_testn_epi8_mask(__A, __B); +} + +__mmask64 test_mm512_mask_testn_epi8_mask(__mmask64 __U, __m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_mask_testn_epi8_mask + // CHECK: @llvm.x86.avx512.ptestnm.b. + return _mm512_mask_testn_epi8_mask(__U, __A, __B); +} + +__mmask32 test_mm512_testn_epi16_mask(__m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_testn_epi16_mask + // CHECK: @llvm.x86.avx512.ptestnm.w. + return _mm512_testn_epi16_mask(__A, __B); +} + +__mmask32 test_mm512_mask_testn_epi16_mask(__mmask32 __U, __m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_mask_testn_epi16_mask + // CHECK: @llvm.x86.avx512.ptestnm.w. + return _mm512_mask_testn_epi16_mask(__U, __A, __B); +} + +void test_mm512_mask_storeu_epi16(void *__P, __mmask32 __U, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_storeu_epi16 + // CHECK: @llvm.x86.avx512.mask.storeu.w. + return _mm512_mask_storeu_epi16(__P, __U, __A); +} + +void test_mm512_mask_storeu_epi8(void *__P, __mmask64 __U, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_storeu_epi8 + // CHECK: @llvm.x86.avx512.mask.storeu.b. + return _mm512_mask_storeu_epi8(__P, __U, __A); +} + Index: test/CodeGen/avx512f-builtins.c =================================================================== --- test/CodeGen/avx512f-builtins.c +++ test/CodeGen/avx512f-builtins.c @@ -762,13 +762,13 @@ __mmask16 test_mm512_cmp_round_ps_mask(__m512 a, __m512 b) { // CHECK-LABEL: @test_mm512_cmp_round_ps_mask // CHECK: @llvm.x86.avx512.mask.cmp.ps.512 - return _mm512_cmp_round_ps_mask(a, b, 0, _MM_FROUND_TO_NEAREST_INT); + return _mm512_cmp_round_ps_mask(a, b, 0, _MM_FROUND_CUR_DIRECTION); } __mmask16 test_mm512_mask_cmp_round_ps_mask(__mmask16 m, __m512 a, __m512 b) { // CHECK-LABEL: @test_mm512_mask_cmp_round_ps_mask // CHECK: @llvm.x86.avx512.mask.cmp.ps.512 - return _mm512_mask_cmp_round_ps_mask(m, a, b, 0, _MM_FROUND_TO_NEAREST_INT); + return _mm512_mask_cmp_round_ps_mask(m, a, b, 0, _MM_FROUND_CUR_DIRECTION); } __mmask16 test_mm512_cmp_ps_mask(__m512 a, __m512 b) { @@ -786,13 +786,13 @@ __mmask8 test_mm512_cmp_round_pd_mask(__m512d a, __m512d b) { // CHECK-LABEL: @test_mm512_cmp_round_pd_mask // CHECK: @llvm.x86.avx512.mask.cmp.pd.512 - return _mm512_cmp_round_pd_mask(a, b, 0, _MM_FROUND_TO_NEAREST_INT); + return _mm512_cmp_round_pd_mask(a, b, 0, _MM_FROUND_CUR_DIRECTION); } __mmask8 test_mm512_mask_cmp_round_pd_mask(__mmask8 m, __m512d a, __m512d b) { // CHECK-LABEL: @test_mm512_mask_cmp_round_pd_mask // CHECK: @llvm.x86.avx512.mask.cmp.pd.512 - return _mm512_mask_cmp_round_pd_mask(m, a, b, 0, _MM_FROUND_TO_NEAREST_INT); + return _mm512_mask_cmp_round_pd_mask(m, a, b, 0, _MM_FROUND_CUR_DIRECTION); } __mmask8 test_mm512_cmp_pd_mask(__m512d a, __m512d b) { @@ -2375,3 +2375,1190 @@ // CHECK: @llvm.x86.avx512.vcomi.ss return _mm_comi_round_ss(__A, __B, 5, 3); } +__m512i test_mm512_sll_epi32(__m512i __A, __m128i __B) { + // CHECK-LABEL: @test_mm512_sll_epi32 + // CHECK: @llvm.x86.avx512.mask.psll.d + return _mm512_sll_epi32(__A, __B); +} + +__m512i test_mm512_mask_sll_epi32(__m512i __W, __mmask16 __U, __m512i __A, __m128i __B) { + // CHECK-LABEL: @test_mm512_mask_sll_epi32 + // CHECK: @llvm.x86.avx512.mask.psll.d + return _mm512_mask_sll_epi32(__W, __U, __A, __B); +} + +__m512i test_mm512_maskz_sll_epi32(__mmask16 __U, __m512i __A, __m128i __B) { + // CHECK-LABEL: @test_mm512_maskz_sll_epi32 + // CHECK: @llvm.x86.avx512.mask.psll.d + return _mm512_maskz_sll_epi32(__U, __A, __B); +} + +__m512i test_mm512_sll_epi64(__m512i __A, __m128i __B) { + // CHECK-LABEL: @test_mm512_sll_epi64 + // CHECK: @llvm.x86.avx512.mask.psll.q + return _mm512_sll_epi64(__A, __B); +} + +__m512i test_mm512_mask_sll_epi64(__m512i __W, __mmask8 __U, __m512i __A, __m128i __B) { + // CHECK-LABEL: @test_mm512_mask_sll_epi64 + // CHECK: @llvm.x86.avx512.mask.psll.q + return _mm512_mask_sll_epi64(__W, __U, __A, __B); +} + +__m512i test_mm512_maskz_sll_epi64(__mmask8 __U, __m512i __A, __m128i __B) { + // CHECK-LABEL: @test_mm512_maskz_sll_epi64 + // CHECK: @llvm.x86.avx512.mask.psll.q + return _mm512_maskz_sll_epi64(__U, __A, __B); +} + +__m512i test_mm512_sllv_epi32(__m512i __X, __m512i __Y) { + // CHECK-LABEL: @test_mm512_sllv_epi32 + // CHECK: @llvm.x86.avx512.mask.psllv.d + return _mm512_sllv_epi32(__X, __Y); +} + +__m512i test_mm512_mask_sllv_epi32(__m512i __W, __mmask16 __U, __m512i __X, __m512i __Y) { + // CHECK-LABEL: @test_mm512_mask_sllv_epi32 + // CHECK: @llvm.x86.avx512.mask.psllv.d + return _mm512_mask_sllv_epi32(__W, __U, __X, __Y); +} + +__m512i test_mm512_maskz_sllv_epi32(__mmask16 __U, __m512i __X, __m512i __Y) { + // CHECK-LABEL: @test_mm512_maskz_sllv_epi32 + // CHECK: @llvm.x86.avx512.mask.psllv.d + return _mm512_maskz_sllv_epi32(__U, __X, __Y); +} + +__m512i test_mm512_sllv_epi64(__m512i __X, __m512i __Y) { + // CHECK-LABEL: @test_mm512_sllv_epi64 + // CHECK: @llvm.x86.avx512.mask.psllv.q + return _mm512_sllv_epi64(__X, __Y); +} + +__m512i test_mm512_mask_sllv_epi64(__m512i __W, __mmask8 __U, __m512i __X, __m512i __Y) { + // CHECK-LABEL: @test_mm512_mask_sllv_epi64 + // CHECK: @llvm.x86.avx512.mask.psllv.q + return _mm512_mask_sllv_epi64(__W, __U, __X, __Y); +} + +__m512i test_mm512_maskz_sllv_epi64(__mmask8 __U, __m512i __X, __m512i __Y) { + // CHECK-LABEL: @test_mm512_maskz_sllv_epi64 + // CHECK: @llvm.x86.avx512.mask.psllv.q + return _mm512_maskz_sllv_epi64(__U, __X, __Y); +} + +__m512i test_mm512_sra_epi32(__m512i __A, __m128i __B) { + // CHECK-LABEL: @test_mm512_sra_epi32 + // CHECK: @llvm.x86.avx512.mask.psra.d + return _mm512_sra_epi32(__A, __B); +} + +__m512i test_mm512_mask_sra_epi32(__m512i __W, __mmask16 __U, __m512i __A, __m128i __B) { + // CHECK-LABEL: @test_mm512_mask_sra_epi32 + // CHECK: @llvm.x86.avx512.mask.psra.d + return _mm512_mask_sra_epi32(__W, __U, __A, __B); +} + +__m512i test_mm512_maskz_sra_epi32(__mmask16 __U, __m512i __A, __m128i __B) { + // CHECK-LABEL: @test_mm512_maskz_sra_epi32 + // CHECK: @llvm.x86.avx512.mask.psra.d + return _mm512_maskz_sra_epi32(__U, __A, __B); +} + +__m512i test_mm512_sra_epi64(__m512i __A, __m128i __B) { + // CHECK-LABEL: @test_mm512_sra_epi64 + // CHECK: @llvm.x86.avx512.mask.psra.q + return _mm512_sra_epi64(__A, __B); +} + +__m512i test_mm512_mask_sra_epi64(__m512i __W, __mmask8 __U, __m512i __A, __m128i __B) { + // CHECK-LABEL: @test_mm512_mask_sra_epi64 + // CHECK: @llvm.x86.avx512.mask.psra.q + return _mm512_mask_sra_epi64(__W, __U, __A, __B); +} + +__m512i test_mm512_maskz_sra_epi64(__mmask8 __U, __m512i __A, __m128i __B) { + // CHECK-LABEL: @test_mm512_maskz_sra_epi64 + // CHECK: @llvm.x86.avx512.mask.psra.q + return _mm512_maskz_sra_epi64(__U, __A, __B); +} + +__m512i test_mm512_srav_epi32(__m512i __X, __m512i __Y) { + // CHECK-LABEL: @test_mm512_srav_epi32 + // CHECK: @llvm.x86.avx512.mask.psrav.d + return _mm512_srav_epi32(__X, __Y); +} + +__m512i test_mm512_mask_srav_epi32(__m512i __W, __mmask16 __U, __m512i __X, __m512i __Y) { + // CHECK-LABEL: @test_mm512_mask_srav_epi32 + // CHECK: @llvm.x86.avx512.mask.psrav.d + return _mm512_mask_srav_epi32(__W, __U, __X, __Y); +} + +__m512i test_mm512_maskz_srav_epi32(__mmask16 __U, __m512i __X, __m512i __Y) { + // CHECK-LABEL: @test_mm512_maskz_srav_epi32 + // CHECK: @llvm.x86.avx512.mask.psrav.d + return _mm512_maskz_srav_epi32(__U, __X, __Y); +} + +__m512i test_mm512_srav_epi64(__m512i __X, __m512i __Y) { + // CHECK-LABEL: @test_mm512_srav_epi64 + // CHECK: @llvm.x86.avx512.mask.psrav.q + return _mm512_srav_epi64(__X, __Y); +} + +__m512i test_mm512_mask_srav_epi64(__m512i __W, __mmask8 __U, __m512i __X, __m512i __Y) { + // CHECK-LABEL: @test_mm512_mask_srav_epi64 + // CHECK: @llvm.x86.avx512.mask.psrav.q + return _mm512_mask_srav_epi64(__W, __U, __X, __Y); +} + +__m512i test_mm512_maskz_srav_epi64(__mmask8 __U, __m512i __X, __m512i __Y) { + // CHECK-LABEL: @test_mm512_maskz_srav_epi64 + // CHECK: @llvm.x86.avx512.mask.psrav.q + return _mm512_maskz_srav_epi64(__U, __X, __Y); +} + +__m512i test_mm512_srl_epi32(__m512i __A, __m128i __B) { + // CHECK-LABEL: @test_mm512_srl_epi32 + // CHECK: @llvm.x86.avx512.mask.psrl.d + return _mm512_srl_epi32(__A, __B); +} + +__m512i test_mm512_mask_srl_epi32(__m512i __W, __mmask16 __U, __m512i __A, __m128i __B) { + // CHECK-LABEL: @test_mm512_mask_srl_epi32 + // CHECK: @llvm.x86.avx512.mask.psrl.d + return _mm512_mask_srl_epi32(__W, __U, __A, __B); +} + +__m512i test_mm512_maskz_srl_epi32(__mmask16 __U, __m512i __A, __m128i __B) { + // CHECK-LABEL: @test_mm512_maskz_srl_epi32 + // CHECK: @llvm.x86.avx512.mask.psrl.d + return _mm512_maskz_srl_epi32(__U, __A, __B); +} + +__m512i test_mm512_srl_epi64(__m512i __A, __m128i __B) { + // CHECK-LABEL: @test_mm512_srl_epi64 + // CHECK: @llvm.x86.avx512.mask.psrl.q + return _mm512_srl_epi64(__A, __B); +} + +__m512i test_mm512_mask_srl_epi64(__m512i __W, __mmask8 __U, __m512i __A, __m128i __B) { + // CHECK-LABEL: @test_mm512_mask_srl_epi64 + // CHECK: @llvm.x86.avx512.mask.psrl.q + return _mm512_mask_srl_epi64(__W, __U, __A, __B); +} + +__m512i test_mm512_maskz_srl_epi64(__mmask8 __U, __m512i __A, __m128i __B) { + // CHECK-LABEL: @test_mm512_maskz_srl_epi64 + // CHECK: @llvm.x86.avx512.mask.psrl.q + return _mm512_maskz_srl_epi64(__U, __A, __B); +} + +__m512i test_mm512_srlv_epi32(__m512i __X, __m512i __Y) { + // CHECK-LABEL: @test_mm512_srlv_epi32 + // CHECK: @llvm.x86.avx512.mask.psrlv.d + return _mm512_srlv_epi32(__X, __Y); +} + +__m512i test_mm512_mask_srlv_epi32(__m512i __W, __mmask16 __U, __m512i __X, __m512i __Y) { + // CHECK-LABEL: @test_mm512_mask_srlv_epi32 + // CHECK: @llvm.x86.avx512.mask.psrlv.d + return _mm512_mask_srlv_epi32(__W, __U, __X, __Y); +} + +__m512i test_mm512_maskz_srlv_epi32(__mmask16 __U, __m512i __X, __m512i __Y) { + // CHECK-LABEL: @test_mm512_maskz_srlv_epi32 + // CHECK: @llvm.x86.avx512.mask.psrlv.d + return _mm512_maskz_srlv_epi32(__U, __X, __Y); +} + +__m512i test_mm512_srlv_epi64(__m512i __X, __m512i __Y) { + // CHECK-LABEL: @test_mm512_srlv_epi64 + // CHECK: @llvm.x86.avx512.mask.psrlv.q + return _mm512_srlv_epi64(__X, __Y); +} + +__m512i test_mm512_mask_srlv_epi64(__m512i __W, __mmask8 __U, __m512i __X, __m512i __Y) { + // CHECK-LABEL: @test_mm512_mask_srlv_epi64 + // CHECK: @llvm.x86.avx512.mask.psrlv.q + return _mm512_mask_srlv_epi64(__W, __U, __X, __Y); +} + +__m512i test_mm512_maskz_srlv_epi64(__mmask8 __U, __m512i __X, __m512i __Y) { + // CHECK-LABEL: @test_mm512_maskz_srlv_epi64 + // CHECK: @llvm.x86.avx512.mask.psrlv.q + return _mm512_maskz_srlv_epi64(__U, __X, __Y); +} + +__m512i test_mm512_ternarylogic_epi32(__m512i __A, __m512i __B, __m512i __C) { + // CHECK-LABEL: @test_mm512_ternarylogic_epi32 + // CHECK: @llvm.x86.avx512.mask.pternlog.d.512 + return _mm512_ternarylogic_epi32(__A, __B, __C, 4); +} + +__m512i test_mm512_mask_ternarylogic_epi32(__m512i __A, __mmask16 __U, __m512i __B, __m512i __C) { + // CHECK-LABEL: @test_mm512_mask_ternarylogic_epi32 + // CHECK: @llvm.x86.avx512.mask.pternlog.d.512 + return _mm512_mask_ternarylogic_epi32(__A, __U, __B, __C, 4); +} + +__m512i test_mm512_maskz_ternarylogic_epi32(__mmask16 __U, __m512i __A, __m512i __B, __m512i __C) { + // CHECK-LABEL: @test_mm512_maskz_ternarylogic_epi32 + // CHECK: @llvm.x86.avx512.maskz.pternlog.d.512 + return _mm512_maskz_ternarylogic_epi32(__U, __A, __B, __C, 4); +} + +__m512i test_mm512_ternarylogic_epi64(__m512i __A, __m512i __B, __m512i __C) { + // CHECK-LABEL: @test_mm512_ternarylogic_epi64 + // CHECK: @llvm.x86.avx512.mask.pternlog.q.512 + return _mm512_ternarylogic_epi64(__A, __B, __C, 4); +} + +__m512i test_mm512_mask_ternarylogic_epi64(__m512i __A, __mmask8 __U, __m512i __B, __m512i __C) { + // CHECK-LABEL: @test_mm512_mask_ternarylogic_epi64 + // CHECK: @llvm.x86.avx512.mask.pternlog.q.512 + return _mm512_mask_ternarylogic_epi64(__A, __U, __B, __C, 4); +} + +__m512i test_mm512_maskz_ternarylogic_epi64(__mmask8 __U, __m512i __A, __m512i __B, __m512i __C) { + // CHECK-LABEL: @test_mm512_maskz_ternarylogic_epi64 + // CHECK: @llvm.x86.avx512.maskz.pternlog.q.512 + return _mm512_maskz_ternarylogic_epi64(__U, __A, __B, __C, 4); +} + +__mmask16 test_mm512_testn_epi32_mask(__m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_testn_epi32_mask + // CHECK: @llvm.x86.avx512.ptestnm.d.512 + return _mm512_testn_epi32_mask(__A, __B); +} + +__mmask16 test_mm512_mask_testn_epi32_mask(__mmask16 __U, __m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_mask_testn_epi32_mask + // CHECK: @llvm.x86.avx512.ptestnm.d.512 + return _mm512_mask_testn_epi32_mask(__U, __A, __B); +} + +__mmask8 test_mm512_testn_epi64_mask(__m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_testn_epi64_mask + // CHECK: @llvm.x86.avx512.ptestnm.q.512 + return _mm512_testn_epi64_mask(__A, __B); +} + +__mmask8 test_mm512_mask_testn_epi64_mask(__mmask8 __U, __m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_mask_testn_epi64_mask + // CHECK: @llvm.x86.avx512.ptestnm.q.512 + return _mm512_mask_testn_epi64_mask(__U, __A, __B); +} + +__m512i test_mm512_unpackhi_epi32(__m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_unpackhi_epi32 + // CHECK: @llvm.x86.avx512.mask.punpckhd.q.512 + return _mm512_unpackhi_epi32(__A, __B); +} + +__m512i test_mm512_mask_unpackhi_epi32(__m512i __W, __mmask16 __U, __m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_mask_unpackhi_epi32 + // CHECK: @llvm.x86.avx512.mask.punpckhd.q.512 + return _mm512_mask_unpackhi_epi32(__W, __U, __A, __B); +} + +__m512i test_mm512_maskz_unpackhi_epi32(__mmask16 __U, __m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_maskz_unpackhi_epi32 + // CHECK: @llvm.x86.avx512.mask.punpckhd.q.512 + return _mm512_maskz_unpackhi_epi32(__U, __A, __B); +} + +__m512i test_mm512_unpackhi_epi64(__m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_unpackhi_epi64 + // CHECK: @llvm.x86.avx512.mask.punpckhqd.q.512 + return _mm512_unpackhi_epi64(__A, __B); +} + +__m512i test_mm512_mask_unpackhi_epi64(__m512i __W, __mmask8 __U, __m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_mask_unpackhi_epi64 + // CHECK: @llvm.x86.avx512.mask.punpckhqd.q.512 + return _mm512_mask_unpackhi_epi64(__W, __U, __A, __B); +} + +__m512i test_mm512_maskz_unpackhi_epi64(__mmask8 __U, __m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_maskz_unpackhi_epi64 + // CHECK: @llvm.x86.avx512.mask.punpckhqd.q.512 + return _mm512_maskz_unpackhi_epi64(__U, __A, __B); +} + +__m512i test_mm512_unpacklo_epi32(__m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_unpacklo_epi32 + // CHECK: @llvm.x86.avx512.mask.punpckld.q.512 + return _mm512_unpacklo_epi32(__A, __B); +} + +__m512i test_mm512_mask_unpacklo_epi32(__m512i __W, __mmask16 __U, __m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_mask_unpacklo_epi32 + // CHECK: @llvm.x86.avx512.mask.punpckld.q.512 + return _mm512_mask_unpacklo_epi32(__W, __U, __A, __B); +} + +__m512i test_mm512_maskz_unpacklo_epi32(__mmask16 __U, __m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_maskz_unpacklo_epi32 + // CHECK: @llvm.x86.avx512.mask.punpckld.q.512 + return _mm512_maskz_unpacklo_epi32(__U, __A, __B); +} + +__m512i test_mm512_unpacklo_epi64(__m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_unpacklo_epi64 + // CHECK: @llvm.x86.avx512.mask.punpcklqd.q.512 + return _mm512_unpacklo_epi64(__A, __B); +} + +__m512i test_mm512_mask_unpacklo_epi64(__m512i __W, __mmask8 __U, __m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_mask_unpacklo_epi64 + // CHECK: @llvm.x86.avx512.mask.punpcklqd.q.512 + return _mm512_mask_unpacklo_epi64(__W, __U, __A, __B); +} + +__m512i test_mm512_maskz_unpacklo_epi64(__mmask8 __U, __m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_maskz_unpacklo_epi64 + // CHECK: @llvm.x86.avx512.mask.punpcklqd.q.512 + return _mm512_maskz_unpacklo_epi64(__U, __A, __B); +} + +__m128d test_mm_rcp14_sd(__m128d __A, __m128d __B) { + // CHECK-LABEL: @test_mm_rcp14_sd + // CHECK: @llvm.x86.avx512.rcp14.sd + return _mm_rcp14_sd(__A, __B); +} + +__m128 test_mm_rcp14_ss(__m128 __A, __m128 __B) { + // CHECK-LABEL: @test_mm_rcp14_ss + // CHECK: @llvm.x86.avx512.rcp14.ss + return _mm_rcp14_ss(__A, __B); +} + +__m128d test_mm_roundscale_round_sd(__m128d __A, __m128d __B) { + // CHECK-LABEL: @test_mm_roundscale_round_sd + // CHECK: @llvm.x86.avx512.mask.rndscale.sd + return _mm_roundscale_round_sd(__A, __B, 4, 4); +} + +__m128d test_mm_roundscale_sd(__m128d __A, __m128d __B) { + // CHECK-LABEL: @test_mm_roundscale_sd + // CHECK: @llvm.x86.avx512.mask.rndscale.sd + return _mm_roundscale_sd(__A, __B, 4); +} + +__m128d test_mm_mask_roundscale_sd(__m128d __W, __mmask8 __U, __m128d __A, __m128d __B){ + // CHECK: @llvm.x86.avx512.mask.rndscale.sd + return _mm_mask_roundscale_sd(__W,__U,__A,__B,3); +} + +__m128d test_mm_mask_roundscale_round_sd(__m128d __W, __mmask8 __U, __m128d __A, __m128d __B){ + // CHECK: @llvm.x86.avx512.mask.rndscale.sd + return _mm_mask_roundscale_round_sd(__W,__U,__A,__B,3,_MM_FROUND_CUR_DIRECTION); +} + +__m128d test_mm_maskz_roundscale_sd(__mmask8 __U, __m128d __A, __m128d __B){ + // CHECK: @llvm.x86.avx512.mask.rndscale.sd + return _mm_maskz_roundscale_sd(__U,__A,__B,3); +} + +__m128d test_mm_maskz_roundscale_round_sd(__mmask8 __U, __m128d __A, __m128d __B){ + // CHECK: @llvm.x86.avx512.mask.rndscale.sd + return _mm_maskz_roundscale_round_sd(__U,__A,__B,3,_MM_FROUND_CUR_DIRECTION ); +} + +__m128 test_mm_roundscale_round_ss(__m128 __A, __m128 __B) { + // CHECK-LABEL: @test_mm_roundscale_round_ss + // CHECK: @llvm.x86.avx512.mask.rndscale.ss + return _mm_roundscale_round_ss(__A, __B, 4, 4); +} + +__m128 test_mm_roundscale_ss(__m128 __A, __m128 __B) { + // CHECK-LABEL: @test_mm_roundscale_ss + // CHECK: @llvm.x86.avx512.mask.rndscale.ss + return _mm_roundscale_ss(__A, __B, 4); +} + +__m128d test_mm_rsqrt14_sd(__m128d __A, __m128d __B) { + // CHECK-LABEL: @test_mm_rsqrt14_sd + // CHECK: @llvm.x86.avx512.rsqrt14.sd + return _mm_rsqrt14_sd(__A, __B); +} + +__m128 test_mm_rsqrt14_ss(__m128 __A, __m128 __B) { + // CHECK-LABEL: @test_mm_rsqrt14_ss + // CHECK: @llvm.x86.avx512.rsqrt14.ss + return _mm_rsqrt14_ss(__A, __B); +} + +__m512d test_mm512_scalef_round_pd(__m512d __A, __m512d __B) { + // CHECK-LABEL: @test_mm512_scalef_round_pd + // CHECK: @llvm.x86.avx512.mask.scalef.pd.512 + return _mm512_scalef_round_pd(__A, __B, 4); +} + +__m512d test_mm512_mask_scalef_round_pd(__m512d __W, __mmask8 __U, __m512d __A, __m512d __B) { + // CHECK-LABEL: @test_mm512_mask_scalef_round_pd + // CHECK: @llvm.x86.avx512.mask.scalef.pd.512 + return _mm512_mask_scalef_round_pd(__W, __U, __A, __B, 4); +} + +__m512d test_mm512_maskz_scalef_round_pd(__mmask8 __U, __m512d __A, __m512d __B) { + // CHECK-LABEL: @test_mm512_maskz_scalef_round_pd + // CHECK: @llvm.x86.avx512.mask.scalef.pd.512 + return _mm512_maskz_scalef_round_pd(__U, __A, __B, 4); +} + +__m512d test_mm512_scalef_pd(__m512d __A, __m512d __B) { + // CHECK-LABEL: @test_mm512_scalef_pd + // CHECK: @llvm.x86.avx512.mask.scalef.pd.512 + return _mm512_scalef_pd(__A, __B); +} + +__m512d test_mm512_mask_scalef_pd(__m512d __W, __mmask8 __U, __m512d __A, __m512d __B) { + // CHECK-LABEL: @test_mm512_mask_scalef_pd + // CHECK: @llvm.x86.avx512.mask.scalef.pd.512 + return _mm512_mask_scalef_pd(__W, __U, __A, __B); +} + +__m512d test_mm512_maskz_scalef_pd(__mmask8 __U, __m512d __A, __m512d __B) { + // CHECK-LABEL: @test_mm512_maskz_scalef_pd + // CHECK: @llvm.x86.avx512.mask.scalef.pd.512 + return _mm512_maskz_scalef_pd(__U, __A, __B); +} + +__m512 test_mm512_scalef_round_ps(__m512 __A, __m512 __B) { + // CHECK-LABEL: @test_mm512_scalef_round_ps + // CHECK: @llvm.x86.avx512.mask.scalef.ps.512 + return _mm512_scalef_round_ps(__A, __B, 4); +} + +__m512 test_mm512_mask_scalef_round_ps(__m512 __W, __mmask16 __U, __m512 __A, __m512 __B) { + // CHECK-LABEL: @test_mm512_mask_scalef_round_ps + // CHECK: @llvm.x86.avx512.mask.scalef.ps.512 + return _mm512_mask_scalef_round_ps(__W, __U, __A, __B, 4); +} + +__m512 test_mm512_maskz_scalef_round_ps(__mmask16 __U, __m512 __A, __m512 __B) { + // CHECK-LABEL: @test_mm512_maskz_scalef_round_ps + // CHECK: @llvm.x86.avx512.mask.scalef.ps.512 + return _mm512_maskz_scalef_round_ps(__U, __A, __B, 4); +} + +__m512 test_mm512_scalef_ps(__m512 __A, __m512 __B) { + // CHECK-LABEL: @test_mm512_scalef_ps + // CHECK: @llvm.x86.avx512.mask.scalef.ps.512 + return _mm512_scalef_ps(__A, __B); +} + +__m512 test_mm512_mask_scalef_ps(__m512 __W, __mmask16 __U, __m512 __A, __m512 __B) { + // CHECK-LABEL: @test_mm512_mask_scalef_ps + // CHECK: @llvm.x86.avx512.mask.scalef.ps.512 + return _mm512_mask_scalef_ps(__W, __U, __A, __B); +} + +__m512 test_mm512_maskz_scalef_ps(__mmask16 __U, __m512 __A, __m512 __B) { + // CHECK-LABEL: @test_mm512_maskz_scalef_ps + // CHECK: @llvm.x86.avx512.mask.scalef.ps.512 + return _mm512_maskz_scalef_ps(__U, __A, __B); +} + +__m128d test_mm_scalef_round_sd(__m128d __A, __m128d __B) { + // CHECK-LABEL: @test_mm_scalef_round_sd + // CHECK: @llvm.x86.avx512.mask.scalef + return _mm_scalef_round_sd(__A, __B, 4); +} + +__m128d test_mm_scalef_sd(__m128d __A, __m128d __B) { + // CHECK-LABEL: @test_mm_scalef_sd + // CHECK: @llvm.x86.avx512.mask.scalef + return _mm_scalef_sd(__A, __B); +} + +__m128d test_mm_mask_scalef_sd(__m128d __W, __mmask8 __U, __m128d __A, __m128d __B){ + return _mm_mask_scalef_sd(__W,__U,__A,__B); +} + +__m128d test_mm_mask_scalef_round_sd(__m128d __W, __mmask8 __U, __m128d __A, __m128d __B){ + return _mm_mask_scalef_round_sd(__W,__U,__A,__B,_MM_FROUND_CUR_DIRECTION); +} + +__m128d test_mm_maskz_scalef_sd(__mmask8 __U, __m128d __A, __m128d __B){ + return _mm_maskz_scalef_sd(__U,__A,__B); +} + +__m128d test_mm_maskz_scalef_round_sd(__mmask8 __U, __m128d __A, __m128d __B){ + return _mm_maskz_scalef_round_sd(__U,__A,__B,_MM_FROUND_CUR_DIRECTION); +} + +__m128 test_mm_scalef_round_ss(__m128 __A, __m128 __B) { + // CHECK-LABEL: @test_mm_scalef_round_ss + // CHECK: @llvm.x86.avx512.mask.scalef + return _mm_scalef_round_ss(__A, __B, 4); +} + +__m128 test_mm_scalef_ss(__m128 __A, __m128 __B) { + // CHECK-LABEL: @test_mm_scalef_ss + // CHECK: @llvm.x86.avx512.mask.scalef + return _mm_scalef_ss(__A, __B); +} + +__m128 test_mm_mask_scalef_ss(__m128 __W, __mmask8 __U, __m128 __A, __m128 __B){ +// CHECK: @llvm.x86.avx512.mask.scalef.ss + return _mm_mask_scalef_ss(__W,__U,__A,__B); +} + +__m128 test_mm_mask_scalef_round_ss(__m128 __W, __mmask8 __U, __m128 __A, __m128 __B){ +// CHECK: @llvm.x86.avx512.mask.scalef.ss + return _mm_mask_scalef_round_ss(__W,__U,__A,__B,_MM_FROUND_CUR_DIRECTION); +} + +__m128 test_mm_maskz_scalef_ss(__mmask8 __U, __m128 __A, __m128 __B){ +// CHECK: @llvm.x86.avx512.mask.scalef.ss + return _mm_maskz_scalef_ss(__U,__A,__B); +} + +__m128 test_mm_maskz_scalef_round_ss(__mmask8 __U, __m128 __A, __m128 __B){ +// CHECK: @llvm.x86.avx512.mask.scalef.ss + return _mm_maskz_scalef_round_ss(__U,__A,__B,_MM_FROUND_CUR_DIRECTION); +} + +void test_mm512_i64scatter_ps(float *__addr, __m512i __index, __m256 __v1) { + // CHECK-LABEL: @test_mm512_i64scatter_ps + // CHECK: @llvm.x86.avx512.scatter.qps.512 + return _mm512_i64scatter_ps(__addr, __index, __v1, 4); +} + +void test_mm512_mask_i64scatter_ps(float *__addr, __mmask8 __mask, __m512i __index, __m256 __v1) { + // CHECK-LABEL: @test_mm512_mask_i64scatter_ps + // CHECK: @llvm.x86.avx512.scatter.qps.512 + return _mm512_mask_i64scatter_ps(__addr, __mask, __index, __v1, 4); +} + +void test_mm512_i64scatter_epi32(int *__addr, __m512i __index, __m256i __v1) { + // CHECK-LABEL: @test_mm512_i64scatter_epi32 + // CHECK: @llvm.x86.avx512.scatter.qpi.512 + return _mm512_i64scatter_epi32(__addr, __index, __v1, 4); +} + +void test_mm512_mask_i64scatter_epi32(int *__addr, __mmask8 __mask, __m512i __index, __m256i __v1) { + // CHECK-LABEL: @test_mm512_mask_i64scatter_epi32 + // CHECK: @llvm.x86.avx512.scatter.qpi.512 + return _mm512_mask_i64scatter_epi32(__addr, __mask, __index, __v1, 4); +} + +void test_mm512_i64scatter_pd(double *__addr, __m512i __index, __m512d __v1) { + // CHECK-LABEL: @test_mm512_i64scatter_pd + // CHECK: @llvm.x86.avx512.scatter.qpd.512 + return _mm512_i64scatter_pd(__addr, __index, __v1, 4); +} + +void test_mm512_mask_i64scatter_pd(double *__addr, __mmask8 __mask, __m512i __index, __m512d __v1) { + // CHECK-LABEL: @test_mm512_mask_i64scatter_pd + // CHECK: @llvm.x86.avx512.scatter.qpd.512 + return _mm512_mask_i64scatter_pd(__addr, __mask, __index, __v1, 4); +} + +void test_mm512_i64scatter_epi64(long long *__addr, __m512i __index, __m512i __v1) { + // CHECK-LABEL: @test_mm512_i64scatter_epi64 + // CHECK: @llvm.x86.avx512.scatter.qpq.512 + return _mm512_i64scatter_epi64(__addr, __index, __v1, 4); +} + +void test_mm512_mask_i64scatter_epi64(long long *__addr, __mmask8 __mask, __m512i __index, __m512i __v1) { + // CHECK-LABEL: @test_mm512_mask_i64scatter_epi64 + // CHECK: @llvm.x86.avx512.scatter.qpq.512 + return _mm512_mask_i64scatter_epi64(__addr, __mask, __index, __v1, 4); +} + +void test_mm512_i32scatter_ps(float *__addr, __m512i __index, __m512 __v1) { + // CHECK-LABEL: @test_mm512_i32scatter_ps + // CHECK: @llvm.x86.avx512.scatter.dps.512 + return _mm512_i32scatter_ps(__addr, __index, __v1, 4); +} + +void test_mm512_mask_i32scatter_ps(float *__addr, __mmask16 __mask, __m512i __index, __m512 __v1) { + // CHECK-LABEL: @test_mm512_mask_i32scatter_ps + // CHECK: @llvm.x86.avx512.scatter.dps.512 + return _mm512_mask_i32scatter_ps(__addr, __mask, __index, __v1, 4); +} + +void test_mm512_i32scatter_epi32(int *__addr, __m512i __index, __m512i __v1) { + // CHECK-LABEL: @test_mm512_i32scatter_epi32 + // CHECK: @llvm.x86.avx512.scatter.dpi.512 + return _mm512_i32scatter_epi32(__addr, __index, __v1, 4); +} + +void test_mm512_mask_i32scatter_epi32(int *__addr, __mmask16 __mask, __m512i __index, __m512i __v1) { + // CHECK-LABEL: @test_mm512_mask_i32scatter_epi32 + // CHECK: @llvm.x86.avx512.scatter.dpi.512 + return _mm512_mask_i32scatter_epi32(__addr, __mask, __index, __v1, 4); +} + +void test_mm512_i32scatter_pd(double *__addr, __m256i __index, __m512d __v1) { + // CHECK-LABEL: @test_mm512_i32scatter_pd + // CHECK: @llvm.x86.avx512.scatter.dpd.512 + return _mm512_i32scatter_pd(__addr, __index, __v1, 4); +} + +void test_mm512_mask_i32scatter_pd(double *__addr, __mmask8 __mask, __m256i __index, __m512d __v1) { + // CHECK-LABEL: @test_mm512_mask_i32scatter_pd + // CHECK: @llvm.x86.avx512.scatter.dpd.512 + return _mm512_mask_i32scatter_pd(__addr, __mask, __index, __v1, 4); +} + +void test_mm512_i32scatter_epi64(long long *__addr, __m256i __index, __m512i __v1) { + // CHECK-LABEL: @test_mm512_i32scatter_epi64 + // CHECK: @llvm.x86.avx512.scatter.dpq.512 + return _mm512_i32scatter_epi64(__addr, __index, __v1, 4); +} + +void test_mm512_mask_i32scatter_epi64(long long *__addr, __mmask8 __mask, __m256i __index, __m512i __v1) { + // CHECK-LABEL: @test_mm512_mask_i32scatter_epi64 + // CHECK: @llvm.x86.avx512.scatter.dpq.512 + return _mm512_mask_i32scatter_epi64(__addr, __mask, __index, __v1, 4); +} + +__m512 test_mm512_shuffle_f32x4(__m512 __A, __m512 __B) { + // CHECK-LABEL: @test_mm512_shuffle_f32x4 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm512_shuffle_f32x4(__A, __B, 4); +} + +__m512 test_mm512_mask_shuffle_f32x4(__m512 __W, __mmask16 __U, __m512 __A, __m512 __B) { + // CHECK-LABEL: @test_mm512_mask_shuffle_f32x4 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm512_mask_shuffle_f32x4(__W, __U, __A, __B, 4); +} + +__m512 test_mm512_maskz_shuffle_f32x4(__mmask16 __U, __m512 __A, __m512 __B) { + // CHECK-LABEL: @test_mm512_maskz_shuffle_f32x4 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm512_maskz_shuffle_f32x4(__U, __A, __B, 4); +} + +__m512d test_mm512_shuffle_f64x2(__m512d __A, __m512d __B) { + // CHECK-LABEL: @test_mm512_shuffle_f64x2 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm512_shuffle_f64x2(__A, __B, 4); +} + +__m512d test_mm512_mask_shuffle_f64x2(__m512d __W, __mmask8 __U, __m512d __A, __m512d __B) { + // CHECK-LABEL: @test_mm512_mask_shuffle_f64x2 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm512_mask_shuffle_f64x2(__W, __U, __A, __B, 4); +} + +__m512d test_mm512_maskz_shuffle_f64x2(__mmask8 __U, __m512d __A, __m512d __B) { + // CHECK-LABEL: @test_mm512_maskz_shuffle_f64x2 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm512_maskz_shuffle_f64x2(__U, __A, __B, 4); +} + +__m512i test_mm512_shuffle_i32x4(__m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_shuffle_i32x4 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm512_shuffle_i32x4(__A, __B, 4); +} + +__m512i test_mm512_mask_shuffle_i32x4(__m512i __W, __mmask16 __U, __m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_mask_shuffle_i32x4 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm512_mask_shuffle_i32x4(__W, __U, __A, __B, 4); +} + +__m512i test_mm512_maskz_shuffle_i32x4(__mmask16 __U, __m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_maskz_shuffle_i32x4 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm512_maskz_shuffle_i32x4(__U, __A, __B, 4); +} + +__m512i test_mm512_shuffle_i64x2(__m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_shuffle_i64x2 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm512_shuffle_i64x2(__A, __B, 4); +} + +__m512i test_mm512_mask_shuffle_i64x2(__m512i __W, __mmask8 __U, __m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_mask_shuffle_i64x2 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm512_mask_shuffle_i64x2(__W, __U, __A, __B, 4); +} + +__m512i test_mm512_maskz_shuffle_i64x2(__mmask8 __U, __m512i __A, __m512i __B) { + // CHECK-LABEL: @test_mm512_maskz_shuffle_i64x2 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm512_maskz_shuffle_i64x2(__U, __A, __B, 4); +} + +__m512d test_mm512_shuffle_pd(__m512d __M, __m512d __V) { + // CHECK-LABEL: @test_mm512_shuffle_pd + // CHECK: @llvm.x86.avx512.mask.shuf.pd.512 + return _mm512_shuffle_pd(__M, __V, 4); +} + +__m512d test_mm512_mask_shuffle_pd(__m512d __W, __mmask8 __U, __m512d __M, __m512d __V) { + // CHECK-LABEL: @test_mm512_mask_shuffle_pd + // CHECK: @llvm.x86.avx512.mask.shuf.pd.512 + return _mm512_mask_shuffle_pd(__W, __U, __M, __V, 4); +} + +__m512d test_mm512_maskz_shuffle_pd(__mmask8 __U, __m512d __M, __m512d __V) { + // CHECK-LABEL: @test_mm512_maskz_shuffle_pd + // CHECK: @llvm.x86.avx512.mask.shuf.pd.512 + return _mm512_maskz_shuffle_pd(__U, __M, __V, 4); +} + +__m512 test_mm512_shuffle_ps(__m512 __M, __m512 __V) { + // CHECK-LABEL: @test_mm512_shuffle_ps + // CHECK: @llvm.x86.avx512.mask.shuf.ps.512 + return _mm512_shuffle_ps(__M, __V, 4); +} + +__m512 test_mm512_mask_shuffle_ps(__m512 __W, __mmask16 __U, __m512 __M, __m512 __V) { + // CHECK-LABEL: @test_mm512_mask_shuffle_ps + // CHECK: @llvm.x86.avx512.mask.shuf.ps.512 + return _mm512_mask_shuffle_ps(__W, __U, __M, __V, 4); +} + +__m512 test_mm512_maskz_shuffle_ps(__mmask16 __U, __m512 __M, __m512 __V) { + // CHECK-LABEL: @test_mm512_maskz_shuffle_ps + // CHECK: @llvm.x86.avx512.mask.shuf.ps.512 + return _mm512_maskz_shuffle_ps(__U, __M, __V, 4); +} + +__m128d test_mm_sqrt_round_sd(__m128d __A, __m128d __B) { + // CHECK-LABEL: @test_mm_sqrt_round_sd + // CHECK: @llvm.x86.avx512.mask.sqrt.sd + return _mm_sqrt_round_sd(__A, __B, 4); +} + +__m128d test_mm_mask_sqrt_sd(__m128d __W, __mmask8 __U, __m128d __A, __m128d __B){ + // CHECK: @llvm.x86.avx512.mask.sqrt.sd + return _mm_mask_sqrt_sd(__W,__U,__A,__B); +} + +__m128d test_mm_mask_sqrt_round_sd(__m128d __W, __mmask8 __U, __m128d __A, __m128d __B){ + // CHECK: @llvm.x86.avx512.mask.sqrt.sd + return _mm_mask_sqrt_round_sd(__W,__U,__A,__B,_MM_FROUND_CUR_DIRECTION); +} + +__m128d test_mm_maskz_sqrt_sd(__mmask8 __U, __m128d __A, __m128d __B){ + // CHECK: @llvm.x86.avx512.mask.sqrt.sd + return _mm_maskz_sqrt_sd(__U,__A,__B); +} + +__m128d test_mm_maskz_sqrt_round_sd(__mmask8 __U, __m128d __A, __m128d __B){ + // CHECK: @llvm.x86.avx512.mask.sqrt.sd + return _mm_maskz_sqrt_round_sd(__U,__A,__B,_MM_FROUND_CUR_DIRECTION); +} + +__m128 test_mm_sqrt_round_ss(__m128 __A, __m128 __B) { + // CHECK-LABEL: @test_mm_sqrt_round_ss + // CHECK: @llvm.x86.avx512.mask.sqrt.ss + return _mm_sqrt_round_ss(__A, __B, 4); +} + +__m128 test_mm_mask_sqrt_ss(__m128 __W, __mmask8 __U, __m128 __A, __m128 __B){ + // CHECK: @llvm.x86.avx512.mask.sqrt.ss + return _mm_mask_sqrt_ss(__W,__U,__A,__B); +} + +__m128 test_mm_mask_sqrt_round_ss(__m128 __W, __mmask8 __U, __m128 __A, __m128 __B){ + // CHECK: @llvm.x86.avx512.mask.sqrt.ss + return _mm_mask_sqrt_round_ss(__W,__U,__A,__B,_MM_FROUND_CUR_DIRECTION); +} + +__m128 test_mm_maskz_sqrt_ss(__mmask8 __U, __m128 __A, __m128 __B){ + // CHECK: @llvm.x86.avx512.mask.sqrt.ss + return _mm_maskz_sqrt_ss(__U,__A,__B); +} + +__m128 test_mm_maskz_sqrt_round_ss(__mmask8 __U, __m128 __A, __m128 __B){ + // CHECK: @llvm.x86.avx512.mask.sqrt.ss + return _mm_maskz_sqrt_round_ss(__U,__A,__B,_MM_FROUND_CUR_DIRECTION); +} + +__m512d test_mm512_mask_unpackhi_pd(__m512d __W, __mmask8 __U, __m512d __A, __m512d __B) { + // CHECK-LABEL: @test_mm512_mask_unpackhi_pd + // CHECK: @llvm.x86.avx512.mask.unpckh.pd.512 + return _mm512_mask_unpackhi_pd(__W, __U, __A, __B); +} + +__m512d test_mm512_maskz_unpackhi_pd(__mmask8 __U, __m512d __A, __m512d __B) { + // CHECK-LABEL: @test_mm512_maskz_unpackhi_pd + // CHECK: @llvm.x86.avx512.mask.unpckh.pd.512 + return _mm512_maskz_unpackhi_pd(__U, __A, __B); +} + +__m512 test_mm512_mask_unpackhi_ps(__m512 __W, __mmask16 __U, __m512 __A, __m512 __B) { + // CHECK-LABEL: @test_mm512_mask_unpackhi_ps + // CHECK: @llvm.x86.avx512.mask.unpckh.ps.512 + return _mm512_mask_unpackhi_ps(__W, __U, __A, __B); +} + +__m512 test_mm512_maskz_unpackhi_ps(__mmask16 __U, __m512 __A, __m512 __B) { + // CHECK-LABEL: @test_mm512_maskz_unpackhi_ps + // CHECK: @llvm.x86.avx512.mask.unpckh.ps.512 + return _mm512_maskz_unpackhi_ps(__U, __A, __B); +} + +__m512d test_mm512_mask_unpacklo_pd(__m512d __W, __mmask8 __U, __m512d __A, __m512d __B) { + // CHECK-LABEL: @test_mm512_mask_unpacklo_pd + // CHECK: @llvm.x86.avx512.mask.unpckl.pd.512 + return _mm512_mask_unpacklo_pd(__W, __U, __A, __B); +} + +__m512d test_mm512_maskz_unpacklo_pd(__mmask8 __U, __m512d __A, __m512d __B) { + // CHECK-LABEL: @test_mm512_maskz_unpacklo_pd + // CHECK: @llvm.x86.avx512.mask.unpckl.pd.512 + return _mm512_maskz_unpacklo_pd(__U, __A, __B); +} + +__m512 test_mm512_mask_unpacklo_ps(__m512 __W, __mmask16 __U, __m512 __A, __m512 __B) { + // CHECK-LABEL: @test_mm512_mask_unpacklo_ps + // CHECK: @llvm.x86.avx512.mask.unpckl.ps.512 + return _mm512_mask_unpacklo_ps(__W, __U, __A, __B); +} + +__m512 test_mm512_maskz_unpacklo_ps(__mmask16 __U, __m512 __A, __m512 __B) { + // CHECK-LABEL: @test_mm512_maskz_unpacklo_ps + // CHECK: @llvm.x86.avx512.mask.unpckl.ps.512 + return _mm512_maskz_unpacklo_ps(__U, __A, __B); +} + +int test_mm_cvt_roundsd_si32(__m128d __A) { + // CHECK-LABEL: @test_mm_cvt_roundsd_si32 + // CHECK: @llvm.x86.avx512.vcvtsd2si32 + return _mm_cvt_roundsd_si32(__A, 4); +} + +int test_mm_cvt_roundsd_i32(__m128d __A) { + // CHECK-LABEL: @test_mm_cvt_roundsd_i32 + // CHECK: @llvm.x86.avx512.vcvtsd2si32 + return _mm_cvt_roundsd_i32(__A, 4); +} + +unsigned long long test_mm_cvt_roundsd_si64(__m128d __A) { + // CHECK-LABEL: @test_mm_cvt_roundsd_si64 + // CHECK: @llvm.x86.avx512.vcvtsd2si64 + return _mm_cvt_roundsd_si64(__A, 4); +} + +long long test_mm_cvt_roundsd_i64(__m128d __A) { + // CHECK-LABEL: @test_mm_cvt_roundsd_i64 + // CHECK: @llvm.x86.avx512.vcvtsd2si64 + return _mm_cvt_roundsd_i64(__A, 4); +} + +unsigned test_mm_cvt_roundsd_u32(__m128d __A) { + // CHECK-LABEL: @test_mm_cvt_roundsd_u32 + // CHECK: @llvm.x86.avx512.vcvtsd2usi32 + return _mm_cvt_roundsd_u32(__A, 4); +} + +unsigned test_mm_cvtsd_u32(__m128d __A) { + // CHECK-LABEL: @test_mm_cvtsd_u32 + // CHECK: @llvm.x86.avx512.vcvtsd2usi32 + return _mm_cvtsd_u32(__A); +} + +unsigned long long test_mm_cvt_roundsd_u64(__m128d __A) { + // CHECK-LABEL: @test_mm_cvt_roundsd_u64 + // CHECK: @llvm.x86.avx512.vcvtsd2usi64 + return _mm_cvt_roundsd_u64(__A, 4); +} + +unsigned long long test_mm_cvtsd_u64(__m128d __A) { + // CHECK-LABEL: @test_mm_cvtsd_u64 + // CHECK: @llvm.x86.avx512.vcvtsd2usi64 + return _mm_cvtsd_u64(__A); +} + +int test_mm_cvt_roundss_si32(__m128 __A) { + // CHECK-LABEL: @test_mm_cvt_roundss_si32 + // CHECK: @llvm.x86.avx512.vcvtss2si32 + return _mm_cvt_roundss_si32(__A, 4); +} + +int test_mm_cvt_roundss_i32(__m128 __A) { + // CHECK-LABEL: @test_mm_cvt_roundss_i32 + // CHECK: @llvm.x86.avx512.vcvtss2si32 + return _mm_cvt_roundss_i32(__A, 4); +} + +int test_mm_cvt_roundss_si64(__m128 __A) { + // CHECK-LABEL: @test_mm_cvt_roundss_si64 + // CHECK: @llvm.x86.avx512.vcvtss2si64 + return _mm_cvt_roundss_si64(__A, 4); +} + +long long test_mm_cvt_roundss_i64(__m128 __A) { + // CHECK-LABEL: @test_mm_cvt_roundss_i64 + // CHECK: @llvm.x86.avx512.vcvtss2si64 + return _mm_cvt_roundss_i64(__A, 4); +} + +unsigned test_mm_cvt_roundss_u32(__m128 __A) { + // CHECK-LABEL: @test_mm_cvt_roundss_u32 + // CHECK: @llvm.x86.avx512.vcvtss2usi32 + return _mm_cvt_roundss_u32(__A, 4); +} + +unsigned test_mm_cvtss_u32(__m128 __A) { + // CHECK-LABEL: @test_mm_cvtss_u32 + // CHECK: @llvm.x86.avx512.vcvtss2usi32 + return _mm_cvtss_u32(__A); +} + +unsigned long long test_mm_cvt_roundss_u64(__m128 __A) { + // CHECK-LABEL: @test_mm_cvt_roundss_u64 + // CHECK: @llvm.x86.avx512.vcvtss2usi64 + return _mm_cvt_roundss_u64(__A, 4); +} + +unsigned long long test_mm_cvtss_u64(__m128 __A) { + // CHECK-LABEL: @test_mm_cvtss_u64 + // CHECK: @llvm.x86.avx512.vcvtss2usi64 + return _mm_cvtss_u64(__A); +} + +int test_mm_cvtt_roundsd_i32(__m128d __A) { + // CHECK-LABEL: @test_mm_cvtt_roundsd_i32 + // CHECK: @llvm.x86.avx512.cvttsd2si + return _mm_cvtt_roundsd_i32(__A, 4); +} + +int test_mm_cvtt_roundsd_si32(__m128d __A) { + // CHECK-LABEL: @test_mm_cvtt_roundsd_si32 + // CHECK: @llvm.x86.avx512.cvttsd2si + return _mm_cvtt_roundsd_si32(__A, 4); +} + +int test_mm_cvttsd_i32(__m128d __A) { + // CHECK-LABEL: @test_mm_cvttsd_i32 + // CHECK: @llvm.x86.avx512.cvttsd2si + return _mm_cvttsd_i32(__A); +} + +unsigned long long test_mm_cvtt_roundsd_si64(__m128d __A) { + // CHECK-LABEL: @test_mm_cvtt_roundsd_si64 + // CHECK: @llvm.x86.avx512.cvttsd2si64 + return _mm_cvtt_roundsd_si64(__A, 4); +} + +long long test_mm_cvtt_roundsd_i64(__m128d __A) { + // CHECK-LABEL: @test_mm_cvtt_roundsd_i64 + // CHECK: @llvm.x86.avx512.cvttsd2si64 + return _mm_cvtt_roundsd_i64(__A, 4); +} + +long long test_mm_cvttsd_i64(__m128d __A) { + // CHECK-LABEL: @test_mm_cvttsd_i64 + // CHECK: @llvm.x86.avx512.cvttsd2si64 + return _mm_cvttsd_i64(__A); +} + +unsigned test_mm_cvtt_roundsd_u32(__m128d __A) { + // CHECK-LABEL: @test_mm_cvtt_roundsd_u32 + // CHECK: @llvm.x86.avx512.cvttsd2usi + return _mm_cvtt_roundsd_u32(__A, 4); +} + +unsigned test_mm_cvttsd_u32(__m128d __A) { + // CHECK-LABEL: @test_mm_cvttsd_u32 + // CHECK: @llvm.x86.avx512.cvttsd2usi + return _mm_cvttsd_u32(__A); +} + +unsigned long long test_mm_cvtt_roundsd_u64(__m128d __A) { + // CHECK-LABEL: @test_mm_cvtt_roundsd_u64 + // CHECK: @llvm.x86.avx512.cvttsd2usi64 + return _mm_cvtt_roundsd_u64(__A, 4); +} + +unsigned long long test_mm_cvttsd_u64(__m128d __A) { + // CHECK-LABEL: @test_mm_cvttsd_u64 + // CHECK: @llvm.x86.avx512.cvttsd2usi64 + return _mm_cvttsd_u64(__A); +} + +int test_mm_cvtt_roundss_i32(__m128 __A) { + // CHECK-LABEL: @test_mm_cvtt_roundss_i32 + // CHECK: @llvm.x86.avx512.cvttss2si + return _mm_cvtt_roundss_i32(__A, 4); +} + +int test_mm_cvtt_roundss_si32(__m128 __A) { + // CHECK-LABEL: @test_mm_cvtt_roundss_si32 + // CHECK: @llvm.x86.avx512.cvttss2si + return _mm_cvtt_roundss_si32(__A, 4); +} + +int test_mm_cvttss_i32(__m128 __A) { + // CHECK-LABEL: @test_mm_cvttss_i32 + // CHECK: @llvm.x86.avx512.cvttss2si + return _mm_cvttss_i32(__A); +} + +float test_mm_cvtt_roundss_i64(__m128 __A) { + // CHECK-LABEL: @test_mm_cvtt_roundss_i64 + // CHECK: @llvm.x86.avx512.cvttss2si64 + return _mm_cvtt_roundss_i64(__A, 4); +} + +long long test_mm_cvtt_roundss_si64(__m128 __A) { + // CHECK-LABEL: @test_mm_cvtt_roundss_si64 + // CHECK: @llvm.x86.avx512.cvttss2si64 + return _mm_cvtt_roundss_si64(__A, 4); +} + +long long test_mm_cvttss_i64(__m128 __A) { + // CHECK-LABEL: @test_mm_cvttss_i64 + // CHECK: @llvm.x86.avx512.cvttss2si64 + return _mm_cvttss_i64(__A); +} + +unsigned test_mm_cvtt_roundss_u32(__m128 __A) { + // CHECK-LABEL: @test_mm_cvtt_roundss_u32 + // CHECK: @llvm.x86.avx512.cvttss2usi + return _mm_cvtt_roundss_u32(__A, 4); +} + +unsigned test_mm_cvttss_u32(__m128 __A) { + // CHECK-LABEL: @test_mm_cvttss_u32 + // CHECK: @llvm.x86.avx512.cvttss2usi + return _mm_cvttss_u32(__A); +} + +unsigned long long test_mm_cvtt_roundss_u64(__m128 __A) { + // CHECK-LABEL: @test_mm_cvtt_roundss_u64 + // CHECK: @llvm.x86.avx512.cvttss2usi64 + return _mm_cvtt_roundss_u64(__A, 4); +} + +unsigned long long test_mm_cvttss_u64(__m128 __A) { + // CHECK-LABEL: @test_mm_cvttss_u64 + // CHECK: @llvm.x86.avx512.cvttss2usi64 + return _mm_cvttss_u64(__A); +} + +__m512i test_mm512_mask2_permutex2var_epi32(__m512i __A, __m512i __I, __mmask16 __U, __m512i __B) { + // CHECK-LABEL: @test_mm512_mask2_permutex2var_epi32 + // CHECK: @llvm.x86.avx512.mask.vpermi2var.d.512 + return _mm512_mask2_permutex2var_epi32(__A, __I, __U, __B); +} + +__m512d test_mm512_mask2_permutex2var_pd(__m512d __A, __m512i __I, __mmask8 __U, __m512d __B) { + // CHECK-LABEL: @test_mm512_mask2_permutex2var_pd + // CHECK: @llvm.x86.avx512.mask.vpermi2var.pd.512 + return _mm512_mask2_permutex2var_pd(__A, __I, __U, __B); +} + +__m512 test_mm512_mask2_permutex2var_ps(__m512 __A, __m512i __I, __mmask16 __U, __m512 __B) { + // CHECK-LABEL: @test_mm512_mask2_permutex2var_ps + // CHECK: @llvm.x86.avx512.mask.vpermi2var.ps.512 + return _mm512_mask2_permutex2var_ps(__A, __I, __U, __B); +} + +__m512i test_mm512_mask2_permutex2var_epi64(__m512i __A, __m512i __I, __mmask8 __U, __m512i __B) { + // CHECK-LABEL: @test_mm512_mask2_permutex2var_epi64 + // CHECK: @llvm.x86.avx512.mask.vpermi2var.q.512 + return _mm512_mask2_permutex2var_epi64(__A, __I, __U, __B); +} + +__m512d test_mm512_permute_pd(__m512d __X) { + // CHECK-LABEL: @test_mm512_permute_pd + // CHECK: @llvm.x86.avx512.mask.vpermil.pd.512 + return _mm512_permute_pd(__X, 4); +} + +__m512d test_mm512_mask_permute_pd(__m512d __W, __mmask8 __U, __m512d __X) { + // CHECK-LABEL: @test_mm512_mask_permute_pd + // CHECK: @llvm.x86.avx512.mask.vpermil.pd.512 + return _mm512_mask_permute_pd(__W, __U, __X, 4); +} + +__m512d test_mm512_maskz_permute_pd(__mmask8 __U, __m512d __X) { + // CHECK-LABEL: @test_mm512_maskz_permute_pd + // CHECK: @llvm.x86.avx512.mask.vpermil.pd.512 + return _mm512_maskz_permute_pd(__U, __X, 4); +} + +__m512 test_mm512_permute_ps(__m512 __X) { + // CHECK-LABEL: @test_mm512_permute_ps + // CHECK: @llvm.x86.avx512.mask.vpermil.ps.512 + return _mm512_permute_ps(__X, 4); +} + +__m512 test_mm512_mask_permute_ps(__m512 __W, __mmask16 __U, __m512 __X) { + // CHECK-LABEL: @test_mm512_mask_permute_ps + // CHECK: @llvm.x86.avx512.mask.vpermil.ps.512 + return _mm512_mask_permute_ps(__W, __U, __X, 4); +} + +__m512 test_mm512_maskz_permute_ps(__mmask16 __U, __m512 __X) { + // CHECK-LABEL: @test_mm512_maskz_permute_ps + // CHECK: @llvm.x86.avx512.mask.vpermil.ps.512 + return _mm512_maskz_permute_ps(__U, __X, 4); +} + +__m512d test_mm512_permutevar_pd(__m512d __A, __m512i __C) { + // CHECK-LABEL: @test_mm512_permutevar_pd + // CHECK: @llvm.x86.avx512.mask.vpermilvar.pd.512 + return _mm512_permutevar_pd(__A, __C); +} + +__m512d test_mm512_mask_permutevar_pd(__m512d __W, __mmask8 __U, __m512d __A, __m512i __C) { + // CHECK-LABEL: @test_mm512_mask_permutevar_pd + // CHECK: @llvm.x86.avx512.mask.vpermilvar.pd.512 + return _mm512_mask_permutevar_pd(__W, __U, __A, __C); +} + +__m512d test_mm512_maskz_permutevar_pd(__mmask8 __U, __m512d __A, __m512i __C) { + // CHECK-LABEL: @test_mm512_maskz_permutevar_pd + // CHECK: @llvm.x86.avx512.mask.vpermilvar.pd.512 + return _mm512_maskz_permutevar_pd(__U, __A, __C); +} + +__m512 test_mm512_permutevar_ps(__m512 __A, __m512i __C) { + // CHECK-LABEL: @test_mm512_permutevar_ps + // CHECK: @llvm.x86.avx512.mask.vpermilvar.ps.512 + return _mm512_permutevar_ps(__A, __C); +} + +__m512 test_mm512_mask_permutevar_ps(__m512 __W, __mmask16 __U, __m512 __A, __m512i __C) { + // CHECK-LABEL: @test_mm512_mask_permutevar_ps + // CHECK: @llvm.x86.avx512.mask.vpermilvar.ps.512 + return _mm512_mask_permutevar_ps(__W, __U, __A, __C); +} + +__m512 test_mm512_maskz_permutevar_ps(__mmask16 __U, __m512 __A, __m512i __C) { + // CHECK-LABEL: @test_mm512_maskz_permutevar_ps + // CHECK: @llvm.x86.avx512.mask.vpermilvar.ps.512 + return _mm512_maskz_permutevar_ps(__U, __A, __C); +} + +__m512i test_mm512_maskz_permutex2var_epi32(__mmask16 __U, __m512i __A, __m512i __I, __m512i __B) { + // CHECK-LABEL: @test_mm512_maskz_permutex2var_epi32 + // CHECK: @llvm.x86.avx512.maskz.vpermt2var.d.512 + return _mm512_maskz_permutex2var_epi32(__U, __A, __I, __B); +} + +__m512d test_mm512_maskz_permutex2var_pd(__mmask8 __U, __m512d __A, __m512i __I, __m512d __B) { + // CHECK-LABEL: @test_mm512_maskz_permutex2var_pd + // CHECK: @llvm.x86.avx512.maskz.vpermt2var.pd.512 + return _mm512_maskz_permutex2var_pd(__U, __A, __I, __B); +} + +__m512 test_mm512_maskz_permutex2var_ps(__mmask16 __U, __m512 __A, __m512i __I, __m512 __B) { + // CHECK-LABEL: @test_mm512_maskz_permutex2var_ps + // CHECK: @llvm.x86.avx512.maskz.vpermt2var.ps.512 + return _mm512_maskz_permutex2var_ps(__U, __A, __I, __B); +} + +__m512i test_mm512_maskz_permutex2var_epi64(__mmask8 __U, __m512i __A, __m512i __I, __m512i __B) { + // CHECK-LABEL: @test_mm512_maskz_permutex2var_epi64 + // CHECK: @llvm.x86.avx512.maskz.vpermt2var.q.512 + return _mm512_maskz_permutex2var_epi64(__U, __A, __I, __B); +} Index: test/CodeGen/avx512vl-builtins.c =================================================================== --- test/CodeGen/avx512vl-builtins.c +++ test/CodeGen/avx512vl-builtins.c @@ -2637,62 +2637,62 @@ __m128d test_mm_roundscale_pd(__m128d __A) { // CHECK-LABEL: @test_mm_roundscale_pd // CHECK: @llvm.x86.avx512.mask.rndscale.pd.128 - return _mm_roundscale_pd(__A,4); + return _mm_roundscale_pd(__A, _MM_FROUND_CUR_DIRECTION); } __m128d test_mm_mask_roundscale_pd(__m128d __W, __mmask8 __U, __m128d __A) { // CHECK-LABEL: @test_mm_mask_roundscale_pd // CHECK: @llvm.x86.avx512.mask.rndscale.pd.128 - return _mm_mask_roundscale_pd(__W,__U,__A,4); + return _mm_mask_roundscale_pd(__W,__U,__A, _MM_FROUND_CUR_DIRECTION); } __m128d test_mm_maskz_roundscale_pd(__mmask8 __U, __m128d __A) { // CHECK-LABEL: @test_mm_maskz_roundscale_pd // CHECK: @llvm.x86.avx512.mask.rndscale.pd.128 - return _mm_maskz_roundscale_pd(__U,__A,4); + return _mm_maskz_roundscale_pd(__U,__A, _MM_FROUND_CUR_DIRECTION); } __m256d test_mm256_roundscale_pd(__m256d __A) { // CHECK-LABEL: @test_mm256_roundscale_pd // CHECK: @llvm.x86.avx512.mask.rndscale.pd.256 - return _mm256_roundscale_pd(__A,4); + return _mm256_roundscale_pd(__A, _MM_FROUND_CUR_DIRECTION); } __m256d test_mm256_mask_roundscale_pd(__m256d __W, __mmask8 __U, __m256d __A) { // CHECK-LABEL: @test_mm256_mask_roundscale_pd // CHECK: @llvm.x86.avx512.mask.rndscale.pd.256 - return _mm256_mask_roundscale_pd(__W,__U,__A,4); + return _mm256_mask_roundscale_pd(__W,__U,__A, _MM_FROUND_CUR_DIRECTION); } __m256d test_mm256_maskz_roundscale_pd(__mmask8 __U, __m256d __A) { // CHECK-LABEL: @test_mm256_maskz_roundscale_pd // CHECK: @llvm.x86.avx512.mask.rndscale.pd.256 - return _mm256_maskz_roundscale_pd(__U,__A,4); + return _mm256_maskz_roundscale_pd(__U,__A, _MM_FROUND_CUR_DIRECTION); } __m128 test_mm_roundscale_ps(__m128 __A) { // CHECK-LABEL: @test_mm_roundscale_ps // CHECK: @llvm.x86.avx512.mask.rndscale.ps.128 - return _mm_roundscale_ps(__A,4); + return _mm_roundscale_ps(__A, _MM_FROUND_CUR_DIRECTION); } __m128 test_mm_mask_roundscale_ps(__m128 __W, __mmask8 __U, __m128 __A) { // CHECK-LABEL: @test_mm_mask_roundscale_ps // CHECK: @llvm.x86.avx512.mask.rndscale.ps.128 - return _mm_mask_roundscale_ps(__W,__U,__A,4); + return _mm_mask_roundscale_ps(__W,__U,__A, _MM_FROUND_CUR_DIRECTION); } __m128 test_mm_maskz_roundscale_ps(__mmask8 __U, __m128 __A) { // CHECK-LABEL: @test_mm_maskz_roundscale_ps // CHECK: @llvm.x86.avx512.mask.rndscale.ps.128 - return _mm_maskz_roundscale_ps(__U,__A, 4); + return _mm_maskz_roundscale_ps(__U,__A, _MM_FROUND_CUR_DIRECTION); } __m256 test_mm256_roundscale_ps(__m256 __A) { // CHECK-LABEL: @test_mm256_roundscale_ps // CHECK: @llvm.x86.avx512.mask.rndscale.ps.256 - return _mm256_roundscale_ps(__A,4); + return _mm256_roundscale_ps(__A, _MM_FROUND_CUR_DIRECTION); } __m256 test_mm256_mask_roundscale_ps(__m256 __W, __mmask8 __U, __m256 __A) { // CHECK-LABEL: @test_mm256_mask_roundscale_ps // CHECK: @llvm.x86.avx512.mask.rndscale.ps.256 - return _mm256_mask_roundscale_ps(__W,__U,__A,4); + return _mm256_mask_roundscale_ps(__W,__U,__A, _MM_FROUND_CUR_DIRECTION); } __m256 test_mm256_maskz_roundscale_ps(__mmask8 __U, __m256 __A) { // CHECK-LABEL: @test_mm256_maskz_roundscale_ps // CHECK: @llvm.x86.avx512.mask.rndscale.ps.256 - return _mm256_maskz_roundscale_ps(__U,__A,4); + return _mm256_maskz_roundscale_ps(__U,__A, _MM_FROUND_CUR_DIRECTION); } __m128d test_mm_scalef_pd(__m128d __A, __m128d __B) { // CHECK-LABEL: @test_mm_scalef_pd @@ -4080,3 +4080,867 @@ return _mm256_maskz_set1_epi64(__M, __A); } +__m128i test_mm_ternarylogic_epi32(__m128i __A, __m128i __B, __m128i __C) { + // CHECK-LABEL: @test_mm_ternarylogic_epi32 + // CHECK: @llvm.x86.avx512.mask.pternlog.d.128 + return _mm_ternarylogic_epi32(__A, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__m128i test_mm_mask_ternarylogic_epi32(__m128i __A, __mmask8 __U, __m128i __B, __m128i __C) { + // CHECK-LABEL: @test_mm_mask_ternarylogic_epi32 + // CHECK: @llvm.x86.avx512.mask.pternlog.d.128 + return _mm_mask_ternarylogic_epi32(__A, __U, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__m128i test_mm_maskz_ternarylogic_epi32(__mmask8 __U, __m128i __A, __m128i __B, __m128i __C) { + // CHECK-LABEL: @test_mm_maskz_ternarylogic_epi32 + // CHECK: @llvm.x86.avx512.maskz.pternlog.d.128 + return _mm_maskz_ternarylogic_epi32(__U, __A, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__m256i test_mm256_ternarylogic_epi32(__m256i __A, __m256i __B, __m256i __C) { + // CHECK-LABEL: @test_mm256_ternarylogic_epi32 + // CHECK: @llvm.x86.avx512.mask.pternlog.d.256 + return _mm256_ternarylogic_epi32(__A, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__m256i test_mm256_mask_ternarylogic_epi32(__m256i __A, __mmask8 __U, __m256i __B, __m256i __C) { + // CHECK-LABEL: @test_mm256_mask_ternarylogic_epi32 + // CHECK: @llvm.x86.avx512.mask.pternlog.d.256 + return _mm256_mask_ternarylogic_epi32(__A, __U, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__m256i test_mm256_maskz_ternarylogic_epi32(__mmask8 __U, __m256i __A, __m256i __B, __m256i __C) { + // CHECK-LABEL: @test_mm256_maskz_ternarylogic_epi32 + // CHECK: @llvm.x86.avx512.maskz.pternlog.d.256 + return _mm256_maskz_ternarylogic_epi32(__U, __A, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__m128i test_mm_ternarylogic_epi64(__m128i __A, __m128i __B, __m128i __C) { + // CHECK-LABEL: @test_mm_ternarylogic_epi64 + // CHECK: @llvm.x86.avx512.mask.pternlog.q.128 + return _mm_ternarylogic_epi64(__A, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__m128i test_mm_mask_ternarylogic_epi64(__m128i __A, __mmask8 __U, __m128i __B, __m128i __C) { + // CHECK-LABEL: @test_mm_mask_ternarylogic_epi64 + // CHECK: @llvm.x86.avx512.mask.pternlog.q.128 + return _mm_mask_ternarylogic_epi64(__A, __U, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__m128i test_mm_maskz_ternarylogic_epi64(__mmask8 __U, __m128i __A, __m128i __B, __m128i __C) { + // CHECK-LABEL: @test_mm_maskz_ternarylogic_epi64 + // CHECK: @llvm.x86.avx512.maskz.pternlog.q.128 + return _mm_maskz_ternarylogic_epi64(__U, __A, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__m256i test_mm256_ternarylogic_epi64(__m256i __A, __m256i __B, __m256i __C) { + // CHECK-LABEL: @test_mm256_ternarylogic_epi64 + // CHECK: @llvm.x86.avx512.mask.pternlog.q.256 + return _mm256_ternarylogic_epi64(__A, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__m256i test_mm256_mask_ternarylogic_epi64(__m256i __A, __mmask8 __U, __m256i __B, __m256i __C) { + // CHECK-LABEL: @test_mm256_mask_ternarylogic_epi64 + // CHECK: @llvm.x86.avx512.mask.pternlog.q.256 + return _mm256_mask_ternarylogic_epi64(__A, __U, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__m256i test_mm256_maskz_ternarylogic_epi64(__mmask8 __U, __m256i __A, __m256i __B, __m256i __C) { + // CHECK-LABEL: @test_mm256_maskz_ternarylogic_epi64 + // CHECK: @llvm.x86.avx512.maskz.pternlog.q.256 + return _mm256_maskz_ternarylogic_epi64(__U, __A, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__mmask8 test_mm_test_epi32_mask(__m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_test_epi32_mask + // CHECK: @llvm.x86.avx512.ptestm.d.128 + return _mm_test_epi32_mask(__A, __B); +} + +__mmask8 test_mm_mask_test_epi32_mask(__mmask8 __U, __m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_mask_test_epi32_mask + // CHECK: @llvm.x86.avx512.ptestm.d.128 + return _mm_mask_test_epi32_mask(__U, __A, __B); +} + +__mmask8 test_mm256_test_epi32_mask(__m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_test_epi32_mask + // CHECK: @llvm.x86.avx512.ptestm.d.256 + return _mm256_test_epi32_mask(__A, __B); +} + +__mmask8 test_mm256_mask_test_epi32_mask(__mmask8 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_mask_test_epi32_mask + // CHECK: @llvm.x86.avx512.ptestm.d.256 + return _mm256_mask_test_epi32_mask(__U, __A, __B); +} + +__mmask8 test_mm_test_epi64_mask(__m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_test_epi64_mask + // CHECK: @llvm.x86.avx512.ptestm.q.128 + return _mm_test_epi64_mask(__A, __B); +} + +__mmask8 test_mm_mask_test_epi64_mask(__mmask8 __U, __m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_mask_test_epi64_mask + // CHECK: @llvm.x86.avx512.ptestm.q.128 + return _mm_mask_test_epi64_mask(__U, __A, __B); +} + +__mmask8 test_mm256_test_epi64_mask(__m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_test_epi64_mask + // CHECK: @llvm.x86.avx512.ptestm.q.256 + return _mm256_test_epi64_mask(__A, __B); +} + +__mmask8 test_mm256_mask_test_epi64_mask(__mmask8 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_mask_test_epi64_mask + // CHECK: @llvm.x86.avx512.ptestm.q.256 + return _mm256_mask_test_epi64_mask(__U, __A, __B); +} + +__mmask8 test_mm_testn_epi32_mask(__m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_testn_epi32_mask + // CHECK: @llvm.x86.avx512.ptestnm.d.128 + return _mm_testn_epi32_mask(__A, __B); +} + +__mmask8 test_mm_mask_testn_epi32_mask(__mmask8 __U, __m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_mask_testn_epi32_mask + // CHECK: @llvm.x86.avx512.ptestnm.d.128 + return _mm_mask_testn_epi32_mask(__U, __A, __B); +} + +__mmask8 test_mm256_testn_epi32_mask(__m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_testn_epi32_mask + // CHECK: @llvm.x86.avx512.ptestnm.d.256 + return _mm256_testn_epi32_mask(__A, __B); +} + +__mmask8 test_mm256_mask_testn_epi32_mask(__mmask8 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_mask_testn_epi32_mask + // CHECK: @llvm.x86.avx512.ptestnm.d.256 + return _mm256_mask_testn_epi32_mask(__U, __A, __B); +} + +__mmask8 test_mm_testn_epi64_mask(__m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_testn_epi64_mask + // CHECK: @llvm.x86.avx512.ptestnm.q.128 + return _mm_testn_epi64_mask(__A, __B); +} + +__mmask8 test_mm_mask_testn_epi64_mask(__mmask8 __U, __m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_mask_testn_epi64_mask + // CHECK: @llvm.x86.avx512.ptestnm.q.128 + return _mm_mask_testn_epi64_mask(__U, __A, __B); +} + +__mmask8 test_mm256_testn_epi64_mask(__m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_testn_epi64_mask + // CHECK: @llvm.x86.avx512.ptestnm.q.256 + return _mm256_testn_epi64_mask(__A, __B); +} + +__mmask8 test_mm256_mask_testn_epi64_mask(__mmask8 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_mask_testn_epi64_mask + // CHECK: @llvm.x86.avx512.ptestnm.q.256 + return _mm256_mask_testn_epi64_mask(__U, __A, __B); +} + +__m128i test_mm_mask_unpackhi_epi32(__m128i __W, __mmask8 __U, __m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_mask_unpackhi_epi32 + // CHECK: @llvm.x86.avx512.mask.punpckhd.q.128 + return _mm_mask_unpackhi_epi32(__W, __U, __A, __B); +} + +__m128i test_mm_maskz_unpackhi_epi32(__mmask8 __U, __m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_maskz_unpackhi_epi32 + // CHECK: @llvm.x86.avx512.mask.punpckhd.q.128 + return _mm_maskz_unpackhi_epi32(__U, __A, __B); +} + +__m256i test_mm256_mask_unpackhi_epi32(__m256i __W, __mmask8 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_mask_unpackhi_epi32 + // CHECK: @llvm.x86.avx512.mask.punpckhd.q.256 + return _mm256_mask_unpackhi_epi32(__W, __U, __A, __B); +} + +__m256i test_mm256_maskz_unpackhi_epi32(__mmask8 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_maskz_unpackhi_epi32 + // CHECK: @llvm.x86.avx512.mask.punpckhd.q.256 + return _mm256_maskz_unpackhi_epi32(__U, __A, __B); +} + +__m128i test_mm_mask_unpackhi_epi64(__m128i __W, __mmask8 __U, __m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_mask_unpackhi_epi64 + // CHECK: @llvm.x86.avx512.mask.punpckhqd.q.128 + return _mm_mask_unpackhi_epi64(__W, __U, __A, __B); +} + +__m128i test_mm_maskz_unpackhi_epi64(__mmask8 __U, __m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_maskz_unpackhi_epi64 + // CHECK: @llvm.x86.avx512.mask.punpckhqd.q.128 + return _mm_maskz_unpackhi_epi64(__U, __A, __B); +} + +__m256i test_mm256_mask_unpackhi_epi64(__m256i __W, __mmask8 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_mask_unpackhi_epi64 + // CHECK: @llvm.x86.avx512.mask.punpckhqd.q.256 + return _mm256_mask_unpackhi_epi64(__W, __U, __A, __B); +} + +__m256i test_mm256_maskz_unpackhi_epi64(__mmask8 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_maskz_unpackhi_epi64 + // CHECK: @llvm.x86.avx512.mask.punpckhqd.q.256 + return _mm256_maskz_unpackhi_epi64(__U, __A, __B); +} + +__m128i test_mm_mask_unpacklo_epi32(__m128i __W, __mmask8 __U, __m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_mask_unpacklo_epi32 + // CHECK: @llvm.x86.avx512.mask.punpckld.q.128 + return _mm_mask_unpacklo_epi32(__W, __U, __A, __B); +} + +__m128i test_mm_maskz_unpacklo_epi32(__mmask8 __U, __m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_maskz_unpacklo_epi32 + // CHECK: @llvm.x86.avx512.mask.punpckld.q.128 + return _mm_maskz_unpacklo_epi32(__U, __A, __B); +} + +__m256i test_mm256_mask_unpacklo_epi32(__m256i __W, __mmask8 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_mask_unpacklo_epi32 + // CHECK: @llvm.x86.avx512.mask.punpckld.q.256 + return _mm256_mask_unpacklo_epi32(__W, __U, __A, __B); +} + +__m256i test_mm256_maskz_unpacklo_epi32(__mmask8 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_maskz_unpacklo_epi32 + // CHECK: @llvm.x86.avx512.mask.punpckld.q.256 + return _mm256_maskz_unpacklo_epi32(__U, __A, __B); +} + +__m128i test_mm_mask_unpacklo_epi64(__m128i __W, __mmask8 __U, __m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_mask_unpacklo_epi64 + // CHECK: @llvm.x86.avx512.mask.punpcklqd.q.128 + return _mm_mask_unpacklo_epi64(__W, __U, __A, __B); +} + +__m128i test_mm_maskz_unpacklo_epi64(__mmask8 __U, __m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_maskz_unpacklo_epi64 + // CHECK: @llvm.x86.avx512.mask.punpcklqd.q.128 + return _mm_maskz_unpacklo_epi64(__U, __A, __B); +} + +__m256i test_mm256_mask_unpacklo_epi64(__m256i __W, __mmask8 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_mask_unpacklo_epi64 + // CHECK: @llvm.x86.avx512.mask.punpcklqd.q.256 + return _mm256_mask_unpacklo_epi64(__W, __U, __A, __B); +} + +__m256i test_mm256_maskz_unpacklo_epi64(__mmask8 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_maskz_unpacklo_epi64 + // CHECK: @llvm.x86.avx512.mask.punpcklqd.q.256 + return _mm256_maskz_unpacklo_epi64(__U, __A, __B); +} + +__m128d test_mm_rcp14_pd(__m128d __A) { + // CHECK-LABEL: @test_mm_rcp14_pd + // CHECK: @llvm.x86.avx512.rcp14.pd.128 + return _mm_rcp14_pd(__A); +} + +__m128d test_mm_mask_rcp14_pd(__m128d __W, __mmask8 __U, __m128d __A) { + // CHECK-LABEL: @test_mm_mask_rcp14_pd + // CHECK: @llvm.x86.avx512.rcp14.pd.128 + return _mm_mask_rcp14_pd(__W, __U, __A); +} + +__m128d test_mm_maskz_rcp14_pd(__mmask8 __U, __m128d __A) { + // CHECK-LABEL: @test_mm_maskz_rcp14_pd + // CHECK: @llvm.x86.avx512.rcp14.pd.128 + return _mm_maskz_rcp14_pd(__U, __A); +} + +__m256d test_mm256_rcp14_pd(__m256d __A) { + // CHECK-LABEL: @test_mm256_rcp14_pd + // CHECK: @llvm.x86.avx512.rcp14.pd.256 + return _mm256_rcp14_pd(__A); +} + +__m256d test_mm256_mask_rcp14_pd(__m256d __W, __mmask8 __U, __m256d __A) { + // CHECK-LABEL: @test_mm256_mask_rcp14_pd + // CHECK: @llvm.x86.avx512.rcp14.pd.256 + return _mm256_mask_rcp14_pd(__W, __U, __A); +} + +__m256d test_mm256_maskz_rcp14_pd(__mmask8 __U, __m256d __A) { + // CHECK-LABEL: @test_mm256_maskz_rcp14_pd + // CHECK: @llvm.x86.avx512.rcp14.pd.256 + return _mm256_maskz_rcp14_pd(__U, __A); +} + +__m128 test_mm_rcp14_ps(__m128 __A) { + // CHECK-LABEL: @test_mm_rcp14_ps + // CHECK: @llvm.x86.avx512.rcp14.ps.128 + return _mm_rcp14_ps(__A); +} + +__m128 test_mm_mask_rcp14_ps(__m128 __W, __mmask8 __U, __m128 __A) { + // CHECK-LABEL: @test_mm_mask_rcp14_ps + // CHECK: @llvm.x86.avx512.rcp14.ps.128 + return _mm_mask_rcp14_ps(__W, __U, __A); +} + +__m128 test_mm_maskz_rcp14_ps(__mmask8 __U, __m128 __A) { + // CHECK-LABEL: @test_mm_maskz_rcp14_ps + // CHECK: @llvm.x86.avx512.rcp14.ps.128 + return _mm_maskz_rcp14_ps(__U, __A); +} + +__m256 test_mm256_rcp14_ps(__m256 __A) { + // CHECK-LABEL: @test_mm256_rcp14_ps + // CHECK: @llvm.x86.avx512.rcp14.ps.256 + return _mm256_rcp14_ps(__A); +} + +__m256 test_mm256_mask_rcp14_ps(__m256 __W, __mmask8 __U, __m256 __A) { + // CHECK-LABEL: @test_mm256_mask_rcp14_ps + // CHECK: @llvm.x86.avx512.rcp14.ps.256 + return _mm256_mask_rcp14_ps(__W, __U, __A); +} + +__m256 test_mm256_maskz_rcp14_ps(__mmask8 __U, __m256 __A) { + // CHECK-LABEL: @test_mm256_maskz_rcp14_ps + // CHECK: @llvm.x86.avx512.rcp14.ps.256 + return _mm256_maskz_rcp14_ps(__U, __A); +} + +__m128d test_mm_rsqrt14_pd(__m128d __A) { + // CHECK-LABEL: @test_mm_rsqrt14_pd + // CHECK: @llvm.x86.avx512.rsqrt14.pd.128 + return _mm_rsqrt14_pd(__A); +} + +__m128d test_mm_mask_rsqrt14_pd(__m128d __W, __mmask8 __U, __m128d __A) { + // CHECK-LABEL: @test_mm_mask_rsqrt14_pd + // CHECK: @llvm.x86.avx512.rsqrt14.pd.128 + return _mm_mask_rsqrt14_pd(__W, __U, __A); +} + +__m128d test_mm_maskz_rsqrt14_pd(__mmask8 __U, __m128d __A) { + // CHECK-LABEL: @test_mm_maskz_rsqrt14_pd + // CHECK: @llvm.x86.avx512.rsqrt14.pd.128 + return _mm_maskz_rsqrt14_pd(__U, __A); +} + +__m256d test_mm256_rsqrt14_pd(__m256d __A) { + // CHECK-LABEL: @test_mm256_rsqrt14_pd + // CHECK: @llvm.x86.avx512.rsqrt14.pd.256 + return _mm256_rsqrt14_pd(__A); +} + +__m256d test_mm256_mask_rsqrt14_pd(__m256d __W, __mmask8 __U, __m256d __A) { + // CHECK-LABEL: @test_mm256_mask_rsqrt14_pd + // CHECK: @llvm.x86.avx512.rsqrt14.pd.256 + return _mm256_mask_rsqrt14_pd(__W, __U, __A); +} + +__m256d test_mm256_maskz_rsqrt14_pd(__mmask8 __U, __m256d __A) { + // CHECK-LABEL: @test_mm256_maskz_rsqrt14_pd + // CHECK: @llvm.x86.avx512.rsqrt14.pd.256 + return _mm256_maskz_rsqrt14_pd(__U, __A); +} + +__m128 test_mm_rsqrt14_ps(__m128 __A) { + // CHECK-LABEL: @test_mm_rsqrt14_ps + // CHECK: @llvm.x86.avx512.rsqrt14.ps.128 + return _mm_rsqrt14_ps(__A); +} + +__m128 test_mm_mask_rsqrt14_ps(__m128 __W, __mmask8 __U, __m128 __A) { + // CHECK-LABEL: @test_mm_mask_rsqrt14_ps + // CHECK: @llvm.x86.avx512.rsqrt14.ps.128 + return _mm_mask_rsqrt14_ps(__W, __U, __A); +} + +__m128 test_mm_maskz_rsqrt14_ps(__mmask8 __U, __m128 __A) { + // CHECK-LABEL: @test_mm_maskz_rsqrt14_ps + // CHECK: @llvm.x86.avx512.rsqrt14.ps.128 + return _mm_maskz_rsqrt14_ps(__U, __A); +} + +__m256 test_mm256_rsqrt14_ps(__m256 __A) { + // CHECK-LABEL: @test_mm256_rsqrt14_ps + // CHECK: @llvm.x86.avx512.rsqrt14.ps.256 + return _mm256_rsqrt14_ps(__A); +} + +__m256 test_mm256_mask_rsqrt14_ps(__m256 __W, __mmask8 __U, __m256 __A) { + // CHECK-LABEL: @test_mm256_mask_rsqrt14_ps + // CHECK: @llvm.x86.avx512.rsqrt14.ps.256 + return _mm256_mask_rsqrt14_ps(__W, __U, __A); +} + +__m256 test_mm256_maskz_rsqrt14_ps(__mmask8 __U, __m256 __A) { + // CHECK-LABEL: @test_mm256_maskz_rsqrt14_ps + // CHECK: @llvm.x86.avx512.rsqrt14.ps.256 + return _mm256_maskz_rsqrt14_ps(__U, __A); +} + +__m256 test_mm256_shuffle_f32x4(__m256 __A, __m256 __B) { + // CHECK-LABEL: @test_mm256_shuffle_f32x4 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm256_shuffle_f32x4(__A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m256 test_mm256_mask_shuffle_f32x4(__m256 __W, __mmask8 __U, __m256 __A, __m256 __B) { + // CHECK-LABEL: @test_mm256_mask_shuffle_f32x4 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm256_mask_shuffle_f32x4(__W, __U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m256 test_mm256_maskz_shuffle_f32x4(__mmask8 __U, __m256 __A, __m256 __B) { + // CHECK-LABEL: @test_mm256_maskz_shuffle_f32x4 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm256_maskz_shuffle_f32x4(__U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m256d test_mm256_shuffle_f64x2(__m256d __A, __m256d __B) { + // CHECK-LABEL: @test_mm256_shuffle_f64x2 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm256_shuffle_f64x2(__A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m256d test_mm256_mask_shuffle_f64x2(__m256d __W, __mmask8 __U, __m256d __A, __m256d __B) { + // CHECK-LABEL: @test_mm256_mask_shuffle_f64x2 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm256_mask_shuffle_f64x2(__W, __U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m256d test_mm256_maskz_shuffle_f64x2(__mmask8 __U, __m256d __A, __m256d __B) { + // CHECK-LABEL: @test_mm256_maskz_shuffle_f64x2 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm256_maskz_shuffle_f64x2(__U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m256i test_mm256_shuffle_i32x4(__m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_shuffle_i32x4 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm256_shuffle_i32x4(__A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m256i test_mm256_mask_shuffle_i32x4(__m256i __W, __mmask8 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_mask_shuffle_i32x4 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm256_mask_shuffle_i32x4(__W, __U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m256i test_mm256_maskz_shuffle_i32x4(__mmask8 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_maskz_shuffle_i32x4 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm256_maskz_shuffle_i32x4(__U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m256i test_mm256_shuffle_i64x2(__m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_shuffle_i64x2 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm256_shuffle_i64x2(__A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m256i test_mm256_mask_shuffle_i64x2(__m256i __W, __mmask8 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_mask_shuffle_i64x2 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm256_mask_shuffle_i64x2(__W, __U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m256i test_mm256_maskz_shuffle_i64x2(__mmask8 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_maskz_shuffle_i64x2 + // CHECK: @llvm.x86.avx512.mask.shuf + return _mm256_maskz_shuffle_i64x2(__U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m128d test_mm_mask_shuffle_pd(__m128d __W, __mmask8 __U, __m128d __A, __m128d __B) { + // CHECK-LABEL: @test_mm_mask_shuffle_pd + // CHECK: @llvm.x86.avx512.mask.shuf.pd.128 + return _mm_mask_shuffle_pd(__W, __U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m128d test_mm_maskz_shuffle_pd(__mmask8 __U, __m128d __A, __m128d __B) { + // CHECK-LABEL: @test_mm_maskz_shuffle_pd + // CHECK: @llvm.x86.avx512.mask.shuf.pd.128 + return _mm_maskz_shuffle_pd(__U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m256d test_mm256_mask_shuffle_pd(__m256d __W, __mmask8 __U, __m256d __A, __m256d __B) { + // CHECK-LABEL: @test_mm256_mask_shuffle_pd + // CHECK: @llvm.x86.avx512.mask.shuf.pd.256 + return _mm256_mask_shuffle_pd(__W, __U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m256d test_mm256_maskz_shuffle_pd(__mmask8 __U, __m256d __A, __m256d __B) { + // CHECK-LABEL: @test_mm256_maskz_shuffle_pd + // CHECK: @llvm.x86.avx512.mask.shuf.pd.256 + return _mm256_maskz_shuffle_pd(__U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m128 test_mm_mask_shuffle_ps(__m128 __W, __mmask8 __U, __m128 __A, __m128 __B) { + // CHECK-LABEL: @test_mm_mask_shuffle_ps + // CHECK: @llvm.x86.avx512.mask.shuf.ps.128 + return _mm_mask_shuffle_ps(__W, __U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m128 test_mm_maskz_shuffle_ps(__mmask8 __U, __m128 __A, __m128 __B) { + // CHECK-LABEL: @test_mm_maskz_shuffle_ps + // CHECK: @llvm.x86.avx512.mask.shuf.ps.128 + return _mm_maskz_shuffle_ps(__U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m256 test_mm256_mask_shuffle_ps(__m256 __W, __mmask8 __U, __m256 __A, __m256 __B) { + // CHECK-LABEL: @test_mm256_mask_shuffle_ps + // CHECK: @llvm.x86.avx512.mask.shuf.ps.256 + return _mm256_mask_shuffle_ps(__W, __U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m256 test_mm256_maskz_shuffle_ps(__mmask8 __U, __m256 __A, __m256 __B) { + // CHECK-LABEL: @test_mm256_maskz_shuffle_ps + // CHECK: @llvm.x86.avx512.mask.shuf.ps.256 + return _mm256_maskz_shuffle_ps(__U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +void test_mm_mask_store_pd(void *__P, __mmask8 __U, __m128d __A) { + // CHECK-LABEL: @test_mm_mask_store_pd + // CHECK: @llvm.x86.avx512.mask.store.pd.128 + return _mm_mask_store_pd(__P, __U, __A); +} + +void test_mm256_mask_store_pd(void *__P, __mmask8 __U, __m256d __A) { + // CHECK-LABEL: @test_mm256_mask_store_pd + // CHECK: @llvm.x86.avx512.mask.store.pd.256 + return _mm256_mask_store_pd(__P, __U, __A); +} + +void test_mm_mask_store_ps(void *__P, __mmask8 __U, __m128 __A) { + // CHECK-LABEL: @test_mm_mask_store_ps + // CHECK: @llvm.x86.avx512.mask.store.ps.128 + return _mm_mask_store_ps(__P, __U, __A); +} + +void test_mm256_mask_store_ps(void *__P, __mmask8 __U, __m256 __A) { + // CHECK-LABEL: @test_mm256_mask_store_ps + // CHECK: @llvm.x86.avx512.mask.store.ps.256 + return _mm256_mask_store_ps(__P, __U, __A); +} + +void test_mm_mask_storeu_epi64(void *__P, __mmask8 __U, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_storeu_epi64 + // CHECK: @llvm.x86.avx512.mask.storeu + return _mm_mask_storeu_epi64(__P, __U, __A); +} + +void test_mm256_mask_storeu_epi64(void *__P, __mmask8 __U, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_storeu_epi64 + // CHECK: @llvm.x86.avx512.mask.storeu + return _mm256_mask_storeu_epi64(__P, __U, __A); +} + +void test_mm_mask_storeu_epi32(void *__P, __mmask8 __U, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_storeu_epi32 + // CHECK: @llvm.x86.avx512.mask.storeu + return _mm_mask_storeu_epi32(__P, __U, __A); +} + +void test_mm256_mask_storeu_epi32(void *__P, __mmask8 __U, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_storeu_epi32 + // CHECK: @llvm.x86.avx512.mask.storeu + return _mm256_mask_storeu_epi32(__P, __U, __A); +} + +void test_mm_mask_storeu_pd(void *__P, __mmask8 __U, __m128d __A) { + // CHECK-LABEL: @test_mm_mask_storeu_pd + // CHECK: @llvm.x86.avx512.mask.storeu.pd.128 + return _mm_mask_storeu_pd(__P, __U, __A); +} + +void test_mm256_mask_storeu_pd(void *__P, __mmask8 __U, __m256d __A) { + // CHECK-LABEL: @test_mm256_mask_storeu_pd + // CHECK: @llvm.x86.avx512.mask.storeu.pd.256 + return _mm256_mask_storeu_pd(__P, __U, __A); +} + +void test_mm_mask_storeu_ps(void *__P, __mmask8 __U, __m128 __A) { + // CHECK-LABEL: @test_mm_mask_storeu_ps + // CHECK: @llvm.x86.avx512.mask.storeu.ps.128 + return _mm_mask_storeu_ps(__P, __U, __A); +} + +void test_mm256_mask_storeu_ps(void *__P, __mmask8 __U, __m256 __A) { + // CHECK-LABEL: @test_mm256_mask_storeu_ps + // CHECK: @llvm.x86.avx512.mask.storeu.ps.256 + return _mm256_mask_storeu_ps(__P, __U, __A); +} + +__m128d test_mm_mask_unpackhi_pd(__m128d __W, __mmask8 __U, __m128d __A, __m128d __B) { + // CHECK-LABEL: @test_mm_mask_unpackhi_pd + // CHECK: @llvm.x86.avx512.mask.unpckh.pd.128 + return _mm_mask_unpackhi_pd(__W, __U, __A, __B); +} + +__m128d test_mm_maskz_unpackhi_pd(__mmask8 __U, __m128d __A, __m128d __B) { + // CHECK-LABEL: @test_mm_maskz_unpackhi_pd + // CHECK: @llvm.x86.avx512.mask.unpckh.pd.128 + return _mm_maskz_unpackhi_pd(__U, __A, __B); +} + +__m256d test_mm256_mask_unpackhi_pd(__m256d __W, __mmask8 __U, __m256d __A, __m256d __B) { + // CHECK-LABEL: @test_mm256_mask_unpackhi_pd + // CHECK: @llvm.x86.avx512.mask.unpckh.pd.256 + return _mm256_mask_unpackhi_pd(__W, __U, __A, __B); +} + +__m256d test_mm256_maskz_unpackhi_pd(__mmask8 __U, __m256d __A, __m256d __B) { + // CHECK-LABEL: @test_mm256_maskz_unpackhi_pd + // CHECK: @llvm.x86.avx512.mask.unpckh.pd.256 + return _mm256_maskz_unpackhi_pd(__U, __A, __B); +} + +__m128 test_mm_mask_unpackhi_ps(__m128 __W, __mmask8 __U, __m128 __A, __m128 __B) { + // CHECK-LABEL: @test_mm_mask_unpackhi_ps + // CHECK: @llvm.x86.avx512.mask.unpckh.ps.128 + return _mm_mask_unpackhi_ps(__W, __U, __A, __B); +} + +__m128 test_mm_maskz_unpackhi_ps(__mmask8 __U, __m128 __A, __m128 __B) { + // CHECK-LABEL: @test_mm_maskz_unpackhi_ps + // CHECK: @llvm.x86.avx512.mask.unpckh.ps.128 + return _mm_maskz_unpackhi_ps(__U, __A, __B); +} + +__m256 test_mm256_mask_unpackhi_ps(__m256 __W, __mmask8 __U, __m256 __A, __m256 __B) { + // CHECK-LABEL: @test_mm256_mask_unpackhi_ps + // CHECK: @llvm.x86.avx512.mask.unpckh.ps.256 + return _mm256_mask_unpackhi_ps(__W, __U, __A, __B); +} + +__m256 test_mm256_maskz_unpackhi_ps(__mmask8 __U, __m256 __A, __m256 __B) { + // CHECK-LABEL: @test_mm256_maskz_unpackhi_ps + // CHECK: @llvm.x86.avx512.mask.unpckh.ps.256 + return _mm256_maskz_unpackhi_ps(__U, __A, __B); +} + +__m128d test_mm_mask_unpacklo_pd(__m128d __W, __mmask8 __U, __m128d __A, __m128d __B) { + // CHECK-LABEL: @test_mm_mask_unpacklo_pd + // CHECK: @llvm.x86.avx512.mask.unpckl.pd.128 + return _mm_mask_unpacklo_pd(__W, __U, __A, __B); +} + +__m128d test_mm_maskz_unpacklo_pd(__mmask8 __U, __m128d __A, __m128d __B) { + // CHECK-LABEL: @test_mm_maskz_unpacklo_pd + // CHECK: @llvm.x86.avx512.mask.unpckl.pd.128 + return _mm_maskz_unpacklo_pd(__U, __A, __B); +} + +__m256d test_mm256_mask_unpacklo_pd(__m256d __W, __mmask8 __U, __m256d __A, __m256d __B) { + // CHECK-LABEL: @test_mm256_mask_unpacklo_pd + // CHECK: @llvm.x86.avx512.mask.unpckl.pd.256 + return _mm256_mask_unpacklo_pd(__W, __U, __A, __B); +} + +__m256d test_mm256_maskz_unpacklo_pd(__mmask8 __U, __m256d __A, __m256d __B) { + // CHECK-LABEL: @test_mm256_maskz_unpacklo_pd + // CHECK: @llvm.x86.avx512.mask.unpckl.pd.256 + return _mm256_maskz_unpacklo_pd(__U, __A, __B); +} + +__m128 test_mm_mask_unpacklo_ps(__m128 __W, __mmask8 __U, __m128 __A, __m128 __B) { + // CHECK-LABEL: @test_mm_mask_unpacklo_ps + // CHECK: @llvm.x86.avx512.mask.unpckl.ps.128 + return _mm_mask_unpacklo_ps(__W, __U, __A, __B); +} + +__m128 test_mm_maskz_unpacklo_ps(__mmask8 __U, __m128 __A, __m128 __B) { + // CHECK-LABEL: @test_mm_maskz_unpacklo_ps + // CHECK: @llvm.x86.avx512.mask.unpckl.ps.128 + return _mm_maskz_unpacklo_ps(__U, __A, __B); +} + +__m256 test_mm256_mask_unpacklo_ps(__m256 __W, __mmask8 __U, __m256 __A, __m256 __B) { + // CHECK-LABEL: @test_mm256_mask_unpacklo_ps + // CHECK: @llvm.x86.avx512.mask.unpckl.ps.256 + return _mm256_mask_unpacklo_ps(__W, __U, __A, __B); +} + +__m256 test_mm256_maskz_unpacklo_ps(__mmask8 __U, __m256 __A, __m256 __B) { + // CHECK-LABEL: @test_mm256_maskz_unpacklo_ps + // CHECK: @llvm.x86.avx512.mask.unpckl.ps.256 + return _mm256_maskz_unpacklo_ps(__U, __A, __B); +} + +__m128d test_mm_mask_permute_pd(__m128d __W, __mmask8 __U, __m128d __X) { + // CHECK-LABEL: @test_mm_mask_permute_pd + // CHECK: @llvm.x86.avx512.mask.vpermil.pd + return _mm_mask_permute_pd(__W, __U, __X, _MM_FROUND_CUR_DIRECTION); +} + +__m128d test_mm_maskz_permute_pd(__mmask8 __U, __m128d __X) { + // CHECK-LABEL: @test_mm_maskz_permute_pd + // CHECK: @llvm.x86.avx512.mask.vpermil.pd + return _mm_maskz_permute_pd(__U, __X, _MM_FROUND_CUR_DIRECTION); +} + +__m256d test_mm256_mask_permute_pd(__m256d __W, __mmask8 __U, __m256d __X) { + // CHECK-LABEL: @test_mm256_mask_permute_pd + // CHECK: @llvm.x86.avx512.mask.vpermil.pd.256 + return _mm256_mask_permute_pd(__W, __U, __X, _MM_FROUND_CUR_DIRECTION); +} + +__m256d test_mm256_maskz_permute_pd(__mmask8 __U, __m256d __X) { + // CHECK-LABEL: @test_mm256_maskz_permute_pd + // CHECK: @llvm.x86.avx512.mask.vpermil.pd.256 + return _mm256_maskz_permute_pd(__U, __X, _MM_FROUND_CUR_DIRECTION); +} + +__m128 test_mm_mask_permute_ps(__m128 __W, __mmask8 __U, __m128 __X) { + // CHECK-LABEL: @test_mm_mask_permute_ps + // CHECK: @llvm.x86.avx512.mask.vpermil.ps + return _mm_mask_permute_ps(__W, __U, __X, _MM_FROUND_CUR_DIRECTION); +} + +__m128 test_mm_maskz_permute_ps(__mmask8 __U, __m128 __X) { + // CHECK-LABEL: @test_mm_maskz_permute_ps + // CHECK: @llvm.x86.avx512.mask.vpermil.ps + return _mm_maskz_permute_ps(__U, __X, _MM_FROUND_CUR_DIRECTION); +} + +__m256 test_mm256_mask_permute_ps(__m256 __W, __mmask8 __U, __m256 __X) { + // CHECK-LABEL: @test_mm256_mask_permute_ps + // CHECK: @llvm.x86.avx512.mask.vpermil.ps.256 + return _mm256_mask_permute_ps(__W, __U, __X, _MM_FROUND_CUR_DIRECTION); +} + +__m256 test_mm256_maskz_permute_ps(__mmask8 __U, __m256 __X) { + // CHECK-LABEL: @test_mm256_maskz_permute_ps + // CHECK: @llvm.x86.avx512.mask.vpermil.ps.256 + return _mm256_maskz_permute_ps(__U, __X, _MM_FROUND_CUR_DIRECTION); +} + +__m128d test_mm_mask_permutevar_pd(__m128d __W, __mmask8 __U, __m128d __A, __m128i __C) { + // CHECK-LABEL: @test_mm_mask_permutevar_pd + // CHECK: @llvm.x86.avx512.mask.vpermilvar.pd + return _mm_mask_permutevar_pd(__W, __U, __A, __C); +} + +__m128d test_mm_maskz_permutevar_pd(__mmask8 __U, __m128d __A, __m128i __C) { + // CHECK-LABEL: @test_mm_maskz_permutevar_pd + // CHECK: @llvm.x86.avx512.mask.vpermilvar.pd + return _mm_maskz_permutevar_pd(__U, __A, __C); +} + +__m256d test_mm256_mask_permutevar_pd(__m256d __W, __mmask8 __U, __m256d __A, __m256i __C) { + // CHECK-LABEL: @test_mm256_mask_permutevar_pd + // CHECK: @llvm.x86.avx512.mask.vpermilvar.pd.256 + return _mm256_mask_permutevar_pd(__W, __U, __A, __C); +} + +__m256d test_mm256_maskz_permutevar_pd(__mmask8 __U, __m256d __A, __m256i __C) { + // CHECK-LABEL: @test_mm256_maskz_permutevar_pd + // CHECK: @llvm.x86.avx512.mask.vpermilvar.pd.256 + return _mm256_maskz_permutevar_pd(__U, __A, __C); +} + +__m128 test_mm_mask_permutevar_ps(__m128 __W, __mmask8 __U, __m128 __A, __m128i __C) { + // CHECK-LABEL: @test_mm_mask_permutevar_ps + // CHECK: @llvm.x86.avx512.mask.vpermilvar.ps + return _mm_mask_permutevar_ps(__W, __U, __A, __C); +} + +__m128 test_mm_maskz_permutevar_ps(__mmask8 __U, __m128 __A, __m128i __C) { + // CHECK-LABEL: @test_mm_maskz_permutevar_ps + // CHECK: @llvm.x86.avx512.mask.vpermilvar.ps + return _mm_maskz_permutevar_ps(__U, __A, __C); +} + +__m256 test_mm256_mask_permutevar_ps(__m256 __W, __mmask8 __U, __m256 __A, __m256i __C) { + // CHECK-LABEL: @test_mm256_mask_permutevar_ps + // CHECK: @llvm.x86.avx512.mask.vpermilvar.ps.256 + return _mm256_mask_permutevar_ps(__W, __U, __A, __C); +} + +__m256 test_mm256_maskz_permutevar_ps(__mmask8 __U, __m256 __A, __m256i __C) { + // CHECK-LABEL: @test_mm256_maskz_permutevar_ps + // CHECK: @llvm.x86.avx512.mask.vpermilvar.ps.256 + return _mm256_maskz_permutevar_ps(__U, __A, __C); +} + +__m128i test_mm_lzcnt_epi32(__m128i __A) { + // CHECK-LABEL: @test_mm_lzcnt_epi32 + // CHECK: @llvm.x86.avx512.mask.lzcnt.d + return _mm_lzcnt_epi32(__A); +} + +__m128i test_mm_mask_lzcnt_epi32(__m128i __W, __mmask8 __U, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_lzcnt_epi32 + // CHECK: @llvm.x86.avx512.mask.lzcnt.d + return _mm_mask_lzcnt_epi32(__W, __U, __A); +} + +__m128i test_mm_maskz_lzcnt_epi32(__mmask8 __U, __m128i __A) { + // CHECK-LABEL: @test_mm_maskz_lzcnt_epi32 + // CHECK: @llvm.x86.avx512.mask.lzcnt.d + return _mm_maskz_lzcnt_epi32(__U, __A); +} + +__m256i test_mm256_lzcnt_epi32(__m256i __A) { + // CHECK-LABEL: @test_mm256_lzcnt_epi32 + // CHECK: @llvm.x86.avx512.mask.lzcnt.d + return _mm256_lzcnt_epi32(__A); +} + +__m256i test_mm256_mask_lzcnt_epi32(__m256i __W, __mmask8 __U, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_lzcnt_epi32 + // CHECK: @llvm.x86.avx512.mask.lzcnt.d + return _mm256_mask_lzcnt_epi32(__W, __U, __A); +} + +__m256i test_mm256_maskz_lzcnt_epi32(__mmask8 __U, __m256i __A) { + // CHECK-LABEL: @test_mm256_maskz_lzcnt_epi32 + // CHECK: @llvm.x86.avx512.mask.lzcnt.d + return _mm256_maskz_lzcnt_epi32(__U, __A); +} + +__m128i test_mm_lzcnt_epi64(__m128i __A) { + // CHECK-LABEL: @test_mm_lzcnt_epi64 + // CHECK: @llvm.x86.avx512.mask.lzcnt.q + return _mm_lzcnt_epi64(__A); +} + +__m128i test_mm_mask_lzcnt_epi64(__m128i __W, __mmask8 __U, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_lzcnt_epi64 + // CHECK: @llvm.x86.avx512.mask.lzcnt.q + return _mm_mask_lzcnt_epi64(__W, __U, __A); +} + +__m128i test_mm_maskz_lzcnt_epi64(__mmask8 __U, __m128i __A) { + // CHECK-LABEL: @test_mm_maskz_lzcnt_epi64 + // CHECK: @llvm.x86.avx512.mask.lzcnt.q + return _mm_maskz_lzcnt_epi64(__U, __A); +} + +__m256i test_mm256_lzcnt_epi64(__m256i __A) { + // CHECK-LABEL: @test_mm256_lzcnt_epi64 + // CHECK: @llvm.x86.avx512.mask.lzcnt.q + return _mm256_lzcnt_epi64(__A); +} + +__m256i test_mm256_mask_lzcnt_epi64(__m256i __W, __mmask8 __U, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_lzcnt_epi64 + // CHECK: @llvm.x86.avx512.mask.lzcnt.q + return _mm256_mask_lzcnt_epi64(__W, __U, __A); +} + +__m256i test_mm256_maskz_lzcnt_epi64(__mmask8 __U, __m256i __A) { + // CHECK-LABEL: @test_mm256_maskz_lzcnt_epi64 + // CHECK: @llvm.x86.avx512.mask.lzcnt.q + return _mm256_maskz_lzcnt_epi64(__U, __A); +} + Index: test/CodeGen/avx512vlbw-builtins.c =================================================================== --- test/CodeGen/avx512vlbw-builtins.c +++ test/CodeGen/avx512vlbw-builtins.c @@ -1238,6 +1238,7 @@ // CHECK: @llvm.x86.avx512.mask.pminu.w.256 return _mm256_mask_min_epu16(__W,__M,__A,__B); } + __m128i test_mm_mask_shuffle_epi8(__m128i __W, __mmask16 __U, __m128i __A, __m128i __B) { // CHECK-LABEL: @test_mm_mask_shuffle_epi8 // CHECK: @llvm.x86.avx512.mask.pshuf.b.128 @@ -2005,3 +2006,122 @@ return _mm256_maskz_mov_epi8(__U, __A); } +__mmask16 test_mm_test_epi8_mask(__m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_test_epi8_mask + // CHECK: @llvm.x86.avx512.ptestm.b.128 + return _mm_test_epi8_mask(__A, __B); +} + +__mmask16 test_mm_mask_test_epi8_mask(__mmask16 __U, __m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_mask_test_epi8_mask + // CHECK: @llvm.x86.avx512.ptestm.b.128 + return _mm_mask_test_epi8_mask(__U, __A, __B); +} + +__mmask32 test_mm256_test_epi8_mask(__m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_test_epi8_mask + // CHECK: @llvm.x86.avx512.ptestm.b.256 + return _mm256_test_epi8_mask(__A, __B); +} + +__mmask32 test_mm256_mask_test_epi8_mask(__mmask32 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_mask_test_epi8_mask + // CHECK: @llvm.x86.avx512.ptestm.b.256 + return _mm256_mask_test_epi8_mask(__U, __A, __B); +} + +__mmask8 test_mm_test_epi16_mask(__m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_test_epi16_mask + // CHECK: @llvm.x86.avx512.ptestm.w.128 + return _mm_test_epi16_mask(__A, __B); +} + +__mmask8 test_mm_mask_test_epi16_mask(__mmask8 __U, __m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_mask_test_epi16_mask + // CHECK: @llvm.x86.avx512.ptestm.w.128 + return _mm_mask_test_epi16_mask(__U, __A, __B); +} + +__mmask16 test_mm256_test_epi16_mask(__m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_test_epi16_mask + // CHECK: @llvm.x86.avx512.ptestm.w.256 + return _mm256_test_epi16_mask(__A, __B); +} + +__mmask16 test_mm256_mask_test_epi16_mask(__mmask16 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_mask_test_epi16_mask + // CHECK: @llvm.x86.avx512.ptestm.w.256 + return _mm256_mask_test_epi16_mask(__U, __A, __B); +} + +__mmask16 test_mm_testn_epi8_mask(__m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_testn_epi8_mask + // CHECK: @llvm.x86.avx512.ptestnm.b.128 + return _mm_testn_epi8_mask(__A, __B); +} + +__mmask16 test_mm_mask_testn_epi8_mask(__mmask16 __U, __m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_mask_testn_epi8_mask + // CHECK: @llvm.x86.avx512.ptestnm.b.128 + return _mm_mask_testn_epi8_mask(__U, __A, __B); +} + +__mmask32 test_mm256_testn_epi8_mask(__m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_testn_epi8_mask + // CHECK: @llvm.x86.avx512.ptestnm.b.256 + return _mm256_testn_epi8_mask(__A, __B); +} + +__mmask32 test_mm256_mask_testn_epi8_mask(__mmask32 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_mask_testn_epi8_mask + // CHECK: @llvm.x86.avx512.ptestnm.b.256 + return _mm256_mask_testn_epi8_mask(__U, __A, __B); +} + +__mmask8 test_mm_testn_epi16_mask(__m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_testn_epi16_mask + // CHECK: @llvm.x86.avx512.ptestnm.w.128 + return _mm_testn_epi16_mask(__A, __B); +} + +__mmask8 test_mm_mask_testn_epi16_mask(__mmask8 __U, __m128i __A, __m128i __B) { + // CHECK-LABEL: @test_mm_mask_testn_epi16_mask + // CHECK: @llvm.x86.avx512.ptestnm.w.128 + return _mm_mask_testn_epi16_mask(__U, __A, __B); +} + +__mmask16 test_mm256_testn_epi16_mask(__m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_testn_epi16_mask + // CHECK: @llvm.x86.avx512.ptestnm.w.256 + return _mm256_testn_epi16_mask(__A, __B); +} + +__mmask16 test_mm256_mask_testn_epi16_mask(__mmask16 __U, __m256i __A, __m256i __B) { + // CHECK-LABEL: @test_mm256_mask_testn_epi16_mask + // CHECK: @llvm.x86.avx512.ptestnm.w.256 + return _mm256_mask_testn_epi16_mask(__U, __A, __B); +} + +void test_mm_mask_storeu_epi16(void *__P, __mmask8 __U, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_storeu_epi16 + // CHECK: @llvm.x86.avx512.mask.storeu.w.128 + return _mm_mask_storeu_epi16(__P, __U, __A); +} + +void test_mm256_mask_storeu_epi16(void *__P, __mmask16 __U, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_storeu_epi16 + // CHECK: @llvm.x86.avx512.mask.storeu.w.256 + return _mm256_mask_storeu_epi16(__P, __U, __A); +} + +void test_mm_mask_storeu_epi8(void *__P, __mmask16 __U, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_storeu_epi8 + // CHECK: @llvm.x86.avx512.mask.storeu.b.128 + return _mm_mask_storeu_epi8(__P, __U, __A); +} + +void test_mm256_mask_storeu_epi8(void *__P, __mmask32 __U, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_storeu_epi8 + // CHECK: @llvm.x86.avx512.mask.storeu.b.256 + return _mm256_mask_storeu_epi8(__P, __U, __A); +}