[1166] | 1 | /* Copyright (C) 2013-2021 Free Software Foundation, Inc.
|
---|
| 2 |
|
---|
| 3 | This file is part of GCC.
|
---|
| 4 |
|
---|
| 5 | GCC is free software; you can redistribute it and/or modify
|
---|
| 6 | it under the terms of the GNU General Public License as published by
|
---|
| 7 | the Free Software Foundation; either version 3, or (at your option)
|
---|
| 8 | any later version.
|
---|
| 9 |
|
---|
| 10 | GCC is distributed in the hope that it will be useful,
|
---|
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 13 | GNU General Public License for more details.
|
---|
| 14 |
|
---|
| 15 | Under Section 7 of GPL version 3, you are granted additional
|
---|
| 16 | permissions described in the GCC Runtime Library Exception, version
|
---|
| 17 | 3.1, as published by the Free Software Foundation.
|
---|
| 18 |
|
---|
| 19 | You should have received a copy of the GNU General Public License and
|
---|
| 20 | a copy of the GCC Runtime Library Exception along with this program;
|
---|
| 21 | see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
---|
| 22 | <http://www.gnu.org/licenses/>. */
|
---|
| 23 |
|
---|
| 24 | #ifndef _IMMINTRIN_H_INCLUDED
|
---|
| 25 | #error "Never use <avx512vbmiintrin.h> directly; include <immintrin.h> instead."
|
---|
| 26 | #endif
|
---|
| 27 |
|
---|
| 28 | #ifndef _AVX512VBMIINTRIN_H_INCLUDED
|
---|
| 29 | #define _AVX512VBMIINTRIN_H_INCLUDED
|
---|
| 30 |
|
---|
| 31 | #ifndef __AVX512VBMI__
|
---|
| 32 | #pragma GCC push_options
|
---|
| 33 | #pragma GCC target("avx512vbmi")
|
---|
| 34 | #define __DISABLE_AVX512VBMI__
|
---|
| 35 | #endif /* __AVX512VBMI__ */
|
---|
| 36 |
|
---|
| 37 | extern __inline __m512i
|
---|
| 38 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
| 39 | _mm512_mask_multishift_epi64_epi8 (__m512i __W, __mmask64 __M, __m512i __X, __m512i __Y)
|
---|
| 40 | {
|
---|
| 41 | return (__m512i) __builtin_ia32_vpmultishiftqb512_mask ((__v64qi) __X,
|
---|
| 42 | (__v64qi) __Y,
|
---|
| 43 | (__v64qi) __W,
|
---|
| 44 | (__mmask64) __M);
|
---|
| 45 | }
|
---|
| 46 |
|
---|
| 47 | extern __inline __m512i
|
---|
| 48 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
| 49 | _mm512_maskz_multishift_epi64_epi8 (__mmask64 __M, __m512i __X, __m512i __Y)
|
---|
| 50 | {
|
---|
| 51 | return (__m512i) __builtin_ia32_vpmultishiftqb512_mask ((__v64qi) __X,
|
---|
| 52 | (__v64qi) __Y,
|
---|
| 53 | (__v64qi)
|
---|
| 54 | _mm512_setzero_si512 (),
|
---|
| 55 | (__mmask64) __M);
|
---|
| 56 | }
|
---|
| 57 |
|
---|
| 58 | extern __inline __m512i
|
---|
| 59 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
| 60 | _mm512_multishift_epi64_epi8 (__m512i __X, __m512i __Y)
|
---|
| 61 | {
|
---|
| 62 | return (__m512i) __builtin_ia32_vpmultishiftqb512_mask ((__v64qi) __X,
|
---|
| 63 | (__v64qi) __Y,
|
---|
| 64 | (__v64qi)
|
---|
| 65 | _mm512_undefined_epi32 (),
|
---|
| 66 | (__mmask64) -1);
|
---|
| 67 | }
|
---|
| 68 |
|
---|
| 69 | extern __inline __m512i
|
---|
| 70 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
| 71 | _mm512_permutexvar_epi8 (__m512i __A, __m512i __B)
|
---|
| 72 | {
|
---|
| 73 | return (__m512i) __builtin_ia32_permvarqi512_mask ((__v64qi) __B,
|
---|
| 74 | (__v64qi) __A,
|
---|
| 75 | (__v64qi)
|
---|
| 76 | _mm512_undefined_epi32 (),
|
---|
| 77 | (__mmask64) -1);
|
---|
| 78 | }
|
---|
| 79 |
|
---|
| 80 | extern __inline __m512i
|
---|
| 81 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
| 82 | _mm512_maskz_permutexvar_epi8 (__mmask64 __M, __m512i __A,
|
---|
| 83 | __m512i __B)
|
---|
| 84 | {
|
---|
| 85 | return (__m512i) __builtin_ia32_permvarqi512_mask ((__v64qi) __B,
|
---|
| 86 | (__v64qi) __A,
|
---|
| 87 | (__v64qi)
|
---|
| 88 | _mm512_setzero_si512(),
|
---|
| 89 | (__mmask64) __M);
|
---|
| 90 | }
|
---|
| 91 |
|
---|
| 92 | extern __inline __m512i
|
---|
| 93 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
| 94 | _mm512_mask_permutexvar_epi8 (__m512i __W, __mmask64 __M, __m512i __A,
|
---|
| 95 | __m512i __B)
|
---|
| 96 | {
|
---|
| 97 | return (__m512i) __builtin_ia32_permvarqi512_mask ((__v64qi) __B,
|
---|
| 98 | (__v64qi) __A,
|
---|
| 99 | (__v64qi) __W,
|
---|
| 100 | (__mmask64) __M);
|
---|
| 101 | }
|
---|
| 102 |
|
---|
| 103 | extern __inline __m512i
|
---|
| 104 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
| 105 | _mm512_permutex2var_epi8 (__m512i __A, __m512i __I, __m512i __B)
|
---|
| 106 | {
|
---|
| 107 | return (__m512i) __builtin_ia32_vpermt2varqi512_mask ((__v64qi) __I
|
---|
| 108 | /* idx */ ,
|
---|
| 109 | (__v64qi) __A,
|
---|
| 110 | (__v64qi) __B,
|
---|
| 111 | (__mmask64) -1);
|
---|
| 112 | }
|
---|
| 113 |
|
---|
| 114 | extern __inline __m512i
|
---|
| 115 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
| 116 | _mm512_mask_permutex2var_epi8 (__m512i __A, __mmask64 __U,
|
---|
| 117 | __m512i __I, __m512i __B)
|
---|
| 118 | {
|
---|
| 119 | return (__m512i) __builtin_ia32_vpermt2varqi512_mask ((__v64qi) __I
|
---|
| 120 | /* idx */ ,
|
---|
| 121 | (__v64qi) __A,
|
---|
| 122 | (__v64qi) __B,
|
---|
| 123 | (__mmask64)
|
---|
| 124 | __U);
|
---|
| 125 | }
|
---|
| 126 |
|
---|
| 127 | extern __inline __m512i
|
---|
| 128 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
| 129 | _mm512_mask2_permutex2var_epi8 (__m512i __A, __m512i __I,
|
---|
| 130 | __mmask64 __U, __m512i __B)
|
---|
| 131 | {
|
---|
| 132 | return (__m512i) __builtin_ia32_vpermi2varqi512_mask ((__v64qi) __A,
|
---|
| 133 | (__v64qi) __I
|
---|
| 134 | /* idx */ ,
|
---|
| 135 | (__v64qi) __B,
|
---|
| 136 | (__mmask64)
|
---|
| 137 | __U);
|
---|
| 138 | }
|
---|
| 139 |
|
---|
| 140 | extern __inline __m512i
|
---|
| 141 | __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
|
---|
| 142 | _mm512_maskz_permutex2var_epi8 (__mmask64 __U, __m512i __A,
|
---|
| 143 | __m512i __I, __m512i __B)
|
---|
| 144 | {
|
---|
| 145 | return (__m512i) __builtin_ia32_vpermt2varqi512_maskz ((__v64qi) __I
|
---|
| 146 | /* idx */ ,
|
---|
| 147 | (__v64qi) __A,
|
---|
| 148 | (__v64qi) __B,
|
---|
| 149 | (__mmask64)
|
---|
| 150 | __U);
|
---|
| 151 | }
|
---|
| 152 |
|
---|
| 153 | #ifdef __DISABLE_AVX512VBMI__
|
---|
| 154 | #undef __DISABLE_AVX512VBMI__
|
---|
| 155 | #pragma GCC pop_options
|
---|
| 156 | #endif /* __DISABLE_AVX512VBMI__ */
|
---|
| 157 |
|
---|
| 158 | #endif /* _AVX512VBMIINTRIN_H_INCLUDED */
|
---|