__m256i __a = (a); \
(__m256i)__builtin_ia32_pslldqi256(__a, (count)*8); })
+#define _mm256_bslli_epi128(a, count) _mm256_slli_si256((a), (count))
+
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
_mm256_slli_epi16(__m256i __a, int __count)
{
__m256i __a = (a); \
(__m256i)__builtin_ia32_psrldqi256(__a, (count)*8); })
+#define _mm256_bsrli_epi128(a, count) _mm256_srli_si256((a), (count))
+
static __inline__ __m256i __attribute__((__always_inline__, __nodebug__))
_mm256_srli_epi16(__m256i __a, int __count)
{
return _mm256_slli_si256(a, 3);
}
+__m256i test_mm256_bslli_epi128(__m256i a) {
+ // CHECK: shufflevector <32 x i8> zeroinitializer, <32 x i8> %{{.*}}, <32 x i32> <i32 13, i32 14, i32 15, i32 32, i32 33, i32 34, i32 35, i32 36, i32 37, i32 38, i32 39, i32 40, i32 41, i32 42, i32 43, i32 44, i32 29, i32 30, i32 31, i32 48, i32 49, i32 50, i32 51, i32 52, i32 53, i32 54, i32 55, i32 56, i32 57, i32 58, i32 59, i32 60>
+ return _mm256_bslli_epi128(a, 3);
+}
+
__m256i test_mm256_slli_epi16(__m256i a) {
// CHECK: @llvm.x86.avx2.pslli.w
return _mm256_slli_epi16(a, 3);
return _mm256_srli_si256(a, 3);
}
+__m256i test_mm256_bsrli_epi128(__m256i a) {
+ // CHECK: shufflevector <32 x i8> %{{.*}}, <32 x i8> zeroinitializer, <32 x i32> <i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 32, i32 33, i32 34, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 48, i32 49, i32 50>
+ return _mm256_bsrli_epi128(a, 3);
+}
+
__m256i test_mm256_srli_epi16(__m256i a) {
// CHECK: @llvm.x86.avx2.psrli.w
return _mm256_srli_epi16(a, 3);