avx512vnnivlintrin.h 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. /* Copyright (C) 2013-2019 Free Software Foundation, Inc.
  2. This file is part of GCC.
  3. GCC is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 3, or (at your option)
  6. any later version.
  7. GCC is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. Under Section 7 of GPL version 3, you are granted additional
  12. permissions described in the GCC Runtime Library Exception, version
  13. 3.1, as published by the Free Software Foundation.
  14. You should have received a copy of the GNU General Public License and
  15. a copy of the GCC Runtime Library Exception along with this program;
  16. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  17. <http://www.gnu.org/licenses/>. */
  18. #ifndef _IMMINTRIN_H_INCLUDED
  19. #error "Never use <avx512vnnivlintrin.h> directly; include <immintrin.h> instead."
  20. #endif
  21. #ifndef _AVX512VNNIVLINTRIN_H_INCLUDED
  22. #define _AVX512VNNIVLINTRIN_H_INCLUDED
  23. #if !defined(__AVX512VL__) || !defined(__AVX512VNNI__)
  24. #pragma GCC push_options
  25. #pragma GCC target("avx512vnni,avx512vl")
  26. #define __DISABLE_AVX512VNNIVL__
  27. #endif /* __AVX512VNNIVL__ */
  28. extern __inline __m256i
  29. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  30. _mm256_dpbusd_epi32 (__m256i __A, __m256i __B, __m256i __C)
  31. {
  32. return (__m256i) __builtin_ia32_vpdpbusd_v8si ((__v8si)__A, (__v8si) __B,
  33. (__v8si) __C);
  34. }
  35. extern __inline __m256i
  36. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  37. _mm256_mask_dpbusd_epi32 (__m256i __A, __mmask8 __B, __m256i __C, __m256i __D)
  38. {
  39. return (__m256i)__builtin_ia32_vpdpbusd_v8si_mask ((__v8si)__A, (__v8si) __C,
  40. (__v8si) __D, (__mmask8)__B);
  41. }
  42. extern __inline __m256i
  43. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  44. _mm256_maskz_dpbusd_epi32 (__mmask8 __A, __m256i __B, __m256i __C, __m256i __D)
  45. {
  46. return (__m256i)__builtin_ia32_vpdpbusd_v8si_maskz ((__v8si)__B,
  47. (__v8si) __C, (__v8si) __D, (__mmask8)__A);
  48. }
  49. extern __inline __m128i
  50. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  51. _mm_dpbusd_epi32 (__m128i __A, __m128i __B, __m128i __C)
  52. {
  53. return (__m128i) __builtin_ia32_vpdpbusd_v4si ((__v4si)__A, (__v4si) __B,
  54. (__v4si) __C);
  55. }
  56. extern __inline __m128i
  57. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  58. _mm_mask_dpbusd_epi32 (__m128i __A, __mmask8 __B, __m128i __C, __m128i __D)
  59. {
  60. return (__m128i)__builtin_ia32_vpdpbusd_v4si_mask ((__v4si)__A, (__v4si) __C,
  61. (__v4si) __D, (__mmask8)__B);
  62. }
  63. extern __inline __m128i
  64. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  65. _mm_maskz_dpbusd_epi32 (__mmask8 __A, __m128i __B, __m128i __C, __m128i __D)
  66. {
  67. return (__m128i)__builtin_ia32_vpdpbusd_v4si_maskz ((__v4si)__B,
  68. (__v4si) __C, (__v4si) __D, (__mmask8)__A);
  69. }
  70. extern __inline __m256i
  71. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  72. _mm256_dpbusds_epi32 (__m256i __A, __m256i __B, __m256i __C)
  73. {
  74. return (__m256i) __builtin_ia32_vpdpbusds_v8si ((__v8si)__A, (__v8si) __B,
  75. (__v8si) __C);
  76. }
  77. extern __inline __m256i
  78. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  79. _mm256_mask_dpbusds_epi32 (__m256i __A, __mmask8 __B, __m256i __C, __m256i __D)
  80. {
  81. return (__m256i)__builtin_ia32_vpdpbusds_v8si_mask ((__v8si)__A,
  82. (__v8si) __C, (__v8si) __D, (__mmask8)__B);
  83. }
  84. extern __inline __m256i
  85. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  86. _mm256_maskz_dpbusds_epi32 (__mmask8 __A, __m256i __B, __m256i __C,
  87. __m256i __D)
  88. {
  89. return (__m256i)__builtin_ia32_vpdpbusds_v8si_maskz ((__v8si)__B,
  90. (__v8si) __C, (__v8si) __D, (__mmask8)__A);
  91. }
  92. extern __inline __m128i
  93. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  94. _mm_dpbusds_epi32 (__m128i __A, __m128i __B, __m128i __C)
  95. {
  96. return (__m128i) __builtin_ia32_vpdpbusds_v4si ((__v4si)__A, (__v4si) __B,
  97. (__v4si) __C);
  98. }
  99. extern __inline __m128i
  100. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  101. _mm_mask_dpbusds_epi32 (__m128i __A, __mmask8 __B, __m128i __C, __m128i __D)
  102. {
  103. return (__m128i)__builtin_ia32_vpdpbusds_v4si_mask ((__v4si)__A,
  104. (__v4si) __C, (__v4si) __D, (__mmask8)__B);
  105. }
  106. extern __inline __m128i
  107. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  108. _mm_maskz_dpbusds_epi32 (__mmask8 __A, __m128i __B, __m128i __C, __m128i __D)
  109. {
  110. return (__m128i)__builtin_ia32_vpdpbusds_v4si_maskz ((__v4si)__B,
  111. (__v4si) __C, (__v4si) __D, (__mmask8)__A);
  112. }
  113. extern __inline __m256i
  114. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  115. _mm256_dpwssd_epi32 (__m256i __A, __m256i __B, __m256i __C)
  116. {
  117. return (__m256i) __builtin_ia32_vpdpwssd_v8si ((__v8si)__A, (__v8si) __B,
  118. (__v8si) __C);
  119. }
  120. extern __inline __m256i
  121. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  122. _mm256_mask_dpwssd_epi32 (__m256i __A, __mmask8 __B, __m256i __C, __m256i __D)
  123. {
  124. return (__m256i)__builtin_ia32_vpdpwssd_v8si_mask ((__v8si)__A, (__v8si) __C,
  125. (__v8si) __D, (__mmask8)__B);
  126. }
  127. extern __inline __m256i
  128. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  129. _mm256_maskz_dpwssd_epi32 (__mmask8 __A, __m256i __B, __m256i __C, __m256i __D)
  130. {
  131. return (__m256i)__builtin_ia32_vpdpwssd_v8si_maskz ((__v8si)__B,
  132. (__v8si) __C, (__v8si) __D, (__mmask8)__A);
  133. }
  134. extern __inline __m128i
  135. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  136. _mm_dpwssd_epi32 (__m128i __A, __m128i __B, __m128i __C)
  137. {
  138. return (__m128i) __builtin_ia32_vpdpwssd_v4si ((__v4si)__A, (__v4si) __B,
  139. (__v4si) __C);
  140. }
  141. extern __inline __m128i
  142. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  143. _mm_mask_dpwssd_epi32 (__m128i __A, __mmask8 __B, __m128i __C, __m128i __D)
  144. {
  145. return (__m128i)__builtin_ia32_vpdpwssd_v4si_mask ((__v4si)__A, (__v4si) __C,
  146. (__v4si) __D, (__mmask8)__B);
  147. }
  148. extern __inline __m128i
  149. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  150. _mm_maskz_dpwssd_epi32 (__mmask8 __A, __m128i __B, __m128i __C, __m128i __D)
  151. {
  152. return (__m128i)__builtin_ia32_vpdpwssd_v4si_maskz ((__v4si)__B,
  153. (__v4si) __C, (__v4si) __D, (__mmask8)__A);
  154. }
  155. extern __inline __m256i
  156. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  157. _mm256_dpwssds_epi32 (__m256i __A, __m256i __B, __m256i __C)
  158. {
  159. return (__m256i) __builtin_ia32_vpdpwssds_v8si ((__v8si)__A, (__v8si) __B,
  160. (__v8si) __C);
  161. }
  162. extern __inline __m256i
  163. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  164. _mm256_mask_dpwssds_epi32 (__m256i __A, __mmask8 __B, __m256i __C, __m256i __D)
  165. {
  166. return (__m256i)__builtin_ia32_vpdpwssds_v8si_mask ((__v8si)__A,
  167. (__v8si) __C, (__v8si) __D, (__mmask8)__B);
  168. }
  169. extern __inline __m256i
  170. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  171. _mm256_maskz_dpwssds_epi32 (__mmask8 __A, __m256i __B, __m256i __C,
  172. __m256i __D)
  173. {
  174. return (__m256i)__builtin_ia32_vpdpwssds_v8si_maskz ((__v8si)__B,
  175. (__v8si) __C, (__v8si) __D, (__mmask8)__A);
  176. }
  177. extern __inline __m128i
  178. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  179. _mm_dpwssds_epi32 (__m128i __A, __m128i __B, __m128i __C)
  180. {
  181. return (__m128i) __builtin_ia32_vpdpwssds_v4si ((__v4si)__A, (__v4si) __B,
  182. (__v4si) __C);
  183. }
  184. extern __inline __m128i
  185. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  186. _mm_mask_dpwssds_epi32 (__m128i __A, __mmask8 __B, __m128i __C, __m128i __D)
  187. {
  188. return (__m128i)__builtin_ia32_vpdpwssds_v4si_mask ((__v4si)__A,
  189. (__v4si) __C, (__v4si) __D, (__mmask8)__B);
  190. }
  191. extern __inline __m128i
  192. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  193. _mm_maskz_dpwssds_epi32 (__mmask8 __A, __m128i __B, __m128i __C, __m128i __D)
  194. {
  195. return (__m128i)__builtin_ia32_vpdpwssds_v4si_maskz ((__v4si)__B,
  196. (__v4si) __C, (__v4si) __D, (__mmask8)__A);
  197. }
  198. #ifdef __DISABLE_AVX512VNNIVL__
  199. #undef __DISABLE_AVX512VNNIVL__
  200. #pragma GCC pop_options
  201. #endif /* __DISABLE_AVX512VNNIVL__ */
  202. #endif /* __DISABLE_AVX512VNNIVL__ */