TARGET_BUILTIN(__builtin_ia32_prorvd256_mask, "V8iV8iV8iV8iUc","","avx512vl")
TARGET_BUILTIN(__builtin_ia32_prorvq128_mask, "V2LLiV2LLiV2LLiV2LLiUc","","avx512vl")
TARGET_BUILTIN(__builtin_ia32_prorvq256_mask, "V4LLiV4LLiV4LLiV4LLiUc","","avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pshufhw512_mask, "V32sV32sIiV32sUi","","avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pshuflw512_mask, "V32sV32sIiV32sUi","","avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pshufhw128_mask, "V8sV8sIiV8sUc","","avx512bw,avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pshufhw256_mask, "V16sV16sIiV16sUs","","avx512bw,avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pshuflw128_mask, "V8sV8sIiV8sUc","","avx512bw,avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pshuflw256_mask, "V16sV16sIiV16sUs","","avx512bw,avx512vl")
#undef BUILTIN
#undef TARGET_BUILTIN
(__v32hi)(__m512i)(b), \
(p), (__mmask32)(m)); })
+#define _mm512_shufflehi_epi16( __A, __imm) __extension__ ({ \
+__builtin_ia32_pshufhw512_mask ((__v32hi)( __A),\
+ ( __imm),\
+ (__v32hi)\
+ _mm512_setzero_hi (),\
+ (__mmask32) -1);\
+})
+
+#define _mm512_mask_shufflehi_epi16( __W, __U, __A ,__imm) __extension__ ({ \
+__builtin_ia32_pshufhw512_mask ((__v32hi) (__A),\
+ (__imm),\
+ (__v32hi)( __W),\
+ (__mmask32)( __U));\
+})
+
+
+#define _mm512_maskz_shufflehi_epi16( __U, __A ,__imm) __extension__ ({ \
+__builtin_ia32_pshufhw512_mask ((__v32hi) (__A),\
+ (__imm),\
+ (__v32hi)\
+ _mm512_setzero_hi (),\
+ (__mmask32)( __U));\
+})
+
+#define _mm512_shufflelo_epi16( __A, __imm) __extension__ ({ \
+__builtin_ia32_pshuflw512_mask ((__v32hi)( __A),\
+ ( __imm),\
+ (__v32hi)\
+ _mm512_setzero_hi (),\
+ (__mmask32) -1);\
+})
+
+
+#define _mm512_mask_shufflelo_epi16( __W, __U, __A, __imm) __extension__ ({ \
+__builtin_ia32_pshuflw512_mask ((__v32hi) (__A),\
+ (__imm),\
+ (__v32hi)( __W),\
+ (__mmask32)( __U));\
+})
+
+
+#define _mm512_maskz_shufflelo_epi16( __U, __A, __imm) __extension__ ({ \
+__builtin_ia32_pshuflw512_mask ((__v32hi) (__A),\
+ (__imm),\
+ (__v32hi)\
+ _mm512_setzero_hi (),\
+ (__mmask32)( __U));\
+})
#undef __DEFAULT_FN_ATTRS
/* 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
(__v16hi)(__m256i)(b), \
(p), (__mmask16)(m)); })
+#define _mm_mask_shufflehi_epi16( __W, __U, __A, __imm) __extension__ ({ \
+__builtin_ia32_pshufhw128_mask ((__v8hi) __A, (__imm),\
+ (__v8hi)( __W),\
+ (__mmask8)( __U));\
+})
+
+#define _mm_maskz_shufflehi_epi16( __U, __A, __imm) __extension__ ({ \
+__builtin_ia32_pshufhw128_mask ((__v8hi)( __A),( __imm),\
+ (__v8hi)\
+ _mm_setzero_hi (),\
+ (__mmask8)( __U));\
+})
+
+
+#define _mm256_mask_shufflehi_epi16( __W, __U, __A, __imm) __extension__ ({ \
+__builtin_ia32_pshufhw256_mask ((__v16hi) (__A),\
+ (__imm),\
+ (__v16hi)( __W),\
+ (__mmask16)( __U));\
+})
+
+
+#define _mm256_maskz_shufflehi_epi16( __U, __A, __imm) __extension__ ({ \
+__builtin_ia32_pshufhw256_mask ((__v16hi) (__A),\
+ (__imm),\
+ (__v16hi)\
+ _mm256_setzero_si256 (),\
+ (__mmask16)( __U));\
+})
+
+
+#define _mm_mask_shufflelo_epi16( __W, __U, __A, __imm) __extension__ ({ \
+__builtin_ia32_pshuflw128_mask ((__v8hi) __A, (__imm),\
+ (__v8hi)( __W),\
+ (__mmask8)( __U));\
+})
+
+#define _mm_maskz_shufflelo_epi16( __U, __A, __imm) __extension__ ({ \
+__builtin_ia32_pshuflw128_mask ((__v8hi)( __A),( __imm),\
+ (__v8hi)\
+ _mm_setzero_hi (),\
+ (__mmask8)( __U));\
+})
+
+
+#define _mm256_mask_shufflelo_epi16( __W, __U, __A, __imm) __extension__ ({ \
+__builtin_ia32_pshuflw256_mask ((__v16hi) (__A),\
+ (__imm),\
+ (__v16hi)( __W),\
+ (__mmask16)( __U));\
+})
+
+
+#define _mm256_maskz_shufflelo_epi16( __U, __A, __imm) __extension__ ({ \
+__builtin_ia32_pshuflw256_mask ((__v16hi) (__A),\
+ (__imm),\
+ (__v16hi)\
+ _mm256_setzero_si256 (),\
+ (__mmask16)( __U));\
+})
+
#undef __DEFAULT_FN_ATTRS
#endif /* __AVX512VLBWINTRIN_H */
// CHECK: @llvm.x86.avx512.mask.pmovzxb.w.512
return _mm512_maskz_cvtepu8_epi16(__U, __A);
}
+
+__m512i test_mm512_shufflehi_epi16(__m512i __A) {
+ // CHECK-LABEL: @test_mm512_shufflehi_epi16
+ // CHECK: @llvm.x86.avx512.mask.pshufh.w.512
+ return _mm512_shufflehi_epi16(__A, 5);
+}
+
+__m512i test_mm512_mask_shufflehi_epi16(__m512i __W, __mmask32 __U, __m512i __A) {
+ // CHECK-LABEL: @test_mm512_mask_shufflehi_epi16
+ // CHECK: @llvm.x86.avx512.mask.pshufh.w.512
+ return _mm512_mask_shufflehi_epi16(__W, __U, __A, 5);
+}
+
+__m512i test_mm512_maskz_shufflehi_epi16(__mmask32 __U, __m512i __A) {
+ // CHECK-LABEL: @test_mm512_maskz_shufflehi_epi16
+ // CHECK: @llvm.x86.avx512.mask.pshufh.w.512
+ return _mm512_maskz_shufflehi_epi16(__U, __A, 5);
+}
+
+__m512i test_mm512_shufflelo_epi16(__m512i __A) {
+ // CHECK-LABEL: @test_mm512_shufflelo_epi16
+ // CHECK: @llvm.x86.avx512.mask.pshufl.w.512
+ return _mm512_shufflelo_epi16(__A, 5);
+}
+
+__m512i test_mm512_mask_shufflelo_epi16(__m512i __W, __mmask32 __U, __m512i __A) {
+ // CHECK-LABEL: @test_mm512_mask_shufflelo_epi16
+ // CHECK: @llvm.x86.avx512.mask.pshufl.w.512
+ return _mm512_mask_shufflelo_epi16(__W, __U, __A, 5);
+}
+
+__m512i test_mm512_maskz_shufflelo_epi16(__mmask32 __U, __m512i __A) {
+ // CHECK-LABEL: @test_mm512_maskz_shufflelo_epi16
+ // CHECK: @llvm.x86.avx512.mask.pshufl.w.512
+ return _mm512_maskz_shufflelo_epi16(__U, __A, 5);
+}
+
+