avx2intrin.h 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308
  1. /*===---- avx2intrin.h - AVX2 intrinsics -----------------------------------===
  2. *
  3. * Permission is hereby granted, free of charge, to any person obtaining a copy
  4. * of this software and associated documentation files (the "Software"), to deal
  5. * in the Software without restriction, including without limitation the rights
  6. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. * copies of the Software, and to permit persons to whom the Software is
  8. * furnished to do so, subject to the following conditions:
  9. *
  10. * The above copyright notice and this permission notice shall be included in
  11. * all copies or substantial portions of the Software.
  12. *
  13. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19. * THE SOFTWARE.
  20. *
  21. *===-----------------------------------------------------------------------===
  22. */
  23. #ifndef __IMMINTRIN_H
  24. #error "Never use <avx2intrin.h> directly; include <immintrin.h> instead."
  25. #endif
  26. #ifndef __AVX2INTRIN_H
  27. #define __AVX2INTRIN_H
  28. /* Define the default attributes for the functions in this file. */
  29. #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx2")))
  30. /* SSE4 Multiple Packed Sums of Absolute Difference. */
  31. #define _mm256_mpsadbw_epu8(X, Y, M) \
  32. (__m256i)__builtin_ia32_mpsadbw256((__v32qi)(__m256i)(X), \
  33. (__v32qi)(__m256i)(Y), (int)(M))
  34. static __inline__ __m256i __DEFAULT_FN_ATTRS
  35. _mm256_abs_epi8(__m256i __a)
  36. {
  37. return (__m256i)__builtin_ia32_pabsb256((__v32qi)__a);
  38. }
  39. static __inline__ __m256i __DEFAULT_FN_ATTRS
  40. _mm256_abs_epi16(__m256i __a)
  41. {
  42. return (__m256i)__builtin_ia32_pabsw256((__v16hi)__a);
  43. }
  44. static __inline__ __m256i __DEFAULT_FN_ATTRS
  45. _mm256_abs_epi32(__m256i __a)
  46. {
  47. return (__m256i)__builtin_ia32_pabsd256((__v8si)__a);
  48. }
  49. static __inline__ __m256i __DEFAULT_FN_ATTRS
  50. _mm256_packs_epi16(__m256i __a, __m256i __b)
  51. {
  52. return (__m256i)__builtin_ia32_packsswb256((__v16hi)__a, (__v16hi)__b);
  53. }
  54. static __inline__ __m256i __DEFAULT_FN_ATTRS
  55. _mm256_packs_epi32(__m256i __a, __m256i __b)
  56. {
  57. return (__m256i)__builtin_ia32_packssdw256((__v8si)__a, (__v8si)__b);
  58. }
  59. static __inline__ __m256i __DEFAULT_FN_ATTRS
  60. _mm256_packus_epi16(__m256i __a, __m256i __b)
  61. {
  62. return (__m256i)__builtin_ia32_packuswb256((__v16hi)__a, (__v16hi)__b);
  63. }
  64. static __inline__ __m256i __DEFAULT_FN_ATTRS
  65. _mm256_packus_epi32(__m256i __V1, __m256i __V2)
  66. {
  67. return (__m256i) __builtin_ia32_packusdw256((__v8si)__V1, (__v8si)__V2);
  68. }
  69. static __inline__ __m256i __DEFAULT_FN_ATTRS
  70. _mm256_add_epi8(__m256i __a, __m256i __b)
  71. {
  72. return (__m256i)((__v32qu)__a + (__v32qu)__b);
  73. }
  74. static __inline__ __m256i __DEFAULT_FN_ATTRS
  75. _mm256_add_epi16(__m256i __a, __m256i __b)
  76. {
  77. return (__m256i)((__v16hu)__a + (__v16hu)__b);
  78. }
  79. static __inline__ __m256i __DEFAULT_FN_ATTRS
  80. _mm256_add_epi32(__m256i __a, __m256i __b)
  81. {
  82. return (__m256i)((__v8su)__a + (__v8su)__b);
  83. }
  84. static __inline__ __m256i __DEFAULT_FN_ATTRS
  85. _mm256_add_epi64(__m256i __a, __m256i __b)
  86. {
  87. return (__m256i)((__v4du)__a + (__v4du)__b);
  88. }
  89. static __inline__ __m256i __DEFAULT_FN_ATTRS
  90. _mm256_adds_epi8(__m256i __a, __m256i __b)
  91. {
  92. return (__m256i)__builtin_ia32_paddsb256((__v32qi)__a, (__v32qi)__b);
  93. }
  94. static __inline__ __m256i __DEFAULT_FN_ATTRS
  95. _mm256_adds_epi16(__m256i __a, __m256i __b)
  96. {
  97. return (__m256i)__builtin_ia32_paddsw256((__v16hi)__a, (__v16hi)__b);
  98. }
  99. static __inline__ __m256i __DEFAULT_FN_ATTRS
  100. _mm256_adds_epu8(__m256i __a, __m256i __b)
  101. {
  102. return (__m256i)__builtin_ia32_paddusb256((__v32qi)__a, (__v32qi)__b);
  103. }
  104. static __inline__ __m256i __DEFAULT_FN_ATTRS
  105. _mm256_adds_epu16(__m256i __a, __m256i __b)
  106. {
  107. return (__m256i)__builtin_ia32_paddusw256((__v16hi)__a, (__v16hi)__b);
  108. }
  109. #define _mm256_alignr_epi8(a, b, n) __extension__ ({ \
  110. (__m256i)__builtin_ia32_palignr256((__v32qi)(__m256i)(a), \
  111. (__v32qi)(__m256i)(b), (n)); })
  112. static __inline__ __m256i __DEFAULT_FN_ATTRS
  113. _mm256_and_si256(__m256i __a, __m256i __b)
  114. {
  115. return (__m256i)((__v4du)__a & (__v4du)__b);
  116. }
  117. static __inline__ __m256i __DEFAULT_FN_ATTRS
  118. _mm256_andnot_si256(__m256i __a, __m256i __b)
  119. {
  120. return (__m256i)(~(__v4du)__a & (__v4du)__b);
  121. }
  122. static __inline__ __m256i __DEFAULT_FN_ATTRS
  123. _mm256_avg_epu8(__m256i __a, __m256i __b)
  124. {
  125. typedef unsigned short __v32hu __attribute__((__vector_size__(64)));
  126. return (__m256i)__builtin_convertvector(
  127. ((__builtin_convertvector((__v32qu)__a, __v32hu) +
  128. __builtin_convertvector((__v32qu)__b, __v32hu)) + 1)
  129. >> 1, __v32qu);
  130. }
  131. static __inline__ __m256i __DEFAULT_FN_ATTRS
  132. _mm256_avg_epu16(__m256i __a, __m256i __b)
  133. {
  134. typedef unsigned int __v16su __attribute__((__vector_size__(64)));
  135. return (__m256i)__builtin_convertvector(
  136. ((__builtin_convertvector((__v16hu)__a, __v16su) +
  137. __builtin_convertvector((__v16hu)__b, __v16su)) + 1)
  138. >> 1, __v16hu);
  139. }
  140. static __inline__ __m256i __DEFAULT_FN_ATTRS
  141. _mm256_blendv_epi8(__m256i __V1, __m256i __V2, __m256i __M)
  142. {
  143. return (__m256i)__builtin_ia32_pblendvb256((__v32qi)__V1, (__v32qi)__V2,
  144. (__v32qi)__M);
  145. }
  146. #define _mm256_blend_epi16(V1, V2, M) __extension__ ({ \
  147. (__m256i)__builtin_shufflevector((__v16hi)(__m256i)(V1), \
  148. (__v16hi)(__m256i)(V2), \
  149. (((M) & 0x01) ? 16 : 0), \
  150. (((M) & 0x02) ? 17 : 1), \
  151. (((M) & 0x04) ? 18 : 2), \
  152. (((M) & 0x08) ? 19 : 3), \
  153. (((M) & 0x10) ? 20 : 4), \
  154. (((M) & 0x20) ? 21 : 5), \
  155. (((M) & 0x40) ? 22 : 6), \
  156. (((M) & 0x80) ? 23 : 7), \
  157. (((M) & 0x01) ? 24 : 8), \
  158. (((M) & 0x02) ? 25 : 9), \
  159. (((M) & 0x04) ? 26 : 10), \
  160. (((M) & 0x08) ? 27 : 11), \
  161. (((M) & 0x10) ? 28 : 12), \
  162. (((M) & 0x20) ? 29 : 13), \
  163. (((M) & 0x40) ? 30 : 14), \
  164. (((M) & 0x80) ? 31 : 15)); })
  165. static __inline__ __m256i __DEFAULT_FN_ATTRS
  166. _mm256_cmpeq_epi8(__m256i __a, __m256i __b)
  167. {
  168. return (__m256i)((__v32qi)__a == (__v32qi)__b);
  169. }
  170. static __inline__ __m256i __DEFAULT_FN_ATTRS
  171. _mm256_cmpeq_epi16(__m256i __a, __m256i __b)
  172. {
  173. return (__m256i)((__v16hi)__a == (__v16hi)__b);
  174. }
  175. static __inline__ __m256i __DEFAULT_FN_ATTRS
  176. _mm256_cmpeq_epi32(__m256i __a, __m256i __b)
  177. {
  178. return (__m256i)((__v8si)__a == (__v8si)__b);
  179. }
  180. static __inline__ __m256i __DEFAULT_FN_ATTRS
  181. _mm256_cmpeq_epi64(__m256i __a, __m256i __b)
  182. {
  183. return (__m256i)((__v4di)__a == (__v4di)__b);
  184. }
  185. static __inline__ __m256i __DEFAULT_FN_ATTRS
  186. _mm256_cmpgt_epi8(__m256i __a, __m256i __b)
  187. {
  188. /* This function always performs a signed comparison, but __v32qi is a char
  189. which may be signed or unsigned, so use __v32qs. */
  190. return (__m256i)((__v32qs)__a > (__v32qs)__b);
  191. }
  192. static __inline__ __m256i __DEFAULT_FN_ATTRS
  193. _mm256_cmpgt_epi16(__m256i __a, __m256i __b)
  194. {
  195. return (__m256i)((__v16hi)__a > (__v16hi)__b);
  196. }
  197. static __inline__ __m256i __DEFAULT_FN_ATTRS
  198. _mm256_cmpgt_epi32(__m256i __a, __m256i __b)
  199. {
  200. return (__m256i)((__v8si)__a > (__v8si)__b);
  201. }
  202. static __inline__ __m256i __DEFAULT_FN_ATTRS
  203. _mm256_cmpgt_epi64(__m256i __a, __m256i __b)
  204. {
  205. return (__m256i)((__v4di)__a > (__v4di)__b);
  206. }
  207. static __inline__ __m256i __DEFAULT_FN_ATTRS
  208. _mm256_hadd_epi16(__m256i __a, __m256i __b)
  209. {
  210. return (__m256i)__builtin_ia32_phaddw256((__v16hi)__a, (__v16hi)__b);
  211. }
  212. static __inline__ __m256i __DEFAULT_FN_ATTRS
  213. _mm256_hadd_epi32(__m256i __a, __m256i __b)
  214. {
  215. return (__m256i)__builtin_ia32_phaddd256((__v8si)__a, (__v8si)__b);
  216. }
  217. static __inline__ __m256i __DEFAULT_FN_ATTRS
  218. _mm256_hadds_epi16(__m256i __a, __m256i __b)
  219. {
  220. return (__m256i)__builtin_ia32_phaddsw256((__v16hi)__a, (__v16hi)__b);
  221. }
  222. static __inline__ __m256i __DEFAULT_FN_ATTRS
  223. _mm256_hsub_epi16(__m256i __a, __m256i __b)
  224. {
  225. return (__m256i)__builtin_ia32_phsubw256((__v16hi)__a, (__v16hi)__b);
  226. }
  227. static __inline__ __m256i __DEFAULT_FN_ATTRS
  228. _mm256_hsub_epi32(__m256i __a, __m256i __b)
  229. {
  230. return (__m256i)__builtin_ia32_phsubd256((__v8si)__a, (__v8si)__b);
  231. }
  232. static __inline__ __m256i __DEFAULT_FN_ATTRS
  233. _mm256_hsubs_epi16(__m256i __a, __m256i __b)
  234. {
  235. return (__m256i)__builtin_ia32_phsubsw256((__v16hi)__a, (__v16hi)__b);
  236. }
  237. static __inline__ __m256i __DEFAULT_FN_ATTRS
  238. _mm256_maddubs_epi16(__m256i __a, __m256i __b)
  239. {
  240. return (__m256i)__builtin_ia32_pmaddubsw256((__v32qi)__a, (__v32qi)__b);
  241. }
  242. static __inline__ __m256i __DEFAULT_FN_ATTRS
  243. _mm256_madd_epi16(__m256i __a, __m256i __b)
  244. {
  245. return (__m256i)__builtin_ia32_pmaddwd256((__v16hi)__a, (__v16hi)__b);
  246. }
  247. static __inline__ __m256i __DEFAULT_FN_ATTRS
  248. _mm256_max_epi8(__m256i __a, __m256i __b)
  249. {
  250. return (__m256i)__builtin_ia32_pmaxsb256((__v32qi)__a, (__v32qi)__b);
  251. }
  252. static __inline__ __m256i __DEFAULT_FN_ATTRS
  253. _mm256_max_epi16(__m256i __a, __m256i __b)
  254. {
  255. return (__m256i)__builtin_ia32_pmaxsw256((__v16hi)__a, (__v16hi)__b);
  256. }
  257. static __inline__ __m256i __DEFAULT_FN_ATTRS
  258. _mm256_max_epi32(__m256i __a, __m256i __b)
  259. {
  260. return (__m256i)__builtin_ia32_pmaxsd256((__v8si)__a, (__v8si)__b);
  261. }
  262. static __inline__ __m256i __DEFAULT_FN_ATTRS
  263. _mm256_max_epu8(__m256i __a, __m256i __b)
  264. {
  265. return (__m256i)__builtin_ia32_pmaxub256((__v32qi)__a, (__v32qi)__b);
  266. }
  267. static __inline__ __m256i __DEFAULT_FN_ATTRS
  268. _mm256_max_epu16(__m256i __a, __m256i __b)
  269. {
  270. return (__m256i)__builtin_ia32_pmaxuw256((__v16hi)__a, (__v16hi)__b);
  271. }
  272. static __inline__ __m256i __DEFAULT_FN_ATTRS
  273. _mm256_max_epu32(__m256i __a, __m256i __b)
  274. {
  275. return (__m256i)__builtin_ia32_pmaxud256((__v8si)__a, (__v8si)__b);
  276. }
  277. static __inline__ __m256i __DEFAULT_FN_ATTRS
  278. _mm256_min_epi8(__m256i __a, __m256i __b)
  279. {
  280. return (__m256i)__builtin_ia32_pminsb256((__v32qi)__a, (__v32qi)__b);
  281. }
  282. static __inline__ __m256i __DEFAULT_FN_ATTRS
  283. _mm256_min_epi16(__m256i __a, __m256i __b)
  284. {
  285. return (__m256i)__builtin_ia32_pminsw256((__v16hi)__a, (__v16hi)__b);
  286. }
  287. static __inline__ __m256i __DEFAULT_FN_ATTRS
  288. _mm256_min_epi32(__m256i __a, __m256i __b)
  289. {
  290. return (__m256i)__builtin_ia32_pminsd256((__v8si)__a, (__v8si)__b);
  291. }
  292. static __inline__ __m256i __DEFAULT_FN_ATTRS
  293. _mm256_min_epu8(__m256i __a, __m256i __b)
  294. {
  295. return (__m256i)__builtin_ia32_pminub256((__v32qi)__a, (__v32qi)__b);
  296. }
  297. static __inline__ __m256i __DEFAULT_FN_ATTRS
  298. _mm256_min_epu16(__m256i __a, __m256i __b)
  299. {
  300. return (__m256i)__builtin_ia32_pminuw256 ((__v16hi)__a, (__v16hi)__b);
  301. }
  302. static __inline__ __m256i __DEFAULT_FN_ATTRS
  303. _mm256_min_epu32(__m256i __a, __m256i __b)
  304. {
  305. return (__m256i)__builtin_ia32_pminud256((__v8si)__a, (__v8si)__b);
  306. }
  307. static __inline__ int __DEFAULT_FN_ATTRS
  308. _mm256_movemask_epi8(__m256i __a)
  309. {
  310. return __builtin_ia32_pmovmskb256((__v32qi)__a);
  311. }
  312. static __inline__ __m256i __DEFAULT_FN_ATTRS
  313. _mm256_cvtepi8_epi16(__m128i __V)
  314. {
  315. /* This function always performs a signed extension, but __v16qi is a char
  316. which may be signed or unsigned, so use __v16qs. */
  317. return (__m256i)__builtin_convertvector((__v16qs)__V, __v16hi);
  318. }
  319. static __inline__ __m256i __DEFAULT_FN_ATTRS
  320. _mm256_cvtepi8_epi32(__m128i __V)
  321. {
  322. /* This function always performs a signed extension, but __v16qi is a char
  323. which may be signed or unsigned, so use __v16qs. */
  324. return (__m256i)__builtin_convertvector(__builtin_shufflevector((__v16qs)__V, (__v16qs)__V, 0, 1, 2, 3, 4, 5, 6, 7), __v8si);
  325. }
  326. static __inline__ __m256i __DEFAULT_FN_ATTRS
  327. _mm256_cvtepi8_epi64(__m128i __V)
  328. {
  329. /* This function always performs a signed extension, but __v16qi is a char
  330. which may be signed or unsigned, so use __v16qs. */
  331. return (__m256i)__builtin_convertvector(__builtin_shufflevector((__v16qs)__V, (__v16qs)__V, 0, 1, 2, 3), __v4di);
  332. }
  333. static __inline__ __m256i __DEFAULT_FN_ATTRS
  334. _mm256_cvtepi16_epi32(__m128i __V)
  335. {
  336. return (__m256i)__builtin_convertvector((__v8hi)__V, __v8si);
  337. }
  338. static __inline__ __m256i __DEFAULT_FN_ATTRS
  339. _mm256_cvtepi16_epi64(__m128i __V)
  340. {
  341. return (__m256i)__builtin_convertvector(__builtin_shufflevector((__v8hi)__V, (__v8hi)__V, 0, 1, 2, 3), __v4di);
  342. }
  343. static __inline__ __m256i __DEFAULT_FN_ATTRS
  344. _mm256_cvtepi32_epi64(__m128i __V)
  345. {
  346. return (__m256i)__builtin_convertvector((__v4si)__V, __v4di);
  347. }
  348. static __inline__ __m256i __DEFAULT_FN_ATTRS
  349. _mm256_cvtepu8_epi16(__m128i __V)
  350. {
  351. return (__m256i)__builtin_convertvector((__v16qu)__V, __v16hi);
  352. }
  353. static __inline__ __m256i __DEFAULT_FN_ATTRS
  354. _mm256_cvtepu8_epi32(__m128i __V)
  355. {
  356. return (__m256i)__builtin_convertvector(__builtin_shufflevector((__v16qu)__V, (__v16qu)__V, 0, 1, 2, 3, 4, 5, 6, 7), __v8si);
  357. }
  358. static __inline__ __m256i __DEFAULT_FN_ATTRS
  359. _mm256_cvtepu8_epi64(__m128i __V)
  360. {
  361. return (__m256i)__builtin_convertvector(__builtin_shufflevector((__v16qu)__V, (__v16qu)__V, 0, 1, 2, 3), __v4di);
  362. }
  363. static __inline__ __m256i __DEFAULT_FN_ATTRS
  364. _mm256_cvtepu16_epi32(__m128i __V)
  365. {
  366. return (__m256i)__builtin_convertvector((__v8hu)__V, __v8si);
  367. }
  368. static __inline__ __m256i __DEFAULT_FN_ATTRS
  369. _mm256_cvtepu16_epi64(__m128i __V)
  370. {
  371. return (__m256i)__builtin_convertvector(__builtin_shufflevector((__v8hu)__V, (__v8hu)__V, 0, 1, 2, 3), __v4di);
  372. }
  373. static __inline__ __m256i __DEFAULT_FN_ATTRS
  374. _mm256_cvtepu32_epi64(__m128i __V)
  375. {
  376. return (__m256i)__builtin_convertvector((__v4su)__V, __v4di);
  377. }
  378. static __inline__ __m256i __DEFAULT_FN_ATTRS
  379. _mm256_mul_epi32(__m256i __a, __m256i __b)
  380. {
  381. return (__m256i)__builtin_ia32_pmuldq256((__v8si)__a, (__v8si)__b);
  382. }
  383. static __inline__ __m256i __DEFAULT_FN_ATTRS
  384. _mm256_mulhrs_epi16(__m256i __a, __m256i __b)
  385. {
  386. return (__m256i)__builtin_ia32_pmulhrsw256((__v16hi)__a, (__v16hi)__b);
  387. }
  388. static __inline__ __m256i __DEFAULT_FN_ATTRS
  389. _mm256_mulhi_epu16(__m256i __a, __m256i __b)
  390. {
  391. return (__m256i)__builtin_ia32_pmulhuw256((__v16hi)__a, (__v16hi)__b);
  392. }
  393. static __inline__ __m256i __DEFAULT_FN_ATTRS
  394. _mm256_mulhi_epi16(__m256i __a, __m256i __b)
  395. {
  396. return (__m256i)__builtin_ia32_pmulhw256((__v16hi)__a, (__v16hi)__b);
  397. }
  398. static __inline__ __m256i __DEFAULT_FN_ATTRS
  399. _mm256_mullo_epi16(__m256i __a, __m256i __b)
  400. {
  401. return (__m256i)((__v16hu)__a * (__v16hu)__b);
  402. }
  403. static __inline__ __m256i __DEFAULT_FN_ATTRS
  404. _mm256_mullo_epi32 (__m256i __a, __m256i __b)
  405. {
  406. return (__m256i)((__v8su)__a * (__v8su)__b);
  407. }
  408. static __inline__ __m256i __DEFAULT_FN_ATTRS
  409. _mm256_mul_epu32(__m256i __a, __m256i __b)
  410. {
  411. return __builtin_ia32_pmuludq256((__v8si)__a, (__v8si)__b);
  412. }
  413. static __inline__ __m256i __DEFAULT_FN_ATTRS
  414. _mm256_or_si256(__m256i __a, __m256i __b)
  415. {
  416. return (__m256i)((__v4du)__a | (__v4du)__b);
  417. }
  418. static __inline__ __m256i __DEFAULT_FN_ATTRS
  419. _mm256_sad_epu8(__m256i __a, __m256i __b)
  420. {
  421. return __builtin_ia32_psadbw256((__v32qi)__a, (__v32qi)__b);
  422. }
  423. static __inline__ __m256i __DEFAULT_FN_ATTRS
  424. _mm256_shuffle_epi8(__m256i __a, __m256i __b)
  425. {
  426. return (__m256i)__builtin_ia32_pshufb256((__v32qi)__a, (__v32qi)__b);
  427. }
  428. #define _mm256_shuffle_epi32(a, imm) __extension__ ({ \
  429. (__m256i)__builtin_shufflevector((__v8si)(__m256i)(a), \
  430. (__v8si)_mm256_undefined_si256(), \
  431. 0 + (((imm) >> 0) & 0x3), \
  432. 0 + (((imm) >> 2) & 0x3), \
  433. 0 + (((imm) >> 4) & 0x3), \
  434. 0 + (((imm) >> 6) & 0x3), \
  435. 4 + (((imm) >> 0) & 0x3), \
  436. 4 + (((imm) >> 2) & 0x3), \
  437. 4 + (((imm) >> 4) & 0x3), \
  438. 4 + (((imm) >> 6) & 0x3)); })
  439. #define _mm256_shufflehi_epi16(a, imm) __extension__ ({ \
  440. (__m256i)__builtin_shufflevector((__v16hi)(__m256i)(a), \
  441. (__v16hi)_mm256_undefined_si256(), \
  442. 0, 1, 2, 3, \
  443. 4 + (((imm) >> 0) & 0x3), \
  444. 4 + (((imm) >> 2) & 0x3), \
  445. 4 + (((imm) >> 4) & 0x3), \
  446. 4 + (((imm) >> 6) & 0x3), \
  447. 8, 9, 10, 11, \
  448. 12 + (((imm) >> 0) & 0x3), \
  449. 12 + (((imm) >> 2) & 0x3), \
  450. 12 + (((imm) >> 4) & 0x3), \
  451. 12 + (((imm) >> 6) & 0x3)); })
  452. #define _mm256_shufflelo_epi16(a, imm) __extension__ ({ \
  453. (__m256i)__builtin_shufflevector((__v16hi)(__m256i)(a), \
  454. (__v16hi)_mm256_undefined_si256(), \
  455. 0 + (((imm) >> 0) & 0x3), \
  456. 0 + (((imm) >> 2) & 0x3), \
  457. 0 + (((imm) >> 4) & 0x3), \
  458. 0 + (((imm) >> 6) & 0x3), \
  459. 4, 5, 6, 7, \
  460. 8 + (((imm) >> 0) & 0x3), \
  461. 8 + (((imm) >> 2) & 0x3), \
  462. 8 + (((imm) >> 4) & 0x3), \
  463. 8 + (((imm) >> 6) & 0x3), \
  464. 12, 13, 14, 15); })
  465. static __inline__ __m256i __DEFAULT_FN_ATTRS
  466. _mm256_sign_epi8(__m256i __a, __m256i __b)
  467. {
  468. return (__m256i)__builtin_ia32_psignb256((__v32qi)__a, (__v32qi)__b);
  469. }
  470. static __inline__ __m256i __DEFAULT_FN_ATTRS
  471. _mm256_sign_epi16(__m256i __a, __m256i __b)
  472. {
  473. return (__m256i)__builtin_ia32_psignw256((__v16hi)__a, (__v16hi)__b);
  474. }
  475. static __inline__ __m256i __DEFAULT_FN_ATTRS
  476. _mm256_sign_epi32(__m256i __a, __m256i __b)
  477. {
  478. return (__m256i)__builtin_ia32_psignd256((__v8si)__a, (__v8si)__b);
  479. }
  480. #define _mm256_slli_si256(a, imm) __extension__ ({ \
  481. (__m256i)__builtin_shufflevector( \
  482. (__v32qi)_mm256_setzero_si256(), \
  483. (__v32qi)(__m256i)(a), \
  484. ((char)(imm)&0xF0) ? 0 : ((char)(imm)>0x0 ? 16 : 32) - (char)(imm), \
  485. ((char)(imm)&0xF0) ? 1 : ((char)(imm)>0x1 ? 17 : 33) - (char)(imm), \
  486. ((char)(imm)&0xF0) ? 2 : ((char)(imm)>0x2 ? 18 : 34) - (char)(imm), \
  487. ((char)(imm)&0xF0) ? 3 : ((char)(imm)>0x3 ? 19 : 35) - (char)(imm), \
  488. ((char)(imm)&0xF0) ? 4 : ((char)(imm)>0x4 ? 20 : 36) - (char)(imm), \
  489. ((char)(imm)&0xF0) ? 5 : ((char)(imm)>0x5 ? 21 : 37) - (char)(imm), \
  490. ((char)(imm)&0xF0) ? 6 : ((char)(imm)>0x6 ? 22 : 38) - (char)(imm), \
  491. ((char)(imm)&0xF0) ? 7 : ((char)(imm)>0x7 ? 23 : 39) - (char)(imm), \
  492. ((char)(imm)&0xF0) ? 8 : ((char)(imm)>0x8 ? 24 : 40) - (char)(imm), \
  493. ((char)(imm)&0xF0) ? 9 : ((char)(imm)>0x9 ? 25 : 41) - (char)(imm), \
  494. ((char)(imm)&0xF0) ? 10 : ((char)(imm)>0xA ? 26 : 42) - (char)(imm), \
  495. ((char)(imm)&0xF0) ? 11 : ((char)(imm)>0xB ? 27 : 43) - (char)(imm), \
  496. ((char)(imm)&0xF0) ? 12 : ((char)(imm)>0xC ? 28 : 44) - (char)(imm), \
  497. ((char)(imm)&0xF0) ? 13 : ((char)(imm)>0xD ? 29 : 45) - (char)(imm), \
  498. ((char)(imm)&0xF0) ? 14 : ((char)(imm)>0xE ? 30 : 46) - (char)(imm), \
  499. ((char)(imm)&0xF0) ? 15 : ((char)(imm)>0xF ? 31 : 47) - (char)(imm), \
  500. ((char)(imm)&0xF0) ? 16 : ((char)(imm)>0x0 ? 32 : 48) - (char)(imm), \
  501. ((char)(imm)&0xF0) ? 17 : ((char)(imm)>0x1 ? 33 : 49) - (char)(imm), \
  502. ((char)(imm)&0xF0) ? 18 : ((char)(imm)>0x2 ? 34 : 50) - (char)(imm), \
  503. ((char)(imm)&0xF0) ? 19 : ((char)(imm)>0x3 ? 35 : 51) - (char)(imm), \
  504. ((char)(imm)&0xF0) ? 20 : ((char)(imm)>0x4 ? 36 : 52) - (char)(imm), \
  505. ((char)(imm)&0xF0) ? 21 : ((char)(imm)>0x5 ? 37 : 53) - (char)(imm), \
  506. ((char)(imm)&0xF0) ? 22 : ((char)(imm)>0x6 ? 38 : 54) - (char)(imm), \
  507. ((char)(imm)&0xF0) ? 23 : ((char)(imm)>0x7 ? 39 : 55) - (char)(imm), \
  508. ((char)(imm)&0xF0) ? 24 : ((char)(imm)>0x8 ? 40 : 56) - (char)(imm), \
  509. ((char)(imm)&0xF0) ? 25 : ((char)(imm)>0x9 ? 41 : 57) - (char)(imm), \
  510. ((char)(imm)&0xF0) ? 26 : ((char)(imm)>0xA ? 42 : 58) - (char)(imm), \
  511. ((char)(imm)&0xF0) ? 27 : ((char)(imm)>0xB ? 43 : 59) - (char)(imm), \
  512. ((char)(imm)&0xF0) ? 28 : ((char)(imm)>0xC ? 44 : 60) - (char)(imm), \
  513. ((char)(imm)&0xF0) ? 29 : ((char)(imm)>0xD ? 45 : 61) - (char)(imm), \
  514. ((char)(imm)&0xF0) ? 30 : ((char)(imm)>0xE ? 46 : 62) - (char)(imm), \
  515. ((char)(imm)&0xF0) ? 31 : ((char)(imm)>0xF ? 47 : 63) - (char)(imm)); })
  516. #define _mm256_bslli_epi128(a, count) _mm256_slli_si256((a), (count))
  517. static __inline__ __m256i __DEFAULT_FN_ATTRS
  518. _mm256_slli_epi16(__m256i __a, int __count)
  519. {
  520. return (__m256i)__builtin_ia32_psllwi256((__v16hi)__a, __count);
  521. }
  522. static __inline__ __m256i __DEFAULT_FN_ATTRS
  523. _mm256_sll_epi16(__m256i __a, __m128i __count)
  524. {
  525. return (__m256i)__builtin_ia32_psllw256((__v16hi)__a, (__v8hi)__count);
  526. }
  527. static __inline__ __m256i __DEFAULT_FN_ATTRS
  528. _mm256_slli_epi32(__m256i __a, int __count)
  529. {
  530. return (__m256i)__builtin_ia32_pslldi256((__v8si)__a, __count);
  531. }
  532. static __inline__ __m256i __DEFAULT_FN_ATTRS
  533. _mm256_sll_epi32(__m256i __a, __m128i __count)
  534. {
  535. return (__m256i)__builtin_ia32_pslld256((__v8si)__a, (__v4si)__count);
  536. }
  537. static __inline__ __m256i __DEFAULT_FN_ATTRS
  538. _mm256_slli_epi64(__m256i __a, int __count)
  539. {
  540. return __builtin_ia32_psllqi256((__v4di)__a, __count);
  541. }
  542. static __inline__ __m256i __DEFAULT_FN_ATTRS
  543. _mm256_sll_epi64(__m256i __a, __m128i __count)
  544. {
  545. return __builtin_ia32_psllq256((__v4di)__a, __count);
  546. }
  547. static __inline__ __m256i __DEFAULT_FN_ATTRS
  548. _mm256_srai_epi16(__m256i __a, int __count)
  549. {
  550. return (__m256i)__builtin_ia32_psrawi256((__v16hi)__a, __count);
  551. }
  552. static __inline__ __m256i __DEFAULT_FN_ATTRS
  553. _mm256_sra_epi16(__m256i __a, __m128i __count)
  554. {
  555. return (__m256i)__builtin_ia32_psraw256((__v16hi)__a, (__v8hi)__count);
  556. }
  557. static __inline__ __m256i __DEFAULT_FN_ATTRS
  558. _mm256_srai_epi32(__m256i __a, int __count)
  559. {
  560. return (__m256i)__builtin_ia32_psradi256((__v8si)__a, __count);
  561. }
  562. static __inline__ __m256i __DEFAULT_FN_ATTRS
  563. _mm256_sra_epi32(__m256i __a, __m128i __count)
  564. {
  565. return (__m256i)__builtin_ia32_psrad256((__v8si)__a, (__v4si)__count);
  566. }
  567. #define _mm256_srli_si256(a, imm) __extension__ ({ \
  568. (__m256i)__builtin_shufflevector( \
  569. (__v32qi)(__m256i)(a), \
  570. (__v32qi)_mm256_setzero_si256(), \
  571. ((char)(imm)&0xF0) ? 32 : (char)(imm) + ((char)(imm)>0xF ? 16 : 0), \
  572. ((char)(imm)&0xF0) ? 33 : (char)(imm) + ((char)(imm)>0xE ? 17 : 1), \
  573. ((char)(imm)&0xF0) ? 34 : (char)(imm) + ((char)(imm)>0xD ? 18 : 2), \
  574. ((char)(imm)&0xF0) ? 35 : (char)(imm) + ((char)(imm)>0xC ? 19 : 3), \
  575. ((char)(imm)&0xF0) ? 36 : (char)(imm) + ((char)(imm)>0xB ? 20 : 4), \
  576. ((char)(imm)&0xF0) ? 37 : (char)(imm) + ((char)(imm)>0xA ? 21 : 5), \
  577. ((char)(imm)&0xF0) ? 38 : (char)(imm) + ((char)(imm)>0x9 ? 22 : 6), \
  578. ((char)(imm)&0xF0) ? 39 : (char)(imm) + ((char)(imm)>0x8 ? 23 : 7), \
  579. ((char)(imm)&0xF0) ? 40 : (char)(imm) + ((char)(imm)>0x7 ? 24 : 8), \
  580. ((char)(imm)&0xF0) ? 41 : (char)(imm) + ((char)(imm)>0x6 ? 25 : 9), \
  581. ((char)(imm)&0xF0) ? 42 : (char)(imm) + ((char)(imm)>0x5 ? 26 : 10), \
  582. ((char)(imm)&0xF0) ? 43 : (char)(imm) + ((char)(imm)>0x4 ? 27 : 11), \
  583. ((char)(imm)&0xF0) ? 44 : (char)(imm) + ((char)(imm)>0x3 ? 28 : 12), \
  584. ((char)(imm)&0xF0) ? 45 : (char)(imm) + ((char)(imm)>0x2 ? 29 : 13), \
  585. ((char)(imm)&0xF0) ? 46 : (char)(imm) + ((char)(imm)>0x1 ? 30 : 14), \
  586. ((char)(imm)&0xF0) ? 47 : (char)(imm) + ((char)(imm)>0x0 ? 31 : 15), \
  587. ((char)(imm)&0xF0) ? 48 : (char)(imm) + ((char)(imm)>0xF ? 32 : 16), \
  588. ((char)(imm)&0xF0) ? 49 : (char)(imm) + ((char)(imm)>0xE ? 33 : 17), \
  589. ((char)(imm)&0xF0) ? 50 : (char)(imm) + ((char)(imm)>0xD ? 34 : 18), \
  590. ((char)(imm)&0xF0) ? 51 : (char)(imm) + ((char)(imm)>0xC ? 35 : 19), \
  591. ((char)(imm)&0xF0) ? 52 : (char)(imm) + ((char)(imm)>0xB ? 36 : 20), \
  592. ((char)(imm)&0xF0) ? 53 : (char)(imm) + ((char)(imm)>0xA ? 37 : 21), \
  593. ((char)(imm)&0xF0) ? 54 : (char)(imm) + ((char)(imm)>0x9 ? 38 : 22), \
  594. ((char)(imm)&0xF0) ? 55 : (char)(imm) + ((char)(imm)>0x8 ? 39 : 23), \
  595. ((char)(imm)&0xF0) ? 56 : (char)(imm) + ((char)(imm)>0x7 ? 40 : 24), \
  596. ((char)(imm)&0xF0) ? 57 : (char)(imm) + ((char)(imm)>0x6 ? 41 : 25), \
  597. ((char)(imm)&0xF0) ? 58 : (char)(imm) + ((char)(imm)>0x5 ? 42 : 26), \
  598. ((char)(imm)&0xF0) ? 59 : (char)(imm) + ((char)(imm)>0x4 ? 43 : 27), \
  599. ((char)(imm)&0xF0) ? 60 : (char)(imm) + ((char)(imm)>0x3 ? 44 : 28), \
  600. ((char)(imm)&0xF0) ? 61 : (char)(imm) + ((char)(imm)>0x2 ? 45 : 29), \
  601. ((char)(imm)&0xF0) ? 62 : (char)(imm) + ((char)(imm)>0x1 ? 46 : 30), \
  602. ((char)(imm)&0xF0) ? 63 : (char)(imm) + ((char)(imm)>0x0 ? 47 : 31)); })
  603. #define _mm256_bsrli_epi128(a, count) _mm256_srli_si256((a), (count))
  604. static __inline__ __m256i __DEFAULT_FN_ATTRS
  605. _mm256_srli_epi16(__m256i __a, int __count)
  606. {
  607. return (__m256i)__builtin_ia32_psrlwi256((__v16hi)__a, __count);
  608. }
  609. static __inline__ __m256i __DEFAULT_FN_ATTRS
  610. _mm256_srl_epi16(__m256i __a, __m128i __count)
  611. {
  612. return (__m256i)__builtin_ia32_psrlw256((__v16hi)__a, (__v8hi)__count);
  613. }
  614. static __inline__ __m256i __DEFAULT_FN_ATTRS
  615. _mm256_srli_epi32(__m256i __a, int __count)
  616. {
  617. return (__m256i)__builtin_ia32_psrldi256((__v8si)__a, __count);
  618. }
  619. static __inline__ __m256i __DEFAULT_FN_ATTRS
  620. _mm256_srl_epi32(__m256i __a, __m128i __count)
  621. {
  622. return (__m256i)__builtin_ia32_psrld256((__v8si)__a, (__v4si)__count);
  623. }
  624. static __inline__ __m256i __DEFAULT_FN_ATTRS
  625. _mm256_srli_epi64(__m256i __a, int __count)
  626. {
  627. return __builtin_ia32_psrlqi256((__v4di)__a, __count);
  628. }
  629. static __inline__ __m256i __DEFAULT_FN_ATTRS
  630. _mm256_srl_epi64(__m256i __a, __m128i __count)
  631. {
  632. return __builtin_ia32_psrlq256((__v4di)__a, __count);
  633. }
  634. static __inline__ __m256i __DEFAULT_FN_ATTRS
  635. _mm256_sub_epi8(__m256i __a, __m256i __b)
  636. {
  637. return (__m256i)((__v32qu)__a - (__v32qu)__b);
  638. }
  639. static __inline__ __m256i __DEFAULT_FN_ATTRS
  640. _mm256_sub_epi16(__m256i __a, __m256i __b)
  641. {
  642. return (__m256i)((__v16hu)__a - (__v16hu)__b);
  643. }
  644. static __inline__ __m256i __DEFAULT_FN_ATTRS
  645. _mm256_sub_epi32(__m256i __a, __m256i __b)
  646. {
  647. return (__m256i)((__v8su)__a - (__v8su)__b);
  648. }
  649. static __inline__ __m256i __DEFAULT_FN_ATTRS
  650. _mm256_sub_epi64(__m256i __a, __m256i __b)
  651. {
  652. return (__m256i)((__v4du)__a - (__v4du)__b);
  653. }
  654. static __inline__ __m256i __DEFAULT_FN_ATTRS
  655. _mm256_subs_epi8(__m256i __a, __m256i __b)
  656. {
  657. return (__m256i)__builtin_ia32_psubsb256((__v32qi)__a, (__v32qi)__b);
  658. }
  659. static __inline__ __m256i __DEFAULT_FN_ATTRS
  660. _mm256_subs_epi16(__m256i __a, __m256i __b)
  661. {
  662. return (__m256i)__builtin_ia32_psubsw256((__v16hi)__a, (__v16hi)__b);
  663. }
  664. static __inline__ __m256i __DEFAULT_FN_ATTRS
  665. _mm256_subs_epu8(__m256i __a, __m256i __b)
  666. {
  667. return (__m256i)__builtin_ia32_psubusb256((__v32qi)__a, (__v32qi)__b);
  668. }
  669. static __inline__ __m256i __DEFAULT_FN_ATTRS
  670. _mm256_subs_epu16(__m256i __a, __m256i __b)
  671. {
  672. return (__m256i)__builtin_ia32_psubusw256((__v16hi)__a, (__v16hi)__b);
  673. }
  674. static __inline__ __m256i __DEFAULT_FN_ATTRS
  675. _mm256_unpackhi_epi8(__m256i __a, __m256i __b)
  676. {
  677. return (__m256i)__builtin_shufflevector((__v32qi)__a, (__v32qi)__b, 8, 32+8, 9, 32+9, 10, 32+10, 11, 32+11, 12, 32+12, 13, 32+13, 14, 32+14, 15, 32+15, 24, 32+24, 25, 32+25, 26, 32+26, 27, 32+27, 28, 32+28, 29, 32+29, 30, 32+30, 31, 32+31);
  678. }
  679. static __inline__ __m256i __DEFAULT_FN_ATTRS
  680. _mm256_unpackhi_epi16(__m256i __a, __m256i __b)
  681. {
  682. return (__m256i)__builtin_shufflevector((__v16hi)__a, (__v16hi)__b, 4, 16+4, 5, 16+5, 6, 16+6, 7, 16+7, 12, 16+12, 13, 16+13, 14, 16+14, 15, 16+15);
  683. }
  684. static __inline__ __m256i __DEFAULT_FN_ATTRS
  685. _mm256_unpackhi_epi32(__m256i __a, __m256i __b)
  686. {
  687. return (__m256i)__builtin_shufflevector((__v8si)__a, (__v8si)__b, 2, 8+2, 3, 8+3, 6, 8+6, 7, 8+7);
  688. }
  689. static __inline__ __m256i __DEFAULT_FN_ATTRS
  690. _mm256_unpackhi_epi64(__m256i __a, __m256i __b)
  691. {
  692. return (__m256i)__builtin_shufflevector((__v4di)__a, (__v4di)__b, 1, 4+1, 3, 4+3);
  693. }
  694. static __inline__ __m256i __DEFAULT_FN_ATTRS
  695. _mm256_unpacklo_epi8(__m256i __a, __m256i __b)
  696. {
  697. return (__m256i)__builtin_shufflevector((__v32qi)__a, (__v32qi)__b, 0, 32+0, 1, 32+1, 2, 32+2, 3, 32+3, 4, 32+4, 5, 32+5, 6, 32+6, 7, 32+7, 16, 32+16, 17, 32+17, 18, 32+18, 19, 32+19, 20, 32+20, 21, 32+21, 22, 32+22, 23, 32+23);
  698. }
  699. static __inline__ __m256i __DEFAULT_FN_ATTRS
  700. _mm256_unpacklo_epi16(__m256i __a, __m256i __b)
  701. {
  702. return (__m256i)__builtin_shufflevector((__v16hi)__a, (__v16hi)__b, 0, 16+0, 1, 16+1, 2, 16+2, 3, 16+3, 8, 16+8, 9, 16+9, 10, 16+10, 11, 16+11);
  703. }
  704. static __inline__ __m256i __DEFAULT_FN_ATTRS
  705. _mm256_unpacklo_epi32(__m256i __a, __m256i __b)
  706. {
  707. return (__m256i)__builtin_shufflevector((__v8si)__a, (__v8si)__b, 0, 8+0, 1, 8+1, 4, 8+4, 5, 8+5);
  708. }
  709. static __inline__ __m256i __DEFAULT_FN_ATTRS
  710. _mm256_unpacklo_epi64(__m256i __a, __m256i __b)
  711. {
  712. return (__m256i)__builtin_shufflevector((__v4di)__a, (__v4di)__b, 0, 4+0, 2, 4+2);
  713. }
  714. static __inline__ __m256i __DEFAULT_FN_ATTRS
  715. _mm256_xor_si256(__m256i __a, __m256i __b)
  716. {
  717. return (__m256i)((__v4du)__a ^ (__v4du)__b);
  718. }
  719. static __inline__ __m256i __DEFAULT_FN_ATTRS
  720. _mm256_stream_load_si256(__m256i const *__V)
  721. {
  722. typedef __v4di __v4di_aligned __attribute__((aligned(32)));
  723. return (__m256i)__builtin_nontemporal_load((const __v4di_aligned *)__V);
  724. }
  725. static __inline__ __m128 __DEFAULT_FN_ATTRS
  726. _mm_broadcastss_ps(__m128 __X)
  727. {
  728. return (__m128)__builtin_shufflevector((__v4sf)__X, (__v4sf)__X, 0, 0, 0, 0);
  729. }
  730. static __inline__ __m128d __DEFAULT_FN_ATTRS
  731. _mm_broadcastsd_pd(__m128d __a)
  732. {
  733. return __builtin_shufflevector((__v2df)__a, (__v2df)__a, 0, 0);
  734. }
  735. static __inline__ __m256 __DEFAULT_FN_ATTRS
  736. _mm256_broadcastss_ps(__m128 __X)
  737. {
  738. return (__m256)__builtin_shufflevector((__v4sf)__X, (__v4sf)__X, 0, 0, 0, 0, 0, 0, 0, 0);
  739. }
  740. static __inline__ __m256d __DEFAULT_FN_ATTRS
  741. _mm256_broadcastsd_pd(__m128d __X)
  742. {
  743. return (__m256d)__builtin_shufflevector((__v2df)__X, (__v2df)__X, 0, 0, 0, 0);
  744. }
  745. static __inline__ __m256i __DEFAULT_FN_ATTRS
  746. _mm256_broadcastsi128_si256(__m128i __X)
  747. {
  748. return (__m256i)__builtin_shufflevector((__v2di)__X, (__v2di)__X, 0, 1, 0, 1);
  749. }
  750. #define _mm_blend_epi32(V1, V2, M) __extension__ ({ \
  751. (__m128i)__builtin_shufflevector((__v4si)(__m128i)(V1), \
  752. (__v4si)(__m128i)(V2), \
  753. (((M) & 0x01) ? 4 : 0), \
  754. (((M) & 0x02) ? 5 : 1), \
  755. (((M) & 0x04) ? 6 : 2), \
  756. (((M) & 0x08) ? 7 : 3)); })
  757. #define _mm256_blend_epi32(V1, V2, M) __extension__ ({ \
  758. (__m256i)__builtin_shufflevector((__v8si)(__m256i)(V1), \
  759. (__v8si)(__m256i)(V2), \
  760. (((M) & 0x01) ? 8 : 0), \
  761. (((M) & 0x02) ? 9 : 1), \
  762. (((M) & 0x04) ? 10 : 2), \
  763. (((M) & 0x08) ? 11 : 3), \
  764. (((M) & 0x10) ? 12 : 4), \
  765. (((M) & 0x20) ? 13 : 5), \
  766. (((M) & 0x40) ? 14 : 6), \
  767. (((M) & 0x80) ? 15 : 7)); })
  768. static __inline__ __m256i __DEFAULT_FN_ATTRS
  769. _mm256_broadcastb_epi8(__m128i __X)
  770. {
  771. return (__m256i)__builtin_shufflevector((__v16qi)__X, (__v16qi)__X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  772. }
  773. static __inline__ __m256i __DEFAULT_FN_ATTRS
  774. _mm256_broadcastw_epi16(__m128i __X)
  775. {
  776. return (__m256i)__builtin_shufflevector((__v8hi)__X, (__v8hi)__X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  777. }
  778. static __inline__ __m256i __DEFAULT_FN_ATTRS
  779. _mm256_broadcastd_epi32(__m128i __X)
  780. {
  781. return (__m256i)__builtin_shufflevector((__v4si)__X, (__v4si)__X, 0, 0, 0, 0, 0, 0, 0, 0);
  782. }
  783. static __inline__ __m256i __DEFAULT_FN_ATTRS
  784. _mm256_broadcastq_epi64(__m128i __X)
  785. {
  786. return (__m256i)__builtin_shufflevector((__v2di)__X, (__v2di)__X, 0, 0, 0, 0);
  787. }
  788. static __inline__ __m128i __DEFAULT_FN_ATTRS
  789. _mm_broadcastb_epi8(__m128i __X)
  790. {
  791. return (__m128i)__builtin_shufflevector((__v16qi)__X, (__v16qi)__X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  792. }
  793. static __inline__ __m128i __DEFAULT_FN_ATTRS
  794. _mm_broadcastw_epi16(__m128i __X)
  795. {
  796. return (__m128i)__builtin_shufflevector((__v8hi)__X, (__v8hi)__X, 0, 0, 0, 0, 0, 0, 0, 0);
  797. }
  798. static __inline__ __m128i __DEFAULT_FN_ATTRS
  799. _mm_broadcastd_epi32(__m128i __X)
  800. {
  801. return (__m128i)__builtin_shufflevector((__v4si)__X, (__v4si)__X, 0, 0, 0, 0);
  802. }
  803. static __inline__ __m128i __DEFAULT_FN_ATTRS
  804. _mm_broadcastq_epi64(__m128i __X)
  805. {
  806. return (__m128i)__builtin_shufflevector((__v2di)__X, (__v2di)__X, 0, 0);
  807. }
  808. static __inline__ __m256i __DEFAULT_FN_ATTRS
  809. _mm256_permutevar8x32_epi32(__m256i __a, __m256i __b)
  810. {
  811. return (__m256i)__builtin_ia32_permvarsi256((__v8si)__a, (__v8si)__b);
  812. }
  813. #define _mm256_permute4x64_pd(V, M) __extension__ ({ \
  814. (__m256d)__builtin_shufflevector((__v4df)(__m256d)(V), \
  815. (__v4df)_mm256_undefined_pd(), \
  816. ((M) >> 0) & 0x3, \
  817. ((M) >> 2) & 0x3, \
  818. ((M) >> 4) & 0x3, \
  819. ((M) >> 6) & 0x3); })
  820. static __inline__ __m256 __DEFAULT_FN_ATTRS
  821. _mm256_permutevar8x32_ps(__m256 __a, __m256i __b)
  822. {
  823. return (__m256)__builtin_ia32_permvarsf256((__v8sf)__a, (__v8si)__b);
  824. }
  825. #define _mm256_permute4x64_epi64(V, M) __extension__ ({ \
  826. (__m256i)__builtin_shufflevector((__v4di)(__m256i)(V), \
  827. (__v4di)_mm256_undefined_si256(), \
  828. ((M) >> 0) & 0x3, \
  829. ((M) >> 2) & 0x3, \
  830. ((M) >> 4) & 0x3, \
  831. ((M) >> 6) & 0x3); })
  832. #define _mm256_permute2x128_si256(V1, V2, M) __extension__ ({ \
  833. (__m256i)__builtin_ia32_permti256((__m256i)(V1), (__m256i)(V2), (M)); })
  834. #define _mm256_extracti128_si256(V, M) __extension__ ({ \
  835. (__m128i)__builtin_shufflevector((__v4di)(__m256i)(V), \
  836. (__v4di)_mm256_undefined_si256(), \
  837. (((M) & 1) ? 2 : 0), \
  838. (((M) & 1) ? 3 : 1) ); })
  839. #define _mm256_inserti128_si256(V1, V2, M) __extension__ ({ \
  840. (__m256i)__builtin_shufflevector((__v4di)(__m256i)(V1), \
  841. (__v4di)_mm256_castsi128_si256((__m128i)(V2)), \
  842. (((M) & 1) ? 0 : 4), \
  843. (((M) & 1) ? 1 : 5), \
  844. (((M) & 1) ? 4 : 2), \
  845. (((M) & 1) ? 5 : 3) ); })
  846. static __inline__ __m256i __DEFAULT_FN_ATTRS
  847. _mm256_maskload_epi32(int const *__X, __m256i __M)
  848. {
  849. return (__m256i)__builtin_ia32_maskloadd256((const __v8si *)__X, (__v8si)__M);
  850. }
  851. static __inline__ __m256i __DEFAULT_FN_ATTRS
  852. _mm256_maskload_epi64(long long const *__X, __m256i __M)
  853. {
  854. return (__m256i)__builtin_ia32_maskloadq256((const __v4di *)__X, (__v4di)__M);
  855. }
  856. static __inline__ __m128i __DEFAULT_FN_ATTRS
  857. _mm_maskload_epi32(int const *__X, __m128i __M)
  858. {
  859. return (__m128i)__builtin_ia32_maskloadd((const __v4si *)__X, (__v4si)__M);
  860. }
  861. static __inline__ __m128i __DEFAULT_FN_ATTRS
  862. _mm_maskload_epi64(long long const *__X, __m128i __M)
  863. {
  864. return (__m128i)__builtin_ia32_maskloadq((const __v2di *)__X, (__v2di)__M);
  865. }
  866. static __inline__ void __DEFAULT_FN_ATTRS
  867. _mm256_maskstore_epi32(int *__X, __m256i __M, __m256i __Y)
  868. {
  869. __builtin_ia32_maskstored256((__v8si *)__X, (__v8si)__M, (__v8si)__Y);
  870. }
  871. static __inline__ void __DEFAULT_FN_ATTRS
  872. _mm256_maskstore_epi64(long long *__X, __m256i __M, __m256i __Y)
  873. {
  874. __builtin_ia32_maskstoreq256((__v4di *)__X, (__v4di)__M, (__v4di)__Y);
  875. }
  876. static __inline__ void __DEFAULT_FN_ATTRS
  877. _mm_maskstore_epi32(int *__X, __m128i __M, __m128i __Y)
  878. {
  879. __builtin_ia32_maskstored((__v4si *)__X, (__v4si)__M, (__v4si)__Y);
  880. }
  881. static __inline__ void __DEFAULT_FN_ATTRS
  882. _mm_maskstore_epi64(long long *__X, __m128i __M, __m128i __Y)
  883. {
  884. __builtin_ia32_maskstoreq(( __v2di *)__X, (__v2di)__M, (__v2di)__Y);
  885. }
  886. static __inline__ __m256i __DEFAULT_FN_ATTRS
  887. _mm256_sllv_epi32(__m256i __X, __m256i __Y)
  888. {
  889. return (__m256i)__builtin_ia32_psllv8si((__v8si)__X, (__v8si)__Y);
  890. }
  891. static __inline__ __m128i __DEFAULT_FN_ATTRS
  892. _mm_sllv_epi32(__m128i __X, __m128i __Y)
  893. {
  894. return (__m128i)__builtin_ia32_psllv4si((__v4si)__X, (__v4si)__Y);
  895. }
  896. static __inline__ __m256i __DEFAULT_FN_ATTRS
  897. _mm256_sllv_epi64(__m256i __X, __m256i __Y)
  898. {
  899. return (__m256i)__builtin_ia32_psllv4di((__v4di)__X, (__v4di)__Y);
  900. }
  901. static __inline__ __m128i __DEFAULT_FN_ATTRS
  902. _mm_sllv_epi64(__m128i __X, __m128i __Y)
  903. {
  904. return (__m128i)__builtin_ia32_psllv2di((__v2di)__X, (__v2di)__Y);
  905. }
  906. static __inline__ __m256i __DEFAULT_FN_ATTRS
  907. _mm256_srav_epi32(__m256i __X, __m256i __Y)
  908. {
  909. return (__m256i)__builtin_ia32_psrav8si((__v8si)__X, (__v8si)__Y);
  910. }
  911. static __inline__ __m128i __DEFAULT_FN_ATTRS
  912. _mm_srav_epi32(__m128i __X, __m128i __Y)
  913. {
  914. return (__m128i)__builtin_ia32_psrav4si((__v4si)__X, (__v4si)__Y);
  915. }
  916. static __inline__ __m256i __DEFAULT_FN_ATTRS
  917. _mm256_srlv_epi32(__m256i __X, __m256i __Y)
  918. {
  919. return (__m256i)__builtin_ia32_psrlv8si((__v8si)__X, (__v8si)__Y);
  920. }
  921. static __inline__ __m128i __DEFAULT_FN_ATTRS
  922. _mm_srlv_epi32(__m128i __X, __m128i __Y)
  923. {
  924. return (__m128i)__builtin_ia32_psrlv4si((__v4si)__X, (__v4si)__Y);
  925. }
  926. static __inline__ __m256i __DEFAULT_FN_ATTRS
  927. _mm256_srlv_epi64(__m256i __X, __m256i __Y)
  928. {
  929. return (__m256i)__builtin_ia32_psrlv4di((__v4di)__X, (__v4di)__Y);
  930. }
  931. static __inline__ __m128i __DEFAULT_FN_ATTRS
  932. _mm_srlv_epi64(__m128i __X, __m128i __Y)
  933. {
  934. return (__m128i)__builtin_ia32_psrlv2di((__v2di)__X, (__v2di)__Y);
  935. }
  936. #define _mm_mask_i32gather_pd(a, m, i, mask, s) __extension__ ({ \
  937. (__m128d)__builtin_ia32_gatherd_pd((__v2df)(__m128i)(a), \
  938. (double const *)(m), \
  939. (__v4si)(__m128i)(i), \
  940. (__v2df)(__m128d)(mask), (s)); })
  941. #define _mm256_mask_i32gather_pd(a, m, i, mask, s) __extension__ ({ \
  942. (__m256d)__builtin_ia32_gatherd_pd256((__v4df)(__m256d)(a), \
  943. (double const *)(m), \
  944. (__v4si)(__m128i)(i), \
  945. (__v4df)(__m256d)(mask), (s)); })
  946. #define _mm_mask_i64gather_pd(a, m, i, mask, s) __extension__ ({ \
  947. (__m128d)__builtin_ia32_gatherq_pd((__v2df)(__m128d)(a), \
  948. (double const *)(m), \
  949. (__v2di)(__m128i)(i), \
  950. (__v2df)(__m128d)(mask), (s)); })
  951. #define _mm256_mask_i64gather_pd(a, m, i, mask, s) __extension__ ({ \
  952. (__m256d)__builtin_ia32_gatherq_pd256((__v4df)(__m256d)(a), \
  953. (double const *)(m), \
  954. (__v4di)(__m256i)(i), \
  955. (__v4df)(__m256d)(mask), (s)); })
  956. #define _mm_mask_i32gather_ps(a, m, i, mask, s) __extension__ ({ \
  957. (__m128)__builtin_ia32_gatherd_ps((__v4sf)(__m128)(a), \
  958. (float const *)(m), \
  959. (__v4si)(__m128i)(i), \
  960. (__v4sf)(__m128)(mask), (s)); })
  961. #define _mm256_mask_i32gather_ps(a, m, i, mask, s) __extension__ ({ \
  962. (__m256)__builtin_ia32_gatherd_ps256((__v8sf)(__m256)(a), \
  963. (float const *)(m), \
  964. (__v8si)(__m256i)(i), \
  965. (__v8sf)(__m256)(mask), (s)); })
  966. #define _mm_mask_i64gather_ps(a, m, i, mask, s) __extension__ ({ \
  967. (__m128)__builtin_ia32_gatherq_ps((__v4sf)(__m128)(a), \
  968. (float const *)(m), \
  969. (__v2di)(__m128i)(i), \
  970. (__v4sf)(__m128)(mask), (s)); })
  971. #define _mm256_mask_i64gather_ps(a, m, i, mask, s) __extension__ ({ \
  972. (__m128)__builtin_ia32_gatherq_ps256((__v4sf)(__m128)(a), \
  973. (float const *)(m), \
  974. (__v4di)(__m256i)(i), \
  975. (__v4sf)(__m128)(mask), (s)); })
  976. #define _mm_mask_i32gather_epi32(a, m, i, mask, s) __extension__ ({ \
  977. (__m128i)__builtin_ia32_gatherd_d((__v4si)(__m128i)(a), \
  978. (int const *)(m), \
  979. (__v4si)(__m128i)(i), \
  980. (__v4si)(__m128i)(mask), (s)); })
  981. #define _mm256_mask_i32gather_epi32(a, m, i, mask, s) __extension__ ({ \
  982. (__m256i)__builtin_ia32_gatherd_d256((__v8si)(__m256i)(a), \
  983. (int const *)(m), \
  984. (__v8si)(__m256i)(i), \
  985. (__v8si)(__m256i)(mask), (s)); })
  986. #define _mm_mask_i64gather_epi32(a, m, i, mask, s) __extension__ ({ \
  987. (__m128i)__builtin_ia32_gatherq_d((__v4si)(__m128i)(a), \
  988. (int const *)(m), \
  989. (__v2di)(__m128i)(i), \
  990. (__v4si)(__m128i)(mask), (s)); })
  991. #define _mm256_mask_i64gather_epi32(a, m, i, mask, s) __extension__ ({ \
  992. (__m128i)__builtin_ia32_gatherq_d256((__v4si)(__m128i)(a), \
  993. (int const *)(m), \
  994. (__v4di)(__m256i)(i), \
  995. (__v4si)(__m128i)(mask), (s)); })
  996. #define _mm_mask_i32gather_epi64(a, m, i, mask, s) __extension__ ({ \
  997. (__m128i)__builtin_ia32_gatherd_q((__v2di)(__m128i)(a), \
  998. (long long const *)(m), \
  999. (__v4si)(__m128i)(i), \
  1000. (__v2di)(__m128i)(mask), (s)); })
  1001. #define _mm256_mask_i32gather_epi64(a, m, i, mask, s) __extension__ ({ \
  1002. (__m256i)__builtin_ia32_gatherd_q256((__v4di)(__m256i)(a), \
  1003. (long long const *)(m), \
  1004. (__v4si)(__m128i)(i), \
  1005. (__v4di)(__m256i)(mask), (s)); })
  1006. #define _mm_mask_i64gather_epi64(a, m, i, mask, s) __extension__ ({ \
  1007. (__m128i)__builtin_ia32_gatherq_q((__v2di)(__m128i)(a), \
  1008. (long long const *)(m), \
  1009. (__v2di)(__m128i)(i), \
  1010. (__v2di)(__m128i)(mask), (s)); })
  1011. #define _mm256_mask_i64gather_epi64(a, m, i, mask, s) __extension__ ({ \
  1012. (__m256i)__builtin_ia32_gatherq_q256((__v4di)(__m256i)(a), \
  1013. (long long const *)(m), \
  1014. (__v4di)(__m256i)(i), \
  1015. (__v4di)(__m256i)(mask), (s)); })
  1016. #define _mm_i32gather_pd(m, i, s) __extension__ ({ \
  1017. (__m128d)__builtin_ia32_gatherd_pd((__v2df)_mm_undefined_pd(), \
  1018. (double const *)(m), \
  1019. (__v4si)(__m128i)(i), \
  1020. (__v2df)_mm_cmpeq_pd(_mm_setzero_pd(), \
  1021. _mm_setzero_pd()), \
  1022. (s)); })
  1023. #define _mm256_i32gather_pd(m, i, s) __extension__ ({ \
  1024. (__m256d)__builtin_ia32_gatherd_pd256((__v4df)_mm256_undefined_pd(), \
  1025. (double const *)(m), \
  1026. (__v4si)(__m128i)(i), \
  1027. (__v4df)_mm256_cmp_pd(_mm256_setzero_pd(), \
  1028. _mm256_setzero_pd(), \
  1029. _CMP_EQ_OQ), \
  1030. (s)); })
  1031. #define _mm_i64gather_pd(m, i, s) __extension__ ({ \
  1032. (__m128d)__builtin_ia32_gatherq_pd((__v2df)_mm_undefined_pd(), \
  1033. (double const *)(m), \
  1034. (__v2di)(__m128i)(i), \
  1035. (__v2df)_mm_cmpeq_pd(_mm_setzero_pd(), \
  1036. _mm_setzero_pd()), \
  1037. (s)); })
  1038. #define _mm256_i64gather_pd(m, i, s) __extension__ ({ \
  1039. (__m256d)__builtin_ia32_gatherq_pd256((__v4df)_mm256_undefined_pd(), \
  1040. (double const *)(m), \
  1041. (__v4di)(__m256i)(i), \
  1042. (__v4df)_mm256_cmp_pd(_mm256_setzero_pd(), \
  1043. _mm256_setzero_pd(), \
  1044. _CMP_EQ_OQ), \
  1045. (s)); })
  1046. #define _mm_i32gather_ps(m, i, s) __extension__ ({ \
  1047. (__m128)__builtin_ia32_gatherd_ps((__v4sf)_mm_undefined_ps(), \
  1048. (float const *)(m), \
  1049. (__v4si)(__m128i)(i), \
  1050. (__v4sf)_mm_cmpeq_ps(_mm_setzero_ps(), \
  1051. _mm_setzero_ps()), \
  1052. (s)); })
  1053. #define _mm256_i32gather_ps(m, i, s) __extension__ ({ \
  1054. (__m256)__builtin_ia32_gatherd_ps256((__v8sf)_mm256_undefined_ps(), \
  1055. (float const *)(m), \
  1056. (__v8si)(__m256i)(i), \
  1057. (__v8sf)_mm256_cmp_ps(_mm256_setzero_ps(), \
  1058. _mm256_setzero_ps(), \
  1059. _CMP_EQ_OQ), \
  1060. (s)); })
  1061. #define _mm_i64gather_ps(m, i, s) __extension__ ({ \
  1062. (__m128)__builtin_ia32_gatherq_ps((__v4sf)_mm_undefined_ps(), \
  1063. (float const *)(m), \
  1064. (__v2di)(__m128i)(i), \
  1065. (__v4sf)_mm_cmpeq_ps(_mm_setzero_ps(), \
  1066. _mm_setzero_ps()), \
  1067. (s)); })
  1068. #define _mm256_i64gather_ps(m, i, s) __extension__ ({ \
  1069. (__m128)__builtin_ia32_gatherq_ps256((__v4sf)_mm_undefined_ps(), \
  1070. (float const *)(m), \
  1071. (__v4di)(__m256i)(i), \
  1072. (__v4sf)_mm_cmpeq_ps(_mm_setzero_ps(), \
  1073. _mm_setzero_ps()), \
  1074. (s)); })
  1075. #define _mm_i32gather_epi32(m, i, s) __extension__ ({ \
  1076. (__m128i)__builtin_ia32_gatherd_d((__v4si)_mm_undefined_si128(), \
  1077. (int const *)(m), (__v4si)(__m128i)(i), \
  1078. (__v4si)_mm_set1_epi32(-1), (s)); })
  1079. #define _mm256_i32gather_epi32(m, i, s) __extension__ ({ \
  1080. (__m256i)__builtin_ia32_gatherd_d256((__v8si)_mm256_undefined_si256(), \
  1081. (int const *)(m), (__v8si)(__m256i)(i), \
  1082. (__v8si)_mm256_set1_epi32(-1), (s)); })
  1083. #define _mm_i64gather_epi32(m, i, s) __extension__ ({ \
  1084. (__m128i)__builtin_ia32_gatherq_d((__v4si)_mm_undefined_si128(), \
  1085. (int const *)(m), (__v2di)(__m128i)(i), \
  1086. (__v4si)_mm_set1_epi32(-1), (s)); })
  1087. #define _mm256_i64gather_epi32(m, i, s) __extension__ ({ \
  1088. (__m128i)__builtin_ia32_gatherq_d256((__v4si)_mm_undefined_si128(), \
  1089. (int const *)(m), (__v4di)(__m256i)(i), \
  1090. (__v4si)_mm_set1_epi32(-1), (s)); })
  1091. #define _mm_i32gather_epi64(m, i, s) __extension__ ({ \
  1092. (__m128i)__builtin_ia32_gatherd_q((__v2di)_mm_undefined_si128(), \
  1093. (long long const *)(m), \
  1094. (__v4si)(__m128i)(i), \
  1095. (__v2di)_mm_set1_epi64x(-1), (s)); })
  1096. #define _mm256_i32gather_epi64(m, i, s) __extension__ ({ \
  1097. (__m256i)__builtin_ia32_gatherd_q256((__v4di)_mm256_undefined_si256(), \
  1098. (long long const *)(m), \
  1099. (__v4si)(__m128i)(i), \
  1100. (__v4di)_mm256_set1_epi64x(-1), (s)); })
  1101. #define _mm_i64gather_epi64(m, i, s) __extension__ ({ \
  1102. (__m128i)__builtin_ia32_gatherq_q((__v2di)_mm_undefined_si128(), \
  1103. (long long const *)(m), \
  1104. (__v2di)(__m128i)(i), \
  1105. (__v2di)_mm_set1_epi64x(-1), (s)); })
  1106. #define _mm256_i64gather_epi64(m, i, s) __extension__ ({ \
  1107. (__m256i)__builtin_ia32_gatherq_q256((__v4di)_mm256_undefined_si256(), \
  1108. (long long const *)(m), \
  1109. (__v4di)(__m256i)(i), \
  1110. (__v4di)_mm256_set1_epi64x(-1), (s)); })
  1111. #undef __DEFAULT_FN_ATTRS
  1112. #endif /* __AVX2INTRIN_H */