diff options
author | Adam Nemet <anemet@apple.com> | 2015-01-19 20:12:05 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2015-01-19 20:12:05 +0000 |
commit | f893edeaea990011df26afa0313d4dc16983e2df (patch) | |
tree | a51f9c8a71ad81a9e721b8607ed8415906ac2732 /clang/lib/Headers/avx512fintrin.h | |
parent | 290c07e7a87028a85ebe34157fbb639a0a05c4c6 (diff) | |
download | bcm5719-llvm-f893edeaea990011df26afa0313d4dc16983e2df.tar.gz bcm5719-llvm-f893edeaea990011df26afa0313d4dc16983e2df.zip |
[AVX512] Add sub-vector FP extracts
Analogous to AVX2, these need to be implemented as macros to properly
propagate the immediate index operand.
Part of <rdar://problem/17688758>
llvm-svn: 226496
Diffstat (limited to 'clang/lib/Headers/avx512fintrin.h')
-rw-r--r-- | clang/lib/Headers/avx512fintrin.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/lib/Headers/avx512fintrin.h b/clang/lib/Headers/avx512fintrin.h index e6f128d3ad7..eda1b5c8c85 100644 --- a/clang/lib/Headers/avx512fintrin.h +++ b/clang/lib/Headers/avx512fintrin.h @@ -633,6 +633,24 @@ _mm512_valign_epi32(__m512i __A, __m512i __B, const int __I) (__mmask16) -1); } +/* Vector Extract */ + +#define _mm512_extractf64x4_pd(A, I) __extension__ ({ \ + __m512d __A = (A); \ + (__m256d) \ + __builtin_ia32_extractf64x4_mask((__v8df)__A, \ + (I), \ + (__v4df)_mm256_setzero_si256(), \ + (__mmask8) -1); }) + +#define _mm512_extractf32x4_ps(A, I) __extension__ ({ \ + __m512 __A = (A); \ + (__m128) \ + __builtin_ia32_extractf32x4_mask((__v16sf)__A, \ + (I), \ + (__v4sf)_mm_setzero_ps(), \ + (__mmask8) -1); }) + /* Vector Blend */ static __inline __m512d __attribute__ ((__always_inline__, __nodebug__)) |