[PATCH] D75897: [X86] Support intrinsic _mm_broadcastsi128_si256
Kan Shengchen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 11 20:21:46 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG214d24e1f8e0: [X86] Support intrinsic _mm_broadcastsi128_si256 (authored by skan).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75897/new/
https://reviews.llvm.org/D75897
Files:
clang/lib/Headers/avx2intrin.h
clang/test/CodeGen/avx2-builtins.c
Index: clang/test/CodeGen/avx2-builtins.c
===================================================================
--- clang/test/CodeGen/avx2-builtins.c
+++ clang/test/CodeGen/avx2-builtins.c
@@ -208,6 +208,12 @@
return _mm256_broadcastsi128_si256(a);
}
+__m256i test_mm_broadcastsi128_si256(__m128i a) {
+ // CHECK-LABEL: test_mm_broadcastsi128_si256
+ // CHECK: shufflevector <2 x i64> %{{.*}}, <2 x i64> %{{.*}}, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
+ return _mm_broadcastsi128_si256(a);
+}
+
__m128 test_mm_broadcastss_ps(__m128 a) {
// CHECK-LABEL: test_mm_broadcastss_ps
// CHECK-NOT: @llvm.x86.avx2.vbroadcast.ss.ps
Index: clang/lib/Headers/avx2intrin.h
===================================================================
--- clang/lib/Headers/avx2intrin.h
+++ clang/lib/Headers/avx2intrin.h
@@ -740,6 +740,8 @@
return (__m256i)__builtin_shufflevector((__v2di)__X, (__v2di)__X, 0, 1, 0, 1);
}
+#define _mm_broadcastsi128_si256(X) _mm256_broadcastsi128_si256(X)
+
#define _mm_blend_epi32(V1, V2, M) \
(__m128i)__builtin_ia32_pblendd128((__v4si)(__m128i)(V1), \
(__v4si)(__m128i)(V2), (int)(M))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75897.249819.patch
Type: text/x-patch
Size: 1162 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200312/f62ff0a7/attachment.bin>
More information about the llvm-commits
mailing list