summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2014-08-13 00:29:01 +0000
committerAdam Nemet <anemet@apple.com>2014-08-13 00:29:01 +0000
commit4abc07cb752523503cfefc13f122bedbd346b633 (patch)
tree6398300bdf8b4fac048c44f0e12f803ebdea890c /clang/lib
parentde443c500203d262c87a27e3f9272b520ff15d9f (diff)
downloadbcm5719-llvm-4abc07cb752523503cfefc13f122bedbd346b633.tar.gz
bcm5719-llvm-4abc07cb752523503cfefc13f122bedbd346b633.zip
[AVX512] Add intrinsics for FP scalar broadcasts
Similar approach to the set1 intrinsics is used: implement in terms of vector initializers and then ensure with an LLVM test that a broadcast is generated at the end. Part of <rdar://problem/17688758> llvm-svn: 215486
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Headers/avx512fintrin.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/lib/Headers/avx512fintrin.h b/clang/lib/Headers/avx512fintrin.h
index ad92fe7b64b..1b558a0404a 100644
--- a/clang/lib/Headers/avx512fintrin.h
+++ b/clang/lib/Headers/avx512fintrin.h
@@ -117,6 +117,24 @@ _mm512_set1_epi64(long long __d)
return (__m512i)(__v8di){ __d, __d, __d, __d, __d, __d, __d, __d };
}
+static __inline__ __m512 __attribute__((__always_inline__, __nodebug__))
+_mm512_broadcastss_ps(__m128 __X)
+{
+ float __f = __X[0];
+ return (__v16sf){ __f, __f, __f, __f,
+ __f, __f, __f, __f,
+ __f, __f, __f, __f,
+ __f, __f, __f, __f };
+}
+
+static __inline__ __m512d __attribute__((__always_inline__, __nodebug__))
+_mm512_broadcastsd_pd(__m128d __X)
+{
+ double __d = __X[0];
+ return (__v8df){ __d, __d, __d, __d,
+ __d, __d, __d, __d };
+}
+
/* Cast between vector types */
static __inline __m512d __attribute__((__always_inline__, __nodebug__))
OpenPOWER on IntegriCloud