123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748 |
- /*===------------- avx512vlvbmi2intrin.h - VBMI2 intrinsics -----------------===
- *
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- *
- *===-----------------------------------------------------------------------===
- */
- #ifndef __IMMINTRIN_H
- #error "Never use <avx512vlvbmi2intrin.h> directly; include <immintrin.h> instead."
- #endif
- #ifndef __AVX512VLVBMI2INTRIN_H
- #define __AVX512VLVBMI2INTRIN_H
- /* Define the default attributes for the functions in this file. */
- #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512vl,avx512vbmi2")))
- static __inline __m128i __DEFAULT_FN_ATTRS
- _mm128_setzero_hi(void) {
- return (__m128i)(__v8hi){ 0, 0, 0, 0, 0, 0, 0, 0 };
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_mask_compress_epi16(__m128i __S, __mmask8 __U, __m128i __D)
- {
- return (__m128i) __builtin_ia32_compresshi128_mask ((__v8hi) __D,
- (__v8hi) __S,
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_maskz_compress_epi16(__mmask8 __U, __m128i __D)
- {
- return (__m128i) __builtin_ia32_compresshi128_mask ((__v8hi) __D,
- (__v8hi) _mm128_setzero_hi(),
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_mask_compress_epi8(__m128i __S, __mmask16 __U, __m128i __D)
- {
- return (__m128i) __builtin_ia32_compressqi128_mask ((__v16qi) __D,
- (__v16qi) __S,
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_maskz_compress_epi8(__mmask16 __U, __m128i __D)
- {
- return (__m128i) __builtin_ia32_compressqi128_mask ((__v16qi) __D,
- (__v16qi) _mm128_setzero_hi(),
- __U);
- }
- static __inline__ void __DEFAULT_FN_ATTRS
- _mm128_mask_compressstoreu_epi16(void *__P, __mmask8 __U, __m128i __D)
- {
- __builtin_ia32_compressstorehi128_mask ((__v8hi *) __P, (__v8hi) __D,
- __U);
- }
- static __inline__ void __DEFAULT_FN_ATTRS
- _mm128_mask_compressstoreu_epi8(void *__P, __mmask16 __U, __m128i __D)
- {
- __builtin_ia32_compressstoreqi128_mask ((__v16qi *) __P, (__v16qi) __D,
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_mask_expand_epi16(__m128i __S, __mmask8 __U, __m128i __D)
- {
- return (__m128i) __builtin_ia32_expandhi128_mask ((__v8hi) __D,
- (__v8hi) __S,
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_maskz_expand_epi16(__mmask8 __U, __m128i __D)
- {
- return (__m128i) __builtin_ia32_expandhi128_mask ((__v8hi) __D,
- (__v8hi) _mm128_setzero_hi(),
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_mask_expand_epi8(__m128i __S, __mmask16 __U, __m128i __D)
- {
- return (__m128i) __builtin_ia32_expandqi128_mask ((__v16qi) __D,
- (__v16qi) __S,
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_maskz_expand_epi8(__mmask16 __U, __m128i __D)
- {
- return (__m128i) __builtin_ia32_expandqi128_mask ((__v16qi) __D,
- (__v16qi) _mm128_setzero_hi(),
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_mask_expandloadu_epi16(__m128i __S, __mmask8 __U, void const *__P)
- {
- return (__m128i) __builtin_ia32_expandloadhi128_mask ((const __v8hi *)__P,
- (__v8hi) __S,
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_maskz_expandloadu_epi16(__mmask8 __U, void const *__P)
- {
- return (__m128i) __builtin_ia32_expandloadhi128_mask ((const __v8hi *)__P,
- (__v8hi) _mm128_setzero_hi(),
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_mask_expandloadu_epi8(__m128i __S, __mmask16 __U, void const *__P)
- {
- return (__m128i) __builtin_ia32_expandloadqi128_mask ((const __v16qi *)__P,
- (__v16qi) __S,
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_maskz_expandloadu_epi8(__mmask16 __U, void const *__P)
- {
- return (__m128i) __builtin_ia32_expandloadqi128_mask ((const __v16qi *)__P,
- (__v16qi) _mm128_setzero_hi(),
- __U);
- }
- static __inline __m256i __DEFAULT_FN_ATTRS
- _mm256_setzero_hi(void) {
- return (__m256i)(__v16hi){ 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0 };
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_mask_compress_epi16(__m256i __S, __mmask16 __U, __m256i __D)
- {
- return (__m256i) __builtin_ia32_compresshi256_mask ((__v16hi) __D,
- (__v16hi) __S,
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_maskz_compress_epi16(__mmask16 __U, __m256i __D)
- {
- return (__m256i) __builtin_ia32_compresshi256_mask ((__v16hi) __D,
- (__v16hi) _mm256_setzero_hi(),
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_mask_compress_epi8(__m256i __S, __mmask32 __U, __m256i __D)
- {
- return (__m256i) __builtin_ia32_compressqi256_mask ((__v32qi) __D,
- (__v32qi) __S,
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_maskz_compress_epi8(__mmask32 __U, __m256i __D)
- {
- return (__m256i) __builtin_ia32_compressqi256_mask ((__v32qi) __D,
- (__v32qi) _mm256_setzero_hi(),
- __U);
- }
- static __inline__ void __DEFAULT_FN_ATTRS
- _mm256_mask_compressstoreu_epi16(void *__P, __mmask16 __U, __m256i __D)
- {
- __builtin_ia32_compressstorehi256_mask ((__v16hi *) __P, (__v16hi) __D,
- __U);
- }
- static __inline__ void __DEFAULT_FN_ATTRS
- _mm256_mask_compressstoreu_epi8(void *__P, __mmask32 __U, __m256i __D)
- {
- __builtin_ia32_compressstoreqi256_mask ((__v32qi *) __P, (__v32qi) __D,
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_mask_expand_epi16(__m256i __S, __mmask16 __U, __m256i __D)
- {
- return (__m256i) __builtin_ia32_expandhi256_mask ((__v16hi) __D,
- (__v16hi) __S,
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_maskz_expand_epi16(__mmask16 __U, __m256i __D)
- {
- return (__m256i) __builtin_ia32_expandhi256_mask ((__v16hi) __D,
- (__v16hi) _mm256_setzero_hi(),
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_mask_expand_epi8(__m256i __S, __mmask32 __U, __m256i __D)
- {
- return (__m256i) __builtin_ia32_expandqi256_mask ((__v32qi) __D,
- (__v32qi) __S,
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_maskz_expand_epi8(__mmask32 __U, __m256i __D)
- {
- return (__m256i) __builtin_ia32_expandqi256_mask ((__v32qi) __D,
- (__v32qi) _mm256_setzero_hi(),
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_mask_expandloadu_epi16(__m256i __S, __mmask16 __U, void const *__P)
- {
- return (__m256i) __builtin_ia32_expandloadhi256_mask ((const __v16hi *)__P,
- (__v16hi) __S,
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_maskz_expandloadu_epi16(__mmask16 __U, void const *__P)
- {
- return (__m256i) __builtin_ia32_expandloadhi256_mask ((const __v16hi *)__P,
- (__v16hi) _mm256_setzero_hi(),
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_mask_expandloadu_epi8(__m256i __S, __mmask32 __U, void const *__P)
- {
- return (__m256i) __builtin_ia32_expandloadqi256_mask ((const __v32qi *)__P,
- (__v32qi) __S,
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_maskz_expandloadu_epi8(__mmask32 __U, void const *__P)
- {
- return (__m256i) __builtin_ia32_expandloadqi256_mask ((const __v32qi *)__P,
- (__v32qi) _mm256_setzero_hi(),
- __U);
- }
- #define _mm256_mask_shldi_epi64(S, U, A, B, I) __extension__ ({ \
- (__m256i)__builtin_ia32_vpshldq256_mask((__v4di)(A), \
- (__v4di)(B), \
- (int)(I), \
- (__v4di)(S), \
- (__mmask8)(U)); })
- #define _mm256_maskz_shldi_epi64(U, A, B, I) \
- _mm256_mask_shldi_epi64(_mm256_setzero_hi(), (U), (A), (B), (I))
- #define _mm256_shldi_epi64(A, B, I) \
- _mm256_mask_shldi_epi64(_mm256_undefined_si256(), (__mmask8)(-1), (A), (B), (I))
- #define _mm128_mask_shldi_epi64(S, U, A, B, I) __extension__ ({ \
- (__m128i)__builtin_ia32_vpshldq128_mask((__v2di)(A), \
- (__v2di)(B), \
- (int)(I), \
- (__v2di)(S), \
- (__mmask8)(U)); })
- #define _mm128_maskz_shldi_epi64(U, A, B, I) \
- _mm128_mask_shldi_epi64(_mm128_setzero_hi(), (U), (A), (B), (I))
- #define _mm128_shldi_epi64(A, B, I) \
- _mm128_mask_shldi_epi64(_mm_undefined_si128(), (__mmask8)(-1), (A), (B), (I))
- #define _mm256_mask_shldi_epi32(S, U, A, B, I) __extension__ ({ \
- (__m256i)__builtin_ia32_vpshldd256_mask((__v8si)(A), \
- (__v8si)(B), \
- (int)(I), \
- (__v8si)(S), \
- (__mmask8)(U)); })
- #define _mm256_maskz_shldi_epi32(U, A, B, I) \
- _mm256_mask_shldi_epi32(_mm256_setzero_hi(), (U), (A), (B), (I))
- #define _mm256_shldi_epi32(A, B, I) \
- _mm256_mask_shldi_epi32(_mm256_undefined_si256(), (__mmask8)(-1), (A), (B), (I))
- #define _mm128_mask_shldi_epi32(S, U, A, B, I) __extension__ ({ \
- (__m128i)__builtin_ia32_vpshldd128_mask((__v4si)(A), \
- (__v4si)(B), \
- (int)(I), \
- (__v4si)(S), \
- (__mmask8)(U)); })
- #define _mm128_maskz_shldi_epi32(U, A, B, I) \
- _mm128_mask_shldi_epi32(_mm128_setzero_hi(), (U), (A), (B), (I))
- #define _mm128_shldi_epi32(A, B, I) \
- _mm128_mask_shldi_epi32(_mm_undefined_si128(), (__mmask8)(-1), (A), (B), (I))
- #define _mm256_mask_shldi_epi16(S, U, A, B, I) __extension__ ({ \
- (__m256i)__builtin_ia32_vpshldw256_mask((__v16hi)(A), \
- (__v16hi)(B), \
- (int)(I), \
- (__v16hi)(S), \
- (__mmask16)(U)); })
- #define _mm256_maskz_shldi_epi16(U, A, B, I) \
- _mm256_mask_shldi_epi16(_mm256_setzero_hi(), (U), (A), (B), (I))
- #define _mm256_shldi_epi16(A, B, I) \
- _mm256_mask_shldi_epi16(_mm256_undefined_si256(), (__mmask8)(-1), (A), (B), (I))
- #define _mm128_mask_shldi_epi16(S, U, A, B, I) __extension__ ({ \
- (__m128i)__builtin_ia32_vpshldw128_mask((__v8hi)(A), \
- (__v8hi)(B), \
- (int)(I), \
- (__v8hi)(S), \
- (__mmask8)(U)); })
- #define _mm128_maskz_shldi_epi16(U, A, B, I) \
- _mm128_mask_shldi_epi16(_mm128_setzero_hi(), (U), (A), (B), (I))
- #define _mm128_shldi_epi16(A, B, I) \
- _mm128_mask_shldi_epi16(_mm_undefined_si128(), (__mmask8)(-1), (A), (B), (I))
- #define _mm256_mask_shrdi_epi64(S, U, A, B, I) __extension__ ({ \
- (__m256i)__builtin_ia32_vpshrdq256_mask((__v4di)(A), \
- (__v4di)(B), \
- (int)(I), \
- (__v4di)(S), \
- (__mmask8)(U)); })
- #define _mm256_maskz_shrdi_epi64(U, A, B, I) \
- _mm256_mask_shrdi_epi64(_mm256_setzero_hi(), (U), (A), (B), (I))
- #define _mm256_shrdi_epi64(A, B, I) \
- _mm256_mask_shrdi_epi64(_mm256_undefined_si256(), (__mmask8)(-1), (A), (B), (I))
- #define _mm128_mask_shrdi_epi64(S, U, A, B, I) __extension__ ({ \
- (__m128i)__builtin_ia32_vpshrdq128_mask((__v2di)(A), \
- (__v2di)(B), \
- (int)(I), \
- (__v2di)(S), \
- (__mmask8)(U)); })
- #define _mm128_maskz_shrdi_epi64(U, A, B, I) \
- _mm128_mask_shrdi_epi64(_mm128_setzero_hi(), (U), (A), (B), (I))
- #define _mm128_shrdi_epi64(A, B, I) \
- _mm128_mask_shrdi_epi64(_mm_undefined_si128(), (__mmask8)(-1), (A), (B), (I))
- #define _mm256_mask_shrdi_epi32(S, U, A, B, I) __extension__ ({ \
- (__m256i)__builtin_ia32_vpshrdd256_mask((__v8si)(A), \
- (__v8si)(B), \
- (int)(I), \
- (__v8si)(S), \
- (__mmask8)(U)); })
- #define _mm256_maskz_shrdi_epi32(U, A, B, I) \
- _mm256_mask_shrdi_epi32(_mm256_setzero_hi(), (U), (A), (B), (I))
- #define _mm256_shrdi_epi32(A, B, I) \
- _mm256_mask_shrdi_epi32(_mm256_undefined_si256(), (__mmask8)(-1), (A), (B), (I))
- #define _mm128_mask_shrdi_epi32(S, U, A, B, I) __extension__ ({ \
- (__m128i)__builtin_ia32_vpshrdd128_mask((__v4si)(A), \
- (__v4si)(B), \
- (int)(I), \
- (__v4si)(S), \
- (__mmask8)(U)); })
- #define _mm128_maskz_shrdi_epi32(U, A, B, I) \
- _mm128_mask_shrdi_epi32(_mm128_setzero_hi(), (U), (A), (B), (I))
- #define _mm128_shrdi_epi32(A, B, I) \
- _mm128_mask_shrdi_epi32(_mm_undefined_si128(), (__mmask8)(-1), (A), (B), (I))
- #define _mm256_mask_shrdi_epi16(S, U, A, B, I) __extension__ ({ \
- (__m256i)__builtin_ia32_vpshrdw256_mask((__v16hi)(A), \
- (__v16hi)(B), \
- (int)(I), \
- (__v16hi)(S), \
- (__mmask16)(U)); })
- #define _mm256_maskz_shrdi_epi16(U, A, B, I) \
- _mm256_mask_shrdi_epi16(_mm256_setzero_hi(), (U), (A), (B), (I))
- #define _mm256_shrdi_epi16(A, B, I) \
- _mm256_mask_shrdi_epi16(_mm256_undefined_si256(), (__mmask8)(-1), (A), (B), (I))
- #define _mm128_mask_shrdi_epi16(S, U, A, B, I) __extension__ ({ \
- (__m128i)__builtin_ia32_vpshrdw128_mask((__v8hi)(A), \
- (__v8hi)(B), \
- (int)(I), \
- (__v8hi)(S), \
- (__mmask8)(U)); })
- #define _mm128_maskz_shrdi_epi16(U, A, B, I) \
- _mm128_mask_shrdi_epi16(_mm128_setzero_hi(), (U), (A), (B), (I))
- #define _mm128_shrdi_epi16(A, B, I) \
- _mm128_mask_shrdi_epi16(_mm_undefined_si128(), (__mmask8)(-1), (A), (B), (I))
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_mask_shldv_epi64(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B)
- {
- return (__m256i) __builtin_ia32_vpshldvq256_mask ((__v4di) __S,
- (__v4di) __A,
- (__v4di) __B,
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_maskz_shldv_epi64(__mmask8 __U, __m256i __S, __m256i __A, __m256i __B)
- {
- return (__m256i) __builtin_ia32_vpshldvq256_maskz ((__v4di) __S,
- (__v4di) __A,
- (__v4di) __B,
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_shldv_epi64(__m256i __S, __m256i __A, __m256i __B)
- {
- return (__m256i) __builtin_ia32_vpshldvq256_mask ((__v4di) __S,
- (__v4di) __A,
- (__v4di) __B,
- (__mmask8) -1);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_mask_shldv_epi64(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B)
- {
- return (__m128i) __builtin_ia32_vpshldvq128_mask ((__v2di) __S,
- (__v2di) __A,
- (__v2di) __B,
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_maskz_shldv_epi64(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B)
- {
- return (__m128i) __builtin_ia32_vpshldvq128_maskz ((__v2di) __S,
- (__v2di) __A,
- (__v2di) __B,
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_shldv_epi64(__m128i __S, __m128i __A, __m128i __B)
- {
- return (__m128i) __builtin_ia32_vpshldvq128_mask ((__v2di) __S,
- (__v2di) __A,
- (__v2di) __B,
- (__mmask8) -1);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_mask_shldv_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B)
- {
- return (__m256i) __builtin_ia32_vpshldvd256_mask ((__v8si) __S,
- (__v8si) __A,
- (__v8si) __B,
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_maskz_shldv_epi32(__mmask8 __U, __m256i __S, __m256i __A, __m256i __B)
- {
- return (__m256i) __builtin_ia32_vpshldvd256_maskz ((__v8si) __S,
- (__v8si) __A,
- (__v8si) __B,
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_shldv_epi32(__m256i __S, __m256i __A, __m256i __B)
- {
- return (__m256i) __builtin_ia32_vpshldvd256_mask ((__v8si) __S,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) -1);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_mask_shldv_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B)
- {
- return (__m128i) __builtin_ia32_vpshldvd128_mask ((__v4si) __S,
- (__v4si) __A,
- (__v4si) __B,
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_maskz_shldv_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B)
- {
- return (__m128i) __builtin_ia32_vpshldvd128_maskz ((__v4si) __S,
- (__v4si) __A,
- (__v4si) __B,
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_shldv_epi32(__m128i __S, __m128i __A, __m128i __B)
- {
- return (__m128i) __builtin_ia32_vpshldvd128_mask ((__v4si) __S,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) -1);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_mask_shldv_epi16(__m256i __S, __mmask16 __U, __m256i __A, __m256i __B)
- {
- return (__m256i) __builtin_ia32_vpshldvw256_mask ((__v16hi) __S,
- (__v16hi) __A,
- (__v16hi) __B,
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_maskz_shldv_epi16(__mmask16 __U, __m256i __S, __m256i __A, __m256i __B)
- {
- return (__m256i) __builtin_ia32_vpshldvw256_maskz ((__v16hi) __S,
- (__v16hi) __A,
- (__v16hi) __B,
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_shldv_epi16(__m256i __S, __m256i __A, __m256i __B)
- {
- return (__m256i) __builtin_ia32_vpshldvw256_mask ((__v16hi) __S,
- (__v16hi) __A,
- (__v16hi) __B,
- (__mmask16) -1);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_mask_shldv_epi16(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B)
- {
- return (__m128i) __builtin_ia32_vpshldvw128_mask ((__v8hi) __S,
- (__v8hi) __A,
- (__v8hi) __B,
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_maskz_shldv_epi16(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B)
- {
- return (__m128i) __builtin_ia32_vpshldvw128_maskz ((__v8hi) __S,
- (__v8hi) __A,
- (__v8hi) __B,
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_shldv_epi16(__m128i __S, __m128i __A, __m128i __B)
- {
- return (__m128i) __builtin_ia32_vpshldvw128_mask ((__v8hi) __S,
- (__v8hi) __A,
- (__v8hi) __B,
- (__mmask8) -1);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_mask_shrdv_epi64(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B)
- {
- return (__m256i) __builtin_ia32_vpshrdvq256_mask ((__v4di) __S,
- (__v4di) __A,
- (__v4di) __B,
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_maskz_shrdv_epi64(__mmask8 __U, __m256i __S, __m256i __A, __m256i __B)
- {
- return (__m256i) __builtin_ia32_vpshrdvq256_maskz ((__v4di) __S,
- (__v4di) __A,
- (__v4di) __B,
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_shrdv_epi64(__m256i __S, __m256i __A, __m256i __B)
- {
- return (__m256i) __builtin_ia32_vpshrdvq256_mask ((__v4di) __S,
- (__v4di) __A,
- (__v4di) __B,
- (__mmask8) -1);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_mask_shrdv_epi64(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B)
- {
- return (__m128i) __builtin_ia32_vpshrdvq128_mask ((__v2di) __S,
- (__v2di) __A,
- (__v2di) __B,
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_maskz_shrdv_epi64(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B)
- {
- return (__m128i) __builtin_ia32_vpshrdvq128_maskz ((__v2di) __S,
- (__v2di) __A,
- (__v2di) __B,
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_shrdv_epi64(__m128i __S, __m128i __A, __m128i __B)
- {
- return (__m128i) __builtin_ia32_vpshrdvq128_mask ((__v2di) __S,
- (__v2di) __A,
- (__v2di) __B,
- (__mmask8) -1);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_mask_shrdv_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B)
- {
- return (__m256i) __builtin_ia32_vpshrdvd256_mask ((__v8si) __S,
- (__v8si) __A,
- (__v8si) __B,
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_maskz_shrdv_epi32(__mmask8 __U, __m256i __S, __m256i __A, __m256i __B)
- {
- return (__m256i) __builtin_ia32_vpshrdvd256_maskz ((__v8si) __S,
- (__v8si) __A,
- (__v8si) __B,
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_shrdv_epi32(__m256i __S, __m256i __A, __m256i __B)
- {
- return (__m256i) __builtin_ia32_vpshrdvd256_mask ((__v8si) __S,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) -1);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_mask_shrdv_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B)
- {
- return (__m128i) __builtin_ia32_vpshrdvd128_mask ((__v4si) __S,
- (__v4si) __A,
- (__v4si) __B,
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_maskz_shrdv_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B)
- {
- return (__m128i) __builtin_ia32_vpshrdvd128_maskz ((__v4si) __S,
- (__v4si) __A,
- (__v4si) __B,
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_shrdv_epi32(__m128i __S, __m128i __A, __m128i __B)
- {
- return (__m128i) __builtin_ia32_vpshrdvd128_mask ((__v4si) __S,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) -1);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_mask_shrdv_epi16(__m256i __S, __mmask16 __U, __m256i __A, __m256i __B)
- {
- return (__m256i) __builtin_ia32_vpshrdvw256_mask ((__v16hi) __S,
- (__v16hi) __A,
- (__v16hi) __B,
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_maskz_shrdv_epi16(__mmask16 __U, __m256i __S, __m256i __A, __m256i __B)
- {
- return (__m256i) __builtin_ia32_vpshrdvw256_maskz ((__v16hi) __S,
- (__v16hi) __A,
- (__v16hi) __B,
- __U);
- }
- static __inline__ __m256i __DEFAULT_FN_ATTRS
- _mm256_shrdv_epi16(__m256i __S, __m256i __A, __m256i __B)
- {
- return (__m256i) __builtin_ia32_vpshrdvw256_mask ((__v16hi) __S,
- (__v16hi) __A,
- (__v16hi) __B,
- (__mmask16) -1);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_mask_shrdv_epi16(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B)
- {
- return (__m128i) __builtin_ia32_vpshrdvw128_mask ((__v8hi) __S,
- (__v8hi) __A,
- (__v8hi) __B,
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_maskz_shrdv_epi16(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B)
- {
- return (__m128i) __builtin_ia32_vpshrdvw128_maskz ((__v8hi) __S,
- (__v8hi) __A,
- (__v8hi) __B,
- __U);
- }
- static __inline__ __m128i __DEFAULT_FN_ATTRS
- _mm128_shrdv_epi16(__m128i __S, __m128i __A, __m128i __B)
- {
- return (__m128i) __builtin_ia32_vpshrdvw128_mask ((__v8hi) __S,
- (__v8hi) __A,
- (__v8hi) __B,
- (__mmask8) -1);
- }
- #undef __DEFAULT_FN_ATTRS
- #endif
|