r267135 - [clang][AVX512][Builtin] adding intrinsics for vf{n}madd{ss|sd} and vf{n}sub{ss|sd} instruction set
Michael Zuckerman via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 22 03:56:25 PDT 2016
Author: mzuckerm
Date: Fri Apr 22 05:56:24 2016
New Revision: 267135
URL: http://llvm.org/viewvc/llvm-project?rev=267135&view=rev
Log:
[clang][AVX512][Builtin] adding intrinsics for vf{n}madd{ss|sd} and vf{n}sub{ss|sd} instruction set
Differential Revision: http://reviews.llvm.org/D19320
Modified:
cfe/trunk/include/clang/Basic/BuiltinsX86.def
cfe/trunk/lib/Headers/avx512fintrin.h
cfe/trunk/test/CodeGen/avx512f-builtins.c
Modified: cfe/trunk/include/clang/Basic/BuiltinsX86.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/BuiltinsX86.def?rev=267135&r1=267134&r2=267135&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/BuiltinsX86.def (original)
+++ cfe/trunk/include/clang/Basic/BuiltinsX86.def Fri Apr 22 05:56:24 2016
@@ -2145,6 +2145,12 @@ TARGET_BUILTIN(__builtin_ia32_getmantpd5
TARGET_BUILTIN(__builtin_ia32_getmantps512_mask, "V16fV16fiV16fUsIi","","avx512f")
TARGET_BUILTIN(__builtin_ia32_getexppd512_mask, "V8dV8dV8dUcIi","","avx512f")
TARGET_BUILTIN(__builtin_ia32_getexpps512_mask, "V16fV16fV16fUsIi","","avx512f")
+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
Modified: cfe/trunk/lib/Headers/avx512fintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avx512fintrin.h?rev=267135&r1=267134&r2=267135&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avx512fintrin.h (original)
+++ cfe/trunk/lib/Headers/avx512fintrin.h Fri Apr 22 05:56:24 2016
@@ -6617,6 +6617,437 @@ __builtin_ia32_gathersiv8di ((__v8di) __
__addr, (__v8si) __index, __mask , __scale);\
})
+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
Modified: cfe/trunk/test/CodeGen/avx512f-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx512f-builtins.c?rev=267135&r1=267134&r2=267135&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/avx512f-builtins.c (original)
+++ cfe/trunk/test/CodeGen/avx512f-builtins.c Fri Apr 22 05:56:24 2016
@@ -4514,3 +4514,290 @@ __m128 test_mm_maskz_getmant_round_ss(__
return _mm_maskz_getmant_round_ss(__U, __A, __B, 1, 2, _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);
+}
More information about the cfe-commits
mailing list