Index: include/clang/Basic/BuiltinsX86.def =================================================================== --- include/clang/Basic/BuiltinsX86.def +++ include/clang/Basic/BuiltinsX86.def @@ -1962,6 +1962,12 @@ 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_vfmaddss3_mask, "V4fV4fV4fV4fUcIi", "", "avx512f") +TARGET_BUILTIN(__builtin_ia32_vfmaddss3_maskz, "V4fV4fV4fV4fUcIi", "", "avx512f") +TARGET_BUILTIN(__builtin_ia32_vfmaddss3_mask3, "V4fV4fV4fV4fUcIi", "", "avx512f") +TARGET_BUILTIN(__builtin_ia32_vfmaddsd3_mask, "V2dV2dV2dV2dUcIi", "", "avx512f") +TARGET_BUILTIN(__builtin_ia32_vfmaddsd3_maskz, "V2dV2dV2dV2dUcIi", "", "avx512f") +TARGET_BUILTIN(__builtin_ia32_vfmaddsd3_mask3, "V2dV2dV2dV2dUcIi", "", "avx512f") #undef BUILTIN #undef TARGET_BUILTIN Index: lib/Headers/avx512fintrin.h =================================================================== --- lib/Headers/avx512fintrin.h +++ lib/Headers/avx512fintrin.h @@ -5619,6 +5619,437 @@ __R);\ }) +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask_fmadd_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_vfmaddss3_mask ((__v4sf) __A, + (__v4sf) __B, + (__v4sf) __W, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_mask_fmadd_round_ss( __W, __U, __A, __B, __R) __extension__({\ +__builtin_ia32_vfmaddss3_mask ((__v4sf) __A,\ + (__v4sf) __B,\ + (__v4sf) __W,\ + (__mmask8) __U,\ + __R);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_maskz_fmadd_ss (__mmask8 __U, __m128 __A, __m128 __B, __m128 __C) +{ + return (__m128) __builtin_ia32_vfmaddss3_maskz ((__v4sf) __A, + (__v4sf) __B, + (__v4sf) __C, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_maskz_fmadd_round_ss( __U, __A, __B, __C, __R) __extension__ ({\ +__builtin_ia32_vfmaddss3_maskz ((__v4sf) __A,\ + (__v4sf) __B,\ + (__v4sf) __C,\ + (__mmask8) __U,\ + _MM_FROUND_CUR_DIRECTION);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask3_fmadd_ss (__m128 __W, __m128 __X, __m128 __Y, __mmask8 __U) +{ + return (__m128) __builtin_ia32_vfmaddss3_mask3 ((__v4sf) __W, + (__v4sf) __X, + (__v4sf) __Y, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_mask3_fmadd_round_ss( __W, __X, __Y, __U, __R) __extension__ ({\ +__builtin_ia32_vfmaddss3_mask3 ((__v4sf) __W,\ + (__v4sf) __X,\ + (__v4sf) __Y,\ + (__mmask8) __U,\ + __R);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask_fmsub_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_vfmaddss3_mask ((__v4sf) __A, + (__v4sf) -(__B), + (__v4sf) __W, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_mask_fmsub_round_ss( __W, __U, __A, __B, __R) __extension__ ({\ +__builtin_ia32_vfmaddss3_mask ((__v4sf) __A,\ + (__v4sf) -(__B),\ + (__v4sf) __W,\ + (__mmask8) __U,\ + __R);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_maskz_fmsub_ss (__mmask8 __U, __m128 __A, __m128 __B, __m128 __C) +{ + return (__m128) __builtin_ia32_vfmaddss3_maskz ((__v4sf) __A, + (__v4sf) __B, + (__v4sf) -(__C), + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_maskz_fmsub_round_ss( __U, __A, __B, __C, __R) __extension__ ({\ +__builtin_ia32_vfmaddss3_maskz ((__v4sf) __A,\ + (__v4sf) __B,\ + (__v4sf) -(__C),\ + (__mmask8) __U,\ + __R);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask3_fmsub_ss (__m128 __W, __m128 __X, __m128 __Y, __mmask8 __U) +{ + return (__m128) __builtin_ia32_vfmaddss3_mask3 ((__v4sf) __W, + (__v4sf) __X, + (__v4sf) -(__Y), + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_mask3_fmsub_round_ss( __W, __X, __Y, __U, __R) __extension__ ({\ +__builtin_ia32_vfmaddss3_mask3 ((__v4sf) __W,\ + (__v4sf) __X,\ + (__v4sf) -(__Y),\ + (__mmask8) __U,\ + __R);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask_fnmadd_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_vfmaddss3_mask ((__v4sf) -(__A), + (__v4sf) __B, + (__v4sf) __W, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_mask_fnmadd_round_ss( __W, __U, __A, __B, __R) __extension__ ({\ +__builtin_ia32_vfmaddss3_mask ((__v4sf) -(__A),\ + (__v4sf) __B,\ + (__v4sf) __W,\ + (__mmask8) __U,\ + __R);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_maskz_fnmadd_ss (__mmask8 __U, __m128 __A, __m128 __B, __m128 __C) +{ + return (__m128) __builtin_ia32_vfmaddss3_maskz ((__v4sf) -(__A), + (__v4sf) __B, + (__v4sf) __C, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_maskz_fnmadd_round_ss( __U, __A, __B, __C, __R) __extension__ ({\ +__builtin_ia32_vfmaddss3_maskz ((__v4sf) -(__A),\ + (__v4sf) __B,\ + (__v4sf) __C,\ + (__mmask8) __U,\ + __R);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask3_fnmadd_ss (__m128 __W, __m128 __X, __m128 __Y, __mmask8 __U) +{ + return (__m128) __builtin_ia32_vfmaddss3_mask3 ((__v4sf) -(__W), + (__v4sf) __X, + (__v4sf) __Y, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_mask3_fnmadd_round_ss( __W, __X, __Y, __U, __R) __extension__({\ +__builtin_ia32_vfmaddss3_mask3 ((__v4sf) -(__W),\ + (__v4sf) __X,\ + (__v4sf) __Y,\ + (__mmask8) __U,\ + __R);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask_fnmsub_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_vfmaddss3_mask ((__v4sf) -(__A), + (__v4sf) -(__B), + (__v4sf) __W, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_mask_fnmsub_round_ss( __W, __U, __A, __B, __R) __extension__ ({\ +__builtin_ia32_vfmaddss3_mask ((__v4sf) -(__A),\ + (__v4sf) -(__B),\ + (__v4sf) __W,\ + (__mmask8) __U,\ + __R);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_maskz_fnmsub_ss (__mmask8 __U, __m128 __A, __m128 __B, __m128 __C) +{ + return (__m128) __builtin_ia32_vfmaddss3_maskz ((__v4sf) -(__A), + (__v4sf) __B, + (__v4sf) -(__C), + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_maskz_fnmsub_round_ss( __U, __A, __B, __C, __R) __extension__ ({\ +__builtin_ia32_vfmaddss3_maskz((__v4sf) -(__A),\ + (__v4sf) __B,\ + (__v4sf) -(__C),\ + (__mmask8) __U,\ + _MM_FROUND_CUR_DIRECTION);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask3_fnmsub_ss (__m128 __W, __m128 __X, __m128 __Y, __mmask8 __U) +{ + return (__m128) __builtin_ia32_vfmaddss3_mask3 ((__v4sf) -(__W), + (__v4sf) __X, + (__v4sf) -(__Y), + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_mask3_fnmsub_round_ss( __W, __X, __Y, __U, __R) __extension__({\ +__builtin_ia32_vfmaddss3_mask3 ((__v4sf) -(__W),\ + (__v4sf) __X,\ + (__v4sf) -(__Y),\ + (__mmask8) __U,\ + __R);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask_fmadd_sd (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_vfmaddsd3_mask ( (__v2df) __A, + (__v2df) __B, + (__v2df) __W, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_mask_fmadd_round_sd( __W, __U, __A, __B, __R) __extension__({\ +__builtin_ia32_vfmaddsd3_mask ( (__v2df) __A,\ + (__v2df) __B,\ + (__v2df) __W,\ + (__mmask8) __U,\ + __R);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_maskz_fmadd_sd (__mmask8 __U, __m128 __A, __m128 __B, __m128 __C) +{ + return (__m128) __builtin_ia32_vfmaddsd3_maskz ( (__v2df) __A, + (__v2df) __B, + (__v2df) __C, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_maskz_fmadd_round_sd( __U, __A, __B, __C, __R) __extension__ ({\ +__builtin_ia32_vfmaddsd3_maskz ( (__v2df) __A,\ + (__v2df) __B,\ + (__v2df) __C,\ + (__mmask8) __U,\ + _MM_FROUND_CUR_DIRECTION);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask3_fmadd_sd (__m128 __W, __m128 __X, __m128 __Y, __mmask8 __U) +{ + return (__m128) __builtin_ia32_vfmaddsd3_mask3 ((__v2df) __W, + (__v2df) __X, + (__v2df) __Y, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_mask3_fmadd_round_sd( __W, __X, __Y, __U, __R) __extension__ ({\ +__builtin_ia32_vfmaddsd3_mask3 ((__v2df) __W,\ + (__v2df) __X,\ + (__v2df) __Y,\ + (__mmask8) __U,\ + __R);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask_fmsub_sd (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_vfmaddsd3_mask ( (__v2df) __A, + (__v2df) -(__B), + (__v2df) __W, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_mask_fmsub_round_sd( __W, __U, __A, __B, __R) __extension__ ({\ +__builtin_ia32_vfmaddsd3_mask ( (__v2df) __A,\ + (__v2df) -(__B),\ + (__v2df) __W,\ + (__mmask8) __U,\ + __R);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_maskz_fmsub_sd (__mmask8 __U, __m128 __A, __m128 __B, __m128 __C) +{ + return (__m128) __builtin_ia32_vfmaddsd3_maskz ( (__v2df) __A, + (__v2df) __B, + (__v2df) -(__C), + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_maskz_fmsub_round_sd( __U, __A, __B, __C, __R) __extension__ ({\ +__builtin_ia32_vfmaddsd3_maskz ( (__v2df) __A,\ + (__v2df) __B,\ + (__v2df) -(__C),\ + (__mmask8) __U,\ + __R);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask3_fmsub_sd (__m128 __W, __m128 __X, __m128 __Y, __mmask8 __U) +{ + return (__m128) __builtin_ia32_vfmaddsd3_mask3 ((__v2df) __W, + (__v2df) __X, + (__v2df) -(__Y), + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_mask3_fmsub_round_sd( __W, __X, __Y, __U, __R) __extension__ ({\ +__builtin_ia32_vfmaddsd3_mask3 ((__v2df) __W,\ + (__v2df) __X,\ + (__v2df) -(__Y),\ + (__mmask8) __U, __R);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask_fnmadd_sd (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_vfmaddsd3_mask ( (__v2df) -(__A), + (__v2df) __B, + (__v2df) __W, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_mask_fnmadd_round_sd( __W, __U, __A, __B, __R) __extension__ ({\ +__builtin_ia32_vfmaddsd3_mask ( (__v2df) -(__A),\ + (__v2df) __B,\ + (__v2df) __W,\ + (__mmask8) __U,\ + __R);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_maskz_fnmadd_sd (__mmask8 __U, __m128 __A, __m128 __B, __m128 __C) +{ + return (__m128) __builtin_ia32_vfmaddsd3_maskz ( (__v2df) -(__A), + (__v2df) __B, + (__v2df) __C, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_maskz_fnmadd_round_sd( __U, __A, __B, __C, __R) __extension__ ({\ +__builtin_ia32_vfmaddsd3_maskz ( (__v2df) -(__A),\ + (__v2df) __B,\ + (__v2df) __C,\ + (__mmask8) __U,\ + __R);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask3_fnmadd_sd (__m128 __W, __m128 __X, __m128 __Y, __mmask8 __U) +{ + return (__m128) __builtin_ia32_vfmaddsd3_mask3 ((__v2df) -(__W), + (__v2df) __X, + (__v2df) __Y, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_mask3_fnmadd_round_sd( __W, __X, __Y, __U, __R) __extension__({\ +__builtin_ia32_vfmaddsd3_mask3 ((__v2df) -(__W),\ + (__v2df) __X,\ + (__v2df) __Y,\ + (__mmask8) __U,\ + __R);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask_fnmsub_sd (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_vfmaddsd3_mask ( (__v2df) -(__A), + (__v2df) -(__B), + (__v2df) __W, + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_mask_fnmsub_round_sd( __W, __U, __A, __B, __R) __extension__ ({\ +__builtin_ia32_vfmaddsd3_mask ( (__v2df) -(__A),\ + (__v2df) -(__B),\ + (__v2df) __W,\ + (__mmask8) __U,\ + __R);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_maskz_fnmsub_sd (__mmask8 __U, __m128 __A, __m128 __B, __m128 __C) +{ + return (__m128) __builtin_ia32_vfmaddsd3_maskz ( (__v2df) -(__A), + (__v2df) __B, + (__v2df) -(__C), + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_maskz_fnmsub_round_sd( __U, __A, __B, __C, __R) __extension__ ({\ +__builtin_ia32_vfmaddsd3_maskz( (__v2df) -(__A),\ + (__v2df) __B,\ + (__v2df) -(__C),\ + (__mmask8) __U,\ + _MM_FROUND_CUR_DIRECTION);\ +}) + +static __inline__ __m128 __DEFAULT_FN_ATTRS +_mm_mask3_fnmsub_sd (__m128 __W, __m128 __X, __m128 __Y, __mmask8 __U) +{ + return (__m128) __builtin_ia32_vfmaddsd3_mask3 ((__v2df) -(__W), + (__v2df) __X, + (__v2df) -(__Y), + (__mmask8) __U, + _MM_FROUND_CUR_DIRECTION); +} + +#define _mm_mask3_fnmsub_round_sd( __W, __X, __Y, __U, __R) __extension__({\ +__builtin_ia32_vfmaddsd3_mask3 ((__v2df) -(__W),\ + (__v2df) __X,\ + (__v2df) -(__Y),\ + (__mmask8) __U,\ + __R);\ +}) + #undef __DEFAULT_FN_ATTRS #endif // __AVX512FINTRIN_H Index: test/CodeGen/avx512f-builtins.c =================================================================== --- test/CodeGen/avx512f-builtins.c +++ test/CodeGen/avx512f-builtins.c @@ -3700,4 +3700,290 @@ return _mm_maskz_sqrt_round_ss(__U,__A,__B,_MM_FROUND_CUR_DIRECTION); } +__m128 test_mm_mask_fmadd_ss(__m128 __W, __mmask8 __U, __m128 __A, __m128 __B){ + // CHECK-LABEL: @test_mm_mask_fmadd_ss + // CHECK: @llvm.x86.avx512.mask.vfmadd.ss + return _mm_mask_fmadd_ss(__W, __U, __A, __B); +} + +__m128 test_mm_mask_fmadd_round_ss(__m128 __W, __mmask8 __U, __m128 __A, __m128 __B){ + // CHECK-LABEL: @test_mm_mask_fmadd_round_ss + // CHECK: @llvm.x86.avx512.mask.vfmadd.ss + return _mm_mask_fmadd_round_ss(__W, __U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m128 test_mm_maskz_fmadd_ss(__mmask8 __U, __m128 __A, __m128 __B, __m128 __C){ + // CHECK-LABEL: @test_mm_maskz_fmadd_ss + // CHECK: @llvm.x86.avx512.maskz.vfmadd.ss + return _mm_maskz_fmadd_ss(__U, __A, __B, __C); +} + +__m128 test_mm_maskz_fmadd_round_ss(__mmask8 __U, __m128 __A, __m128 __B, __m128 __C){ + // CHECK-LABEL: @test_mm_maskz_fmadd_round_ss + // CHECK: @llvm.x86.avx512.maskz.vfmadd.ss + return _mm_maskz_fmadd_round_ss(__U, __A, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__m128 test_mm_mask3_fmadd_ss(__m128 __W, __m128 __X, __m128 __Y, __mmask8 __U){ + // CHECK-LABEL: @test_mm_mask3_fmadd_ss + // CHECK: @llvm.x86.avx512.mask3.vfmadd.ss + return _mm_mask3_fmadd_ss(__W, __X, __Y, __U); +} + +__m128 test_mm_mask3_fmadd_round_ss(__m128 __W, __m128 __X, __m128 __Y, __mmask8 __U){ + // CHECK-LABEL: @test_mm_mask3_fmadd_round_ss + // CHECK: @llvm.x86.avx512.mask3.vfmadd.ss + return _mm_mask3_fmadd_round_ss(__W, __X, __Y, __U, _MM_FROUND_CUR_DIRECTION); +} + +__m128 test_mm_mask_fmsub_ss(__m128 __W, __mmask8 __U, __m128 __A, __m128 __B){ + // CHECK-LABEL: @test_mm_mask_fmsub_ss + // CHECK: @llvm.x86.avx512.mask.vfmadd.ss + return _mm_mask_fmsub_ss(__W, __U, __A, __B); +} + +__m128 test_mm_mask_fmsub_round_ss(__m128 __W, __mmask8 __U, __m128 __A, __m128 __B){ + // CHECK-LABEL: @test_mm_mask_fmsub_round_ss + // CHECK: @llvm.x86.avx512.mask.vfmadd.ss + return _mm_mask_fmsub_round_ss(__W, __U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m128 test_mm_maskz_fmsub_ss(__mmask8 __U, __m128 __A, __m128 __B, __m128 __C){ + // CHECK-LABEL: @test_mm_maskz_fmsub_ss + // CHECK: @llvm.x86.avx512.maskz.vfmadd.ss + return _mm_maskz_fmsub_ss(__U, __A, __B, __C); +} + +__m128 test_mm_maskz_fmsub_round_ss(__mmask8 __U, __m128 __A, __m128 __B, __m128 __C){ + // CHECK-LABEL: @test_mm_maskz_fmsub_round_ss + // CHECK: @llvm.x86.avx512.maskz.vfmadd.ss + return _mm_maskz_fmsub_round_ss(__U, __A, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__m128 test_mm_mask3_fmsub_ss(__m128 __W, __m128 __X, __m128 __Y, __mmask8 __U){ + // CHECK-LABEL: @test_mm_mask3_fmsub_ss + // CHECK: @llvm.x86.avx512.mask3.vfmadd.ss + return _mm_mask3_fmsub_ss(__W, __X, __Y, __U); +} + +__m128 test_mm_mask3_fmsub_round_ss(__m128 __W, __m128 __X, __m128 __Y, __mmask8 __U){ + // CHECK-LABEL: @test_mm_mask3_fmsub_round_ss + // CHECK: @llvm.x86.avx512.mask3.vfmadd.ss + return _mm_mask3_fmsub_round_ss(__W, __X, __Y, __U, _MM_FROUND_CUR_DIRECTION); +} + +__m128 test_mm_mask_fnmadd_ss(__m128 __W, __mmask8 __U, __m128 __A, __m128 __B){ + // CHECK-LABEL: @test_mm_mask_fnmadd_ss + // CHECK: @llvm.x86.avx512.mask.vfmadd.ss + return _mm_mask_fnmadd_ss(__W, __U, __A, __B); +} + +__m128 test_mm_mask_fnmadd_round_ss(__m128 __W, __mmask8 __U, __m128 __A, __m128 __B){ + // CHECK-LABEL: @test_mm_mask_fnmadd_round_ss + // CHECK: @llvm.x86.avx512.mask.vfmadd.ss + return _mm_mask_fnmadd_round_ss(__W, __U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m128 test_mm_maskz_fnmadd_ss(__mmask8 __U, __m128 __A, __m128 __B, __m128 __C){ + // CHECK-LABEL: @test_mm_maskz_fnmadd_ss + // CHECK: @llvm.x86.avx512.maskz.vfmadd.ss + return _mm_maskz_fnmadd_ss(__U, __A, __B, __C); +} + +__m128 test_mm_maskz_fnmadd_round_ss(__mmask8 __U, __m128 __A, __m128 __B, __m128 __C){ + // CHECK-LABEL: @test_mm_maskz_fnmadd_round_ss + // CHECK: @llvm.x86.avx512.maskz.vfmadd.ss + return _mm_maskz_fnmadd_round_ss(__U, __A, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__m128 test_mm_mask3_fnmadd_ss(__m128 __W, __m128 __X, __m128 __Y, __mmask8 __U){ + // CHECK-LABEL: @test_mm_mask3_fnmadd_ss + // CHECK: @llvm.x86.avx512.mask3.vfmadd.ss + return _mm_mask3_fnmadd_ss(__W, __X, __Y, __U); +} + +__m128 test_mm_mask3_fnmadd_round_ss(__m128 __W, __m128 __X, __m128 __Y, __mmask8 __U){ + // CHECK-LABEL: @test_mm_mask3_fnmadd_round_ss + // CHECK: @llvm.x86.avx512.mask3.vfmadd.ss + return _mm_mask3_fnmadd_round_ss(__W, __X, __Y, __U, _MM_FROUND_CUR_DIRECTION); +} + +__m128 test_mm_mask_fnmsub_ss(__m128 __W, __mmask8 __U, __m128 __A, __m128 __B){ + // CHECK-LABEL: @test_mm_mask_fnmsub_ss + // CHECK: @llvm.x86.avx512.mask.vfmadd.ss + return _mm_mask_fnmsub_ss(__W, __U, __A, __B); +} + +__m128 test_mm_mask_fnmsub_round_ss(__m128 __W, __mmask8 __U, __m128 __A, __m128 __B){ + // CHECK-LABEL: @test_mm_mask_fnmsub_round_ss + // CHECK: @llvm.x86.avx512.mask.vfmadd.ss + return _mm_mask_fnmsub_round_ss(__W, __U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m128 test_mm_maskz_fnmsub_ss(__mmask8 __U, __m128 __A, __m128 __B, __m128 __C){ + // CHECK-LABEL: @test_mm_maskz_fnmsub_ss + // CHECK: @llvm.x86.avx512.maskz.vfmadd.ss + return _mm_maskz_fnmsub_ss(__U, __A, __B, __C); +} + +__m128 test_mm_maskz_fnmsub_round_ss(__mmask8 __U, __m128 __A, __m128 __B, __m128 __C){ + // CHECK-LABEL: @test_mm_maskz_fnmsub_round_ss + // CHECK: @llvm.x86.avx512.maskz.vfmadd.ss + return _mm_maskz_fnmsub_round_ss(__U, __A, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__m128 test_mm_mask3_fnmsub_ss(__m128 __W, __m128 __X, __m128 __Y, __mmask8 __U){ + // CHECK-LABEL: @test_mm_mask3_fnmsub_ss + // CHECK: @llvm.x86.avx512.mask3.vfmadd.ss + return _mm_mask3_fnmsub_ss(__W, __X, __Y, __U); +} + +__m128 test_mm_mask3_fnmsub_round_ss(__m128 __W, __m128 __X, __m128 __Y, __mmask8 __U){ + // CHECK-LABEL: @test_mm_mask3_fnmsub_round_ss + // CHECK: @llvm.x86.avx512.mask3.vfmadd.ss + return _mm_mask3_fnmsub_round_ss(__W, __X, __Y, __U, _MM_FROUND_CUR_DIRECTION); +} +__m128d test_mm_mask_fmadd_sd(__m128d __W, __mmask8 __U, __m128d __A, __m128d __B){ + // CHECK-LABEL: @test_mm_mask_fmadd_sd + // CHECK: @llvm.x86.avx512.mask.vfmadd.sd + return _mm_mask_fmadd_sd(__W, __U, __A, __B); +} + +__m128d test_mm_mask_fmadd_round_sd(__m128d __W, __mmask8 __U, __m128d __A, __m128d __B){ + // CHECK-LABEL: @test_mm_mask_fmadd_round_sd + // CHECK: @llvm.x86.avx512.mask.vfmadd.sd + return _mm_mask_fmadd_round_sd(__W, __U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m128d test_mm_maskz_fmadd_sd(__mmask8 __U, __m128d __A, __m128d __B, __m128d __C){ + // CHECK-LABEL: @test_mm_maskz_fmadd_sd + // CHECK: @llvm.x86.avx512.maskz.vfmadd.sd + return _mm_maskz_fmadd_sd(__U, __A, __B, __C); +} + +__m128d test_mm_maskz_fmadd_round_sd(__mmask8 __U, __m128d __A, __m128d __B, __m128d __C){ + // CHECK-LABEL: @test_mm_maskz_fmadd_round_sd + // CHECK: @llvm.x86.avx512.maskz.vfmadd.sd + return _mm_maskz_fmadd_round_sd(__U, __A, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__m128d test_mm_mask3_fmadd_sd(__m128d __W, __m128d __X, __m128d __Y, __mmask8 __U){ + // CHECK-LABEL: @test_mm_mask3_fmadd_sd + // CHECK: @llvm.x86.avx512.mask3.vfmadd.sd + return _mm_mask3_fmadd_sd(__W, __X, __Y, __U); +} + +__m128d test_mm_mask3_fmadd_round_sd(__m128d __W, __m128d __X, __m128d __Y, __mmask8 __U){ + // CHECK-LABEL: @test_mm_mask3_fmadd_round_sd + // CHECK: @llvm.x86.avx512.mask3.vfmadd.sd + return _mm_mask3_fmadd_round_sd(__W, __X, __Y, __U, _MM_FROUND_CUR_DIRECTION); +} + +__m128d test_mm_mask_fmsub_sd(__m128d __W, __mmask8 __U, __m128d __A, __m128d __B){ + // CHECK-LABEL: @test_mm_mask_fmsub_sd + // CHECK: @llvm.x86.avx512.mask.vfmadd.sd + return _mm_mask_fmsub_sd(__W, __U, __A, __B); +} + +__m128d test_mm_mask_fmsub_round_sd(__m128d __W, __mmask8 __U, __m128d __A, __m128d __B){ + // CHECK-LABEL: @test_mm_mask_fmsub_round_sd + // CHECK: @llvm.x86.avx512.mask.vfmadd.sd + return _mm_mask_fmsub_round_sd(__W, __U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m128d test_mm_maskz_fmsub_sd(__mmask8 __U, __m128d __A, __m128d __B, __m128d __C){ + // CHECK-LABEL: @test_mm_maskz_fmsub_sd + // CHECK: @llvm.x86.avx512.maskz.vfmadd.sd + return _mm_maskz_fmsub_sd(__U, __A, __B, __C); +} + +__m128d test_mm_maskz_fmsub_round_sd(__mmask8 __U, __m128d __A, __m128d __B, __m128d __C){ + // CHECK-LABEL: @test_mm_maskz_fmsub_round_sd + // CHECK: @llvm.x86.avx512.maskz.vfmadd.sd + return _mm_maskz_fmsub_round_sd(__U, __A, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__m128d test_mm_mask3_fmsub_sd(__m128d __W, __m128d __X, __m128d __Y, __mmask8 __U){ + // CHECK-LABEL: @test_mm_mask3_fmsub_sd + // CHECK: @llvm.x86.avx512.mask3.vfmadd.sd + return _mm_mask3_fmsub_sd(__W, __X, __Y, __U); +} + +__m128d test_mm_mask3_fmsub_round_sd(__m128d __W, __m128d __X, __m128d __Y, __mmask8 __U){ + // CHECK-LABEL: @test_mm_mask3_fmsub_round_sd + // CHECK: @llvm.x86.avx512.mask3.vfmadd.sd + return _mm_mask3_fmsub_round_sd(__W, __X, __Y, __U, _MM_FROUND_CUR_DIRECTION); +} + +__m128d test_mm_mask_fnmadd_sd(__m128d __W, __mmask8 __U, __m128d __A, __m128d __B){ + // CHECK-LABEL: @test_mm_mask_fnmadd_sd + // CHECK: @llvm.x86.avx512.mask.vfmadd.sd + return _mm_mask_fnmadd_sd(__W, __U, __A, __B); +} + +__m128d test_mm_mask_fnmadd_round_sd(__m128d __W, __mmask8 __U, __m128d __A, __m128d __B){ + // CHECK-LABEL: @test_mm_mask_fnmadd_round_sd + // CHECK: @llvm.x86.avx512.mask.vfmadd.sd + return _mm_mask_fnmadd_round_sd(__W, __U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m128d test_mm_maskz_fnmadd_sd(__mmask8 __U, __m128d __A, __m128d __B, __m128d __C){ + // CHECK-LABEL: @test_mm_maskz_fnmadd_sd + // CHECK: @llvm.x86.avx512.maskz.vfmadd.sd + return _mm_maskz_fnmadd_sd(__U, __A, __B, __C); +} + +__m128d test_mm_maskz_fnmadd_round_sd(__mmask8 __U, __m128d __A, __m128d __B, __m128d __C){ + // CHECK-LABEL: @test_mm_maskz_fnmadd_round_sd + // CHECK: @llvm.x86.avx512.maskz.vfmadd.sd + return _mm_maskz_fnmadd_round_sd(__U, __A, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__m128d test_mm_mask3_fnmadd_sd(__m128d __W, __m128d __X, __m128d __Y, __mmask8 __U){ + // CHECK-LABEL: @test_mm_mask3_fnmadd_sd + // CHECK: @llvm.x86.avx512.mask3.vfmadd.sd + return _mm_mask3_fnmadd_sd(__W, __X, __Y, __U); +} + +__m128d test_mm_mask3_fnmadd_round_sd(__m128d __W, __m128d __X, __m128d __Y, __mmask8 __U){ + // CHECK-LABEL: @test_mm_mask3_fnmadd_round_sd + // CHECK: @llvm.x86.avx512.mask3.vfmadd.sd + return _mm_mask3_fnmadd_round_sd(__W, __X, __Y, __U, _MM_FROUND_CUR_DIRECTION); +} + +__m128d test_mm_mask_fnmsub_sd(__m128d __W, __mmask8 __U, __m128d __A, __m128d __B){ + // CHECK-LABEL: @test_mm_mask_fnmsub_sd + // CHECK: @llvm.x86.avx512.mask.vfmadd.sd + return _mm_mask_fnmsub_sd(__W, __U, __A, __B); +} + +__m128d test_mm_mask_fnmsub_round_sd(__m128d __W, __mmask8 __U, __m128d __A, __m128d __B){ + // CHECK-LABEL: @test_mm_mask_fnmsub_round_sd + // CHECK: @llvm.x86.avx512.mask.vfmadd.sd + return _mm_mask_fnmsub_round_sd(__W, __U, __A, __B, _MM_FROUND_CUR_DIRECTION); +} + +__m128d test_mm_maskz_fnmsub_sd(__mmask8 __U, __m128d __A, __m128d __B, __m128d __C){ + // CHECK-LABEL: @test_mm_maskz_fnmsub_sd + // CHECK: @llvm.x86.avx512.maskz.vfmadd.sd + return _mm_maskz_fnmsub_sd(__U, __A, __B, __C); +} + +__m128d test_mm_maskz_fnmsub_round_sd(__mmask8 __U, __m128d __A, __m128d __B, __m128d __C){ + // CHECK-LABEL: @test_mm_maskz_fnmsub_round_sd + // CHECK: @llvm.x86.avx512.maskz.vfmadd.sd + return _mm_maskz_fnmsub_round_sd(__U, __A, __B, __C, _MM_FROUND_CUR_DIRECTION); +} + +__m128d test_mm_mask3_fnmsub_sd(__m128d __W, __m128d __X, __m128d __Y, __mmask8 __U){ + // CHECK-LABEL: @test_mm_mask3_fnmsub_sd + // CHECK: @llvm.x86.avx512.mask3.vfmadd.sd + return _mm_mask3_fnmsub_sd(__W, __X, __Y, __U); +} + +__m128d test_mm_mask3_fnmsub_round_sd(__m128d __W, __m128d __X, __m128d __Y, __mmask8 __U){ + // CHECK-LABEL: @test_mm_mask3_fnmsub_round_sd + // CHECK: @llvm.x86.avx512.mask3.vfmadd.sd + return _mm_mask3_fnmsub_round_sd(__W, __X, __Y, __U, _MM_FROUND_CUR_DIRECTION); +}