avx512dqintrin.h 83 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679
  1. /* Copyright (C) 2014-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 <avx512dqintrin.h> directly; include <immintrin.h> instead."
  20. #endif
  21. #ifndef _AVX512DQINTRIN_H_INCLUDED
  22. #define _AVX512DQINTRIN_H_INCLUDED
  23. #ifndef __AVX512DQ__
  24. #pragma GCC push_options
  25. #pragma GCC target("avx512dq")
  26. #define __DISABLE_AVX512DQ__
  27. #endif /* __AVX512DQ__ */
  28. extern __inline unsigned char
  29. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  30. _ktest_mask8_u8 (__mmask8 __A, __mmask8 __B, unsigned char *__CF)
  31. {
  32. *__CF = (unsigned char) __builtin_ia32_ktestcqi (__A, __B);
  33. return (unsigned char) __builtin_ia32_ktestzqi (__A, __B);
  34. }
  35. extern __inline unsigned char
  36. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  37. _ktestz_mask8_u8 (__mmask8 __A, __mmask8 __B)
  38. {
  39. return (unsigned char) __builtin_ia32_ktestzqi (__A, __B);
  40. }
  41. extern __inline unsigned char
  42. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  43. _ktestc_mask8_u8 (__mmask8 __A, __mmask8 __B)
  44. {
  45. return (unsigned char) __builtin_ia32_ktestcqi (__A, __B);
  46. }
  47. extern __inline unsigned char
  48. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  49. _ktest_mask16_u8 (__mmask16 __A, __mmask16 __B, unsigned char *__CF)
  50. {
  51. *__CF = (unsigned char) __builtin_ia32_ktestchi (__A, __B);
  52. return (unsigned char) __builtin_ia32_ktestzhi (__A, __B);
  53. }
  54. extern __inline unsigned char
  55. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  56. _ktestz_mask16_u8 (__mmask16 __A, __mmask16 __B)
  57. {
  58. return (unsigned char) __builtin_ia32_ktestzhi (__A, __B);
  59. }
  60. extern __inline unsigned char
  61. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  62. _ktestc_mask16_u8 (__mmask16 __A, __mmask16 __B)
  63. {
  64. return (unsigned char) __builtin_ia32_ktestchi (__A, __B);
  65. }
  66. extern __inline unsigned char
  67. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  68. _kortest_mask8_u8 (__mmask8 __A, __mmask8 __B, unsigned char *__CF)
  69. {
  70. *__CF = (unsigned char) __builtin_ia32_kortestcqi (__A, __B);
  71. return (unsigned char) __builtin_ia32_kortestzqi (__A, __B);
  72. }
  73. extern __inline unsigned char
  74. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  75. _kortestz_mask8_u8 (__mmask8 __A, __mmask8 __B)
  76. {
  77. return (unsigned char) __builtin_ia32_kortestzqi (__A, __B);
  78. }
  79. extern __inline unsigned char
  80. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  81. _kortestc_mask8_u8 (__mmask8 __A, __mmask8 __B)
  82. {
  83. return (unsigned char) __builtin_ia32_kortestcqi (__A, __B);
  84. }
  85. extern __inline __mmask8
  86. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  87. _kadd_mask8 (__mmask8 __A, __mmask8 __B)
  88. {
  89. return (__mmask8) __builtin_ia32_kaddqi ((__mmask8) __A, (__mmask8) __B);
  90. }
  91. extern __inline __mmask16
  92. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  93. _kadd_mask16 (__mmask16 __A, __mmask16 __B)
  94. {
  95. return (__mmask16) __builtin_ia32_kaddhi ((__mmask16) __A, (__mmask16) __B);
  96. }
  97. extern __inline unsigned int
  98. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  99. _cvtmask8_u32 (__mmask8 __A)
  100. {
  101. return (unsigned int) __builtin_ia32_kmovb ((__mmask8 ) __A);
  102. }
  103. extern __inline __mmask8
  104. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  105. _cvtu32_mask8 (unsigned int __A)
  106. {
  107. return (__mmask8) __builtin_ia32_kmovb ((__mmask8) __A);
  108. }
  109. extern __inline __mmask8
  110. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  111. _load_mask8 (__mmask8 *__A)
  112. {
  113. return (__mmask8) __builtin_ia32_kmovb (*(__mmask8 *) __A);
  114. }
  115. extern __inline void
  116. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  117. _store_mask8 (__mmask8 *__A, __mmask8 __B)
  118. {
  119. *(__mmask8 *) __A = __builtin_ia32_kmovb (__B);
  120. }
  121. extern __inline __mmask8
  122. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  123. _knot_mask8 (__mmask8 __A)
  124. {
  125. return (__mmask8) __builtin_ia32_knotqi ((__mmask8) __A);
  126. }
  127. extern __inline __mmask8
  128. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  129. _kor_mask8 (__mmask8 __A, __mmask8 __B)
  130. {
  131. return (__mmask8) __builtin_ia32_korqi ((__mmask8) __A, (__mmask8) __B);
  132. }
  133. extern __inline __mmask8
  134. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  135. _kxnor_mask8 (__mmask8 __A, __mmask8 __B)
  136. {
  137. return (__mmask8) __builtin_ia32_kxnorqi ((__mmask8) __A, (__mmask8) __B);
  138. }
  139. extern __inline __mmask8
  140. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  141. _kxor_mask8 (__mmask8 __A, __mmask8 __B)
  142. {
  143. return (__mmask8) __builtin_ia32_kxorqi ((__mmask8) __A, (__mmask8) __B);
  144. }
  145. extern __inline __mmask8
  146. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  147. _kand_mask8 (__mmask8 __A, __mmask8 __B)
  148. {
  149. return (__mmask8) __builtin_ia32_kandqi ((__mmask8) __A, (__mmask8) __B);
  150. }
  151. extern __inline __mmask8
  152. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  153. _kandn_mask8 (__mmask8 __A, __mmask8 __B)
  154. {
  155. return (__mmask8) __builtin_ia32_kandnqi ((__mmask8) __A, (__mmask8) __B);
  156. }
  157. extern __inline __m512d
  158. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  159. _mm512_broadcast_f64x2 (__m128d __A)
  160. {
  161. return (__m512d)
  162. __builtin_ia32_broadcastf64x2_512_mask ((__v2df) __A,
  163. _mm512_undefined_pd (),
  164. (__mmask8) -1);
  165. }
  166. extern __inline __m512d
  167. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  168. _mm512_mask_broadcast_f64x2 (__m512d __O, __mmask8 __M, __m128d __A)
  169. {
  170. return (__m512d) __builtin_ia32_broadcastf64x2_512_mask ((__v2df)
  171. __A,
  172. (__v8df)
  173. __O, __M);
  174. }
  175. extern __inline __m512d
  176. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  177. _mm512_maskz_broadcast_f64x2 (__mmask8 __M, __m128d __A)
  178. {
  179. return (__m512d) __builtin_ia32_broadcastf64x2_512_mask ((__v2df)
  180. __A,
  181. (__v8df)
  182. _mm512_setzero_ps (),
  183. __M);
  184. }
  185. extern __inline __m512i
  186. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  187. _mm512_broadcast_i64x2 (__m128i __A)
  188. {
  189. return (__m512i)
  190. __builtin_ia32_broadcasti64x2_512_mask ((__v2di) __A,
  191. _mm512_undefined_epi32 (),
  192. (__mmask8) -1);
  193. }
  194. extern __inline __m512i
  195. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  196. _mm512_mask_broadcast_i64x2 (__m512i __O, __mmask8 __M, __m128i __A)
  197. {
  198. return (__m512i) __builtin_ia32_broadcasti64x2_512_mask ((__v2di)
  199. __A,
  200. (__v8di)
  201. __O, __M);
  202. }
  203. extern __inline __m512i
  204. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  205. _mm512_maskz_broadcast_i64x2 (__mmask8 __M, __m128i __A)
  206. {
  207. return (__m512i) __builtin_ia32_broadcasti64x2_512_mask ((__v2di)
  208. __A,
  209. (__v8di)
  210. _mm512_setzero_si512 (),
  211. __M);
  212. }
  213. extern __inline __m512
  214. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  215. _mm512_broadcast_f32x2 (__m128 __A)
  216. {
  217. return (__m512)
  218. __builtin_ia32_broadcastf32x2_512_mask ((__v4sf) __A,
  219. (__v16sf)_mm512_undefined_ps (),
  220. (__mmask16) -1);
  221. }
  222. extern __inline __m512
  223. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  224. _mm512_mask_broadcast_f32x2 (__m512 __O, __mmask16 __M, __m128 __A)
  225. {
  226. return (__m512) __builtin_ia32_broadcastf32x2_512_mask ((__v4sf) __A,
  227. (__v16sf)
  228. __O, __M);
  229. }
  230. extern __inline __m512
  231. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  232. _mm512_maskz_broadcast_f32x2 (__mmask16 __M, __m128 __A)
  233. {
  234. return (__m512) __builtin_ia32_broadcastf32x2_512_mask ((__v4sf) __A,
  235. (__v16sf)
  236. _mm512_setzero_ps (),
  237. __M);
  238. }
  239. extern __inline __m512i
  240. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  241. _mm512_broadcast_i32x2 (__m128i __A)
  242. {
  243. return (__m512i)
  244. __builtin_ia32_broadcasti32x2_512_mask ((__v4si) __A,
  245. (__v16si)
  246. _mm512_undefined_epi32 (),
  247. (__mmask16) -1);
  248. }
  249. extern __inline __m512i
  250. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  251. _mm512_mask_broadcast_i32x2 (__m512i __O, __mmask16 __M, __m128i __A)
  252. {
  253. return (__m512i) __builtin_ia32_broadcasti32x2_512_mask ((__v4si)
  254. __A,
  255. (__v16si)
  256. __O, __M);
  257. }
  258. extern __inline __m512i
  259. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  260. _mm512_maskz_broadcast_i32x2 (__mmask16 __M, __m128i __A)
  261. {
  262. return (__m512i) __builtin_ia32_broadcasti32x2_512_mask ((__v4si)
  263. __A,
  264. (__v16si)
  265. _mm512_setzero_si512 (),
  266. __M);
  267. }
  268. extern __inline __m512
  269. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  270. _mm512_broadcast_f32x8 (__m256 __A)
  271. {
  272. return (__m512)
  273. __builtin_ia32_broadcastf32x8_512_mask ((__v8sf) __A,
  274. _mm512_undefined_ps (),
  275. (__mmask16) -1);
  276. }
  277. extern __inline __m512
  278. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  279. _mm512_mask_broadcast_f32x8 (__m512 __O, __mmask16 __M, __m256 __A)
  280. {
  281. return (__m512) __builtin_ia32_broadcastf32x8_512_mask ((__v8sf) __A,
  282. (__v16sf)__O,
  283. __M);
  284. }
  285. extern __inline __m512
  286. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  287. _mm512_maskz_broadcast_f32x8 (__mmask16 __M, __m256 __A)
  288. {
  289. return (__m512) __builtin_ia32_broadcastf32x8_512_mask ((__v8sf) __A,
  290. (__v16sf)
  291. _mm512_setzero_ps (),
  292. __M);
  293. }
  294. extern __inline __m512i
  295. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  296. _mm512_broadcast_i32x8 (__m256i __A)
  297. {
  298. return (__m512i)
  299. __builtin_ia32_broadcasti32x8_512_mask ((__v8si) __A,
  300. (__v16si)
  301. _mm512_undefined_epi32 (),
  302. (__mmask16) -1);
  303. }
  304. extern __inline __m512i
  305. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  306. _mm512_mask_broadcast_i32x8 (__m512i __O, __mmask16 __M, __m256i __A)
  307. {
  308. return (__m512i) __builtin_ia32_broadcasti32x8_512_mask ((__v8si)
  309. __A,
  310. (__v16si)__O,
  311. __M);
  312. }
  313. extern __inline __m512i
  314. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  315. _mm512_maskz_broadcast_i32x8 (__mmask16 __M, __m256i __A)
  316. {
  317. return (__m512i) __builtin_ia32_broadcasti32x8_512_mask ((__v8si)
  318. __A,
  319. (__v16si)
  320. _mm512_setzero_si512 (),
  321. __M);
  322. }
  323. extern __inline __m512i
  324. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  325. _mm512_mullo_epi64 (__m512i __A, __m512i __B)
  326. {
  327. return (__m512i) ((__v8du) __A * (__v8du) __B);
  328. }
  329. extern __inline __m512i
  330. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  331. _mm512_mask_mullo_epi64 (__m512i __W, __mmask8 __U, __m512i __A,
  332. __m512i __B)
  333. {
  334. return (__m512i) __builtin_ia32_pmullq512_mask ((__v8di) __A,
  335. (__v8di) __B,
  336. (__v8di) __W,
  337. (__mmask8) __U);
  338. }
  339. extern __inline __m512i
  340. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  341. _mm512_maskz_mullo_epi64 (__mmask8 __U, __m512i __A, __m512i __B)
  342. {
  343. return (__m512i) __builtin_ia32_pmullq512_mask ((__v8di) __A,
  344. (__v8di) __B,
  345. (__v8di)
  346. _mm512_setzero_si512 (),
  347. (__mmask8) __U);
  348. }
  349. extern __inline __m512d
  350. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  351. _mm512_xor_pd (__m512d __A, __m512d __B)
  352. {
  353. return (__m512d) __builtin_ia32_xorpd512_mask ((__v8df) __A,
  354. (__v8df) __B,
  355. (__v8df)
  356. _mm512_setzero_pd (),
  357. (__mmask8) -1);
  358. }
  359. extern __inline __m512d
  360. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  361. _mm512_mask_xor_pd (__m512d __W, __mmask8 __U, __m512d __A,
  362. __m512d __B)
  363. {
  364. return (__m512d) __builtin_ia32_xorpd512_mask ((__v8df) __A,
  365. (__v8df) __B,
  366. (__v8df) __W,
  367. (__mmask8) __U);
  368. }
  369. extern __inline __m512d
  370. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  371. _mm512_maskz_xor_pd (__mmask8 __U, __m512d __A, __m512d __B)
  372. {
  373. return (__m512d) __builtin_ia32_xorpd512_mask ((__v8df) __A,
  374. (__v8df) __B,
  375. (__v8df)
  376. _mm512_setzero_pd (),
  377. (__mmask8) __U);
  378. }
  379. extern __inline __m512
  380. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  381. _mm512_xor_ps (__m512 __A, __m512 __B)
  382. {
  383. return (__m512) __builtin_ia32_xorps512_mask ((__v16sf) __A,
  384. (__v16sf) __B,
  385. (__v16sf)
  386. _mm512_setzero_ps (),
  387. (__mmask16) -1);
  388. }
  389. extern __inline __m512
  390. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  391. _mm512_mask_xor_ps (__m512 __W, __mmask16 __U, __m512 __A, __m512 __B)
  392. {
  393. return (__m512) __builtin_ia32_xorps512_mask ((__v16sf) __A,
  394. (__v16sf) __B,
  395. (__v16sf) __W,
  396. (__mmask16) __U);
  397. }
  398. extern __inline __m512
  399. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  400. _mm512_maskz_xor_ps (__mmask16 __U, __m512 __A, __m512 __B)
  401. {
  402. return (__m512) __builtin_ia32_xorps512_mask ((__v16sf) __A,
  403. (__v16sf) __B,
  404. (__v16sf)
  405. _mm512_setzero_ps (),
  406. (__mmask16) __U);
  407. }
  408. extern __inline __m512d
  409. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  410. _mm512_or_pd (__m512d __A, __m512d __B)
  411. {
  412. return (__m512d) __builtin_ia32_orpd512_mask ((__v8df) __A,
  413. (__v8df) __B,
  414. (__v8df)
  415. _mm512_setzero_pd (),
  416. (__mmask8) -1);
  417. }
  418. extern __inline __m512d
  419. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  420. _mm512_mask_or_pd (__m512d __W, __mmask8 __U, __m512d __A, __m512d __B)
  421. {
  422. return (__m512d) __builtin_ia32_orpd512_mask ((__v8df) __A,
  423. (__v8df) __B,
  424. (__v8df) __W,
  425. (__mmask8) __U);
  426. }
  427. extern __inline __m512d
  428. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  429. _mm512_maskz_or_pd (__mmask8 __U, __m512d __A, __m512d __B)
  430. {
  431. return (__m512d) __builtin_ia32_orpd512_mask ((__v8df) __A,
  432. (__v8df) __B,
  433. (__v8df)
  434. _mm512_setzero_pd (),
  435. (__mmask8) __U);
  436. }
  437. extern __inline __m512
  438. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  439. _mm512_or_ps (__m512 __A, __m512 __B)
  440. {
  441. return (__m512) __builtin_ia32_orps512_mask ((__v16sf) __A,
  442. (__v16sf) __B,
  443. (__v16sf)
  444. _mm512_setzero_ps (),
  445. (__mmask16) -1);
  446. }
  447. extern __inline __m512
  448. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  449. _mm512_mask_or_ps (__m512 __W, __mmask16 __U, __m512 __A, __m512 __B)
  450. {
  451. return (__m512) __builtin_ia32_orps512_mask ((__v16sf) __A,
  452. (__v16sf) __B,
  453. (__v16sf) __W,
  454. (__mmask16) __U);
  455. }
  456. extern __inline __m512
  457. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  458. _mm512_maskz_or_ps (__mmask16 __U, __m512 __A, __m512 __B)
  459. {
  460. return (__m512) __builtin_ia32_orps512_mask ((__v16sf) __A,
  461. (__v16sf) __B,
  462. (__v16sf)
  463. _mm512_setzero_ps (),
  464. (__mmask16) __U);
  465. }
  466. extern __inline __m512d
  467. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  468. _mm512_and_pd (__m512d __A, __m512d __B)
  469. {
  470. return (__m512d) __builtin_ia32_andpd512_mask ((__v8df) __A,
  471. (__v8df) __B,
  472. (__v8df)
  473. _mm512_setzero_pd (),
  474. (__mmask8) -1);
  475. }
  476. extern __inline __m512d
  477. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  478. _mm512_mask_and_pd (__m512d __W, __mmask8 __U, __m512d __A,
  479. __m512d __B)
  480. {
  481. return (__m512d) __builtin_ia32_andpd512_mask ((__v8df) __A,
  482. (__v8df) __B,
  483. (__v8df) __W,
  484. (__mmask8) __U);
  485. }
  486. extern __inline __m512d
  487. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  488. _mm512_maskz_and_pd (__mmask8 __U, __m512d __A, __m512d __B)
  489. {
  490. return (__m512d) __builtin_ia32_andpd512_mask ((__v8df) __A,
  491. (__v8df) __B,
  492. (__v8df)
  493. _mm512_setzero_pd (),
  494. (__mmask8) __U);
  495. }
  496. extern __inline __m512
  497. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  498. _mm512_and_ps (__m512 __A, __m512 __B)
  499. {
  500. return (__m512) __builtin_ia32_andps512_mask ((__v16sf) __A,
  501. (__v16sf) __B,
  502. (__v16sf)
  503. _mm512_setzero_ps (),
  504. (__mmask16) -1);
  505. }
  506. extern __inline __m512
  507. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  508. _mm512_mask_and_ps (__m512 __W, __mmask16 __U, __m512 __A, __m512 __B)
  509. {
  510. return (__m512) __builtin_ia32_andps512_mask ((__v16sf) __A,
  511. (__v16sf) __B,
  512. (__v16sf) __W,
  513. (__mmask16) __U);
  514. }
  515. extern __inline __m512
  516. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  517. _mm512_maskz_and_ps (__mmask16 __U, __m512 __A, __m512 __B)
  518. {
  519. return (__m512) __builtin_ia32_andps512_mask ((__v16sf) __A,
  520. (__v16sf) __B,
  521. (__v16sf)
  522. _mm512_setzero_ps (),
  523. (__mmask16) __U);
  524. }
  525. extern __inline __m512d
  526. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  527. _mm512_andnot_pd (__m512d __A, __m512d __B)
  528. {
  529. return (__m512d) __builtin_ia32_andnpd512_mask ((__v8df) __A,
  530. (__v8df) __B,
  531. (__v8df)
  532. _mm512_setzero_pd (),
  533. (__mmask8) -1);
  534. }
  535. extern __inline __m512d
  536. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  537. _mm512_mask_andnot_pd (__m512d __W, __mmask8 __U, __m512d __A,
  538. __m512d __B)
  539. {
  540. return (__m512d) __builtin_ia32_andnpd512_mask ((__v8df) __A,
  541. (__v8df) __B,
  542. (__v8df) __W,
  543. (__mmask8) __U);
  544. }
  545. extern __inline __m512d
  546. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  547. _mm512_maskz_andnot_pd (__mmask8 __U, __m512d __A, __m512d __B)
  548. {
  549. return (__m512d) __builtin_ia32_andnpd512_mask ((__v8df) __A,
  550. (__v8df) __B,
  551. (__v8df)
  552. _mm512_setzero_pd (),
  553. (__mmask8) __U);
  554. }
  555. extern __inline __m512
  556. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  557. _mm512_andnot_ps (__m512 __A, __m512 __B)
  558. {
  559. return (__m512) __builtin_ia32_andnps512_mask ((__v16sf) __A,
  560. (__v16sf) __B,
  561. (__v16sf)
  562. _mm512_setzero_ps (),
  563. (__mmask16) -1);
  564. }
  565. extern __inline __m512
  566. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  567. _mm512_mask_andnot_ps (__m512 __W, __mmask16 __U, __m512 __A,
  568. __m512 __B)
  569. {
  570. return (__m512) __builtin_ia32_andnps512_mask ((__v16sf) __A,
  571. (__v16sf) __B,
  572. (__v16sf) __W,
  573. (__mmask16) __U);
  574. }
  575. extern __inline __m512
  576. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  577. _mm512_maskz_andnot_ps (__mmask16 __U, __m512 __A, __m512 __B)
  578. {
  579. return (__m512) __builtin_ia32_andnps512_mask ((__v16sf) __A,
  580. (__v16sf) __B,
  581. (__v16sf)
  582. _mm512_setzero_ps (),
  583. (__mmask16) __U);
  584. }
  585. extern __inline __mmask16
  586. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  587. _mm512_movepi32_mask (__m512i __A)
  588. {
  589. return (__mmask16) __builtin_ia32_cvtd2mask512 ((__v16si) __A);
  590. }
  591. extern __inline __mmask8
  592. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  593. _mm512_movepi64_mask (__m512i __A)
  594. {
  595. return (__mmask8) __builtin_ia32_cvtq2mask512 ((__v8di) __A);
  596. }
  597. extern __inline __m512i
  598. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  599. _mm512_movm_epi32 (__mmask16 __A)
  600. {
  601. return (__m512i) __builtin_ia32_cvtmask2d512 (__A);
  602. }
  603. extern __inline __m512i
  604. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  605. _mm512_movm_epi64 (__mmask8 __A)
  606. {
  607. return (__m512i) __builtin_ia32_cvtmask2q512 (__A);
  608. }
  609. extern __inline __m512i
  610. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  611. _mm512_cvttpd_epi64 (__m512d __A)
  612. {
  613. return (__m512i) __builtin_ia32_cvttpd2qq512_mask ((__v8df) __A,
  614. (__v8di)
  615. _mm512_setzero_si512 (),
  616. (__mmask8) -1,
  617. _MM_FROUND_CUR_DIRECTION);
  618. }
  619. extern __inline __m512i
  620. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  621. _mm512_mask_cvttpd_epi64 (__m512i __W, __mmask8 __U, __m512d __A)
  622. {
  623. return (__m512i) __builtin_ia32_cvttpd2qq512_mask ((__v8df) __A,
  624. (__v8di) __W,
  625. (__mmask8) __U,
  626. _MM_FROUND_CUR_DIRECTION);
  627. }
  628. extern __inline __m512i
  629. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  630. _mm512_maskz_cvttpd_epi64 (__mmask8 __U, __m512d __A)
  631. {
  632. return (__m512i) __builtin_ia32_cvttpd2qq512_mask ((__v8df) __A,
  633. (__v8di)
  634. _mm512_setzero_si512 (),
  635. (__mmask8) __U,
  636. _MM_FROUND_CUR_DIRECTION);
  637. }
  638. extern __inline __m512i
  639. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  640. _mm512_cvttpd_epu64 (__m512d __A)
  641. {
  642. return (__m512i) __builtin_ia32_cvttpd2uqq512_mask ((__v8df) __A,
  643. (__v8di)
  644. _mm512_setzero_si512 (),
  645. (__mmask8) -1,
  646. _MM_FROUND_CUR_DIRECTION);
  647. }
  648. extern __inline __m512i
  649. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  650. _mm512_mask_cvttpd_epu64 (__m512i __W, __mmask8 __U, __m512d __A)
  651. {
  652. return (__m512i) __builtin_ia32_cvttpd2uqq512_mask ((__v8df) __A,
  653. (__v8di) __W,
  654. (__mmask8) __U,
  655. _MM_FROUND_CUR_DIRECTION);
  656. }
  657. extern __inline __m512i
  658. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  659. _mm512_maskz_cvttpd_epu64 (__mmask8 __U, __m512d __A)
  660. {
  661. return (__m512i) __builtin_ia32_cvttpd2uqq512_mask ((__v8df) __A,
  662. (__v8di)
  663. _mm512_setzero_si512 (),
  664. (__mmask8) __U,
  665. _MM_FROUND_CUR_DIRECTION);
  666. }
  667. extern __inline __m512i
  668. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  669. _mm512_cvttps_epi64 (__m256 __A)
  670. {
  671. return (__m512i) __builtin_ia32_cvttps2qq512_mask ((__v8sf) __A,
  672. (__v8di)
  673. _mm512_setzero_si512 (),
  674. (__mmask8) -1,
  675. _MM_FROUND_CUR_DIRECTION);
  676. }
  677. extern __inline __m512i
  678. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  679. _mm512_mask_cvttps_epi64 (__m512i __W, __mmask8 __U, __m256 __A)
  680. {
  681. return (__m512i) __builtin_ia32_cvttps2qq512_mask ((__v8sf) __A,
  682. (__v8di) __W,
  683. (__mmask8) __U,
  684. _MM_FROUND_CUR_DIRECTION);
  685. }
  686. extern __inline __m512i
  687. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  688. _mm512_maskz_cvttps_epi64 (__mmask8 __U, __m256 __A)
  689. {
  690. return (__m512i) __builtin_ia32_cvttps2qq512_mask ((__v8sf) __A,
  691. (__v8di)
  692. _mm512_setzero_si512 (),
  693. (__mmask8) __U,
  694. _MM_FROUND_CUR_DIRECTION);
  695. }
  696. extern __inline __m512i
  697. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  698. _mm512_cvttps_epu64 (__m256 __A)
  699. {
  700. return (__m512i) __builtin_ia32_cvttps2uqq512_mask ((__v8sf) __A,
  701. (__v8di)
  702. _mm512_setzero_si512 (),
  703. (__mmask8) -1,
  704. _MM_FROUND_CUR_DIRECTION);
  705. }
  706. extern __inline __m512i
  707. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  708. _mm512_mask_cvttps_epu64 (__m512i __W, __mmask8 __U, __m256 __A)
  709. {
  710. return (__m512i) __builtin_ia32_cvttps2uqq512_mask ((__v8sf) __A,
  711. (__v8di) __W,
  712. (__mmask8) __U,
  713. _MM_FROUND_CUR_DIRECTION);
  714. }
  715. extern __inline __m512i
  716. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  717. _mm512_maskz_cvttps_epu64 (__mmask8 __U, __m256 __A)
  718. {
  719. return (__m512i) __builtin_ia32_cvttps2uqq512_mask ((__v8sf) __A,
  720. (__v8di)
  721. _mm512_setzero_si512 (),
  722. (__mmask8) __U,
  723. _MM_FROUND_CUR_DIRECTION);
  724. }
  725. extern __inline __m512i
  726. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  727. _mm512_cvtpd_epi64 (__m512d __A)
  728. {
  729. return (__m512i) __builtin_ia32_cvtpd2qq512_mask ((__v8df) __A,
  730. (__v8di)
  731. _mm512_setzero_si512 (),
  732. (__mmask8) -1,
  733. _MM_FROUND_CUR_DIRECTION);
  734. }
  735. extern __inline __m512i
  736. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  737. _mm512_mask_cvtpd_epi64 (__m512i __W, __mmask8 __U, __m512d __A)
  738. {
  739. return (__m512i) __builtin_ia32_cvtpd2qq512_mask ((__v8df) __A,
  740. (__v8di) __W,
  741. (__mmask8) __U,
  742. _MM_FROUND_CUR_DIRECTION);
  743. }
  744. extern __inline __m512i
  745. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  746. _mm512_maskz_cvtpd_epi64 (__mmask8 __U, __m512d __A)
  747. {
  748. return (__m512i) __builtin_ia32_cvtpd2qq512_mask ((__v8df) __A,
  749. (__v8di)
  750. _mm512_setzero_si512 (),
  751. (__mmask8) __U,
  752. _MM_FROUND_CUR_DIRECTION);
  753. }
  754. extern __inline __m512i
  755. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  756. _mm512_cvtpd_epu64 (__m512d __A)
  757. {
  758. return (__m512i) __builtin_ia32_cvtpd2uqq512_mask ((__v8df) __A,
  759. (__v8di)
  760. _mm512_setzero_si512 (),
  761. (__mmask8) -1,
  762. _MM_FROUND_CUR_DIRECTION);
  763. }
  764. extern __inline __m512i
  765. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  766. _mm512_mask_cvtpd_epu64 (__m512i __W, __mmask8 __U, __m512d __A)
  767. {
  768. return (__m512i) __builtin_ia32_cvtpd2uqq512_mask ((__v8df) __A,
  769. (__v8di) __W,
  770. (__mmask8) __U,
  771. _MM_FROUND_CUR_DIRECTION);
  772. }
  773. extern __inline __m512i
  774. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  775. _mm512_maskz_cvtpd_epu64 (__mmask8 __U, __m512d __A)
  776. {
  777. return (__m512i) __builtin_ia32_cvtpd2uqq512_mask ((__v8df) __A,
  778. (__v8di)
  779. _mm512_setzero_si512 (),
  780. (__mmask8) __U,
  781. _MM_FROUND_CUR_DIRECTION);
  782. }
  783. extern __inline __m512i
  784. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  785. _mm512_cvtps_epi64 (__m256 __A)
  786. {
  787. return (__m512i) __builtin_ia32_cvtps2qq512_mask ((__v8sf) __A,
  788. (__v8di)
  789. _mm512_setzero_si512 (),
  790. (__mmask8) -1,
  791. _MM_FROUND_CUR_DIRECTION);
  792. }
  793. extern __inline __m512i
  794. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  795. _mm512_mask_cvtps_epi64 (__m512i __W, __mmask8 __U, __m256 __A)
  796. {
  797. return (__m512i) __builtin_ia32_cvtps2qq512_mask ((__v8sf) __A,
  798. (__v8di) __W,
  799. (__mmask8) __U,
  800. _MM_FROUND_CUR_DIRECTION);
  801. }
  802. extern __inline __m512i
  803. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  804. _mm512_maskz_cvtps_epi64 (__mmask8 __U, __m256 __A)
  805. {
  806. return (__m512i) __builtin_ia32_cvtps2qq512_mask ((__v8sf) __A,
  807. (__v8di)
  808. _mm512_setzero_si512 (),
  809. (__mmask8) __U,
  810. _MM_FROUND_CUR_DIRECTION);
  811. }
  812. extern __inline __m512i
  813. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  814. _mm512_cvtps_epu64 (__m256 __A)
  815. {
  816. return (__m512i) __builtin_ia32_cvtps2uqq512_mask ((__v8sf) __A,
  817. (__v8di)
  818. _mm512_setzero_si512 (),
  819. (__mmask8) -1,
  820. _MM_FROUND_CUR_DIRECTION);
  821. }
  822. extern __inline __m512i
  823. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  824. _mm512_mask_cvtps_epu64 (__m512i __W, __mmask8 __U, __m256 __A)
  825. {
  826. return (__m512i) __builtin_ia32_cvtps2uqq512_mask ((__v8sf) __A,
  827. (__v8di) __W,
  828. (__mmask8) __U,
  829. _MM_FROUND_CUR_DIRECTION);
  830. }
  831. extern __inline __m512i
  832. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  833. _mm512_maskz_cvtps_epu64 (__mmask8 __U, __m256 __A)
  834. {
  835. return (__m512i) __builtin_ia32_cvtps2uqq512_mask ((__v8sf) __A,
  836. (__v8di)
  837. _mm512_setzero_si512 (),
  838. (__mmask8) __U,
  839. _MM_FROUND_CUR_DIRECTION);
  840. }
  841. extern __inline __m256
  842. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  843. _mm512_cvtepi64_ps (__m512i __A)
  844. {
  845. return (__m256) __builtin_ia32_cvtqq2ps512_mask ((__v8di) __A,
  846. (__v8sf)
  847. _mm256_setzero_ps (),
  848. (__mmask8) -1,
  849. _MM_FROUND_CUR_DIRECTION);
  850. }
  851. extern __inline __m256
  852. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  853. _mm512_mask_cvtepi64_ps (__m256 __W, __mmask8 __U, __m512i __A)
  854. {
  855. return (__m256) __builtin_ia32_cvtqq2ps512_mask ((__v8di) __A,
  856. (__v8sf) __W,
  857. (__mmask8) __U,
  858. _MM_FROUND_CUR_DIRECTION);
  859. }
  860. extern __inline __m256
  861. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  862. _mm512_maskz_cvtepi64_ps (__mmask8 __U, __m512i __A)
  863. {
  864. return (__m256) __builtin_ia32_cvtqq2ps512_mask ((__v8di) __A,
  865. (__v8sf)
  866. _mm256_setzero_ps (),
  867. (__mmask8) __U,
  868. _MM_FROUND_CUR_DIRECTION);
  869. }
  870. extern __inline __m256
  871. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  872. _mm512_cvtepu64_ps (__m512i __A)
  873. {
  874. return (__m256) __builtin_ia32_cvtuqq2ps512_mask ((__v8di) __A,
  875. (__v8sf)
  876. _mm256_setzero_ps (),
  877. (__mmask8) -1,
  878. _MM_FROUND_CUR_DIRECTION);
  879. }
  880. extern __inline __m256
  881. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  882. _mm512_mask_cvtepu64_ps (__m256 __W, __mmask8 __U, __m512i __A)
  883. {
  884. return (__m256) __builtin_ia32_cvtuqq2ps512_mask ((__v8di) __A,
  885. (__v8sf) __W,
  886. (__mmask8) __U,
  887. _MM_FROUND_CUR_DIRECTION);
  888. }
  889. extern __inline __m256
  890. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  891. _mm512_maskz_cvtepu64_ps (__mmask8 __U, __m512i __A)
  892. {
  893. return (__m256) __builtin_ia32_cvtuqq2ps512_mask ((__v8di) __A,
  894. (__v8sf)
  895. _mm256_setzero_ps (),
  896. (__mmask8) __U,
  897. _MM_FROUND_CUR_DIRECTION);
  898. }
  899. extern __inline __m512d
  900. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  901. _mm512_cvtepi64_pd (__m512i __A)
  902. {
  903. return (__m512d) __builtin_ia32_cvtqq2pd512_mask ((__v8di) __A,
  904. (__v8df)
  905. _mm512_setzero_pd (),
  906. (__mmask8) -1,
  907. _MM_FROUND_CUR_DIRECTION);
  908. }
  909. extern __inline __m512d
  910. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  911. _mm512_mask_cvtepi64_pd (__m512d __W, __mmask8 __U, __m512i __A)
  912. {
  913. return (__m512d) __builtin_ia32_cvtqq2pd512_mask ((__v8di) __A,
  914. (__v8df) __W,
  915. (__mmask8) __U,
  916. _MM_FROUND_CUR_DIRECTION);
  917. }
  918. extern __inline __m512d
  919. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  920. _mm512_maskz_cvtepi64_pd (__mmask8 __U, __m512i __A)
  921. {
  922. return (__m512d) __builtin_ia32_cvtqq2pd512_mask ((__v8di) __A,
  923. (__v8df)
  924. _mm512_setzero_pd (),
  925. (__mmask8) __U,
  926. _MM_FROUND_CUR_DIRECTION);
  927. }
  928. extern __inline __m512d
  929. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  930. _mm512_cvtepu64_pd (__m512i __A)
  931. {
  932. return (__m512d) __builtin_ia32_cvtuqq2pd512_mask ((__v8di) __A,
  933. (__v8df)
  934. _mm512_setzero_pd (),
  935. (__mmask8) -1,
  936. _MM_FROUND_CUR_DIRECTION);
  937. }
  938. extern __inline __m512d
  939. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  940. _mm512_mask_cvtepu64_pd (__m512d __W, __mmask8 __U, __m512i __A)
  941. {
  942. return (__m512d) __builtin_ia32_cvtuqq2pd512_mask ((__v8di) __A,
  943. (__v8df) __W,
  944. (__mmask8) __U,
  945. _MM_FROUND_CUR_DIRECTION);
  946. }
  947. extern __inline __m512d
  948. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  949. _mm512_maskz_cvtepu64_pd (__mmask8 __U, __m512i __A)
  950. {
  951. return (__m512d) __builtin_ia32_cvtuqq2pd512_mask ((__v8di) __A,
  952. (__v8df)
  953. _mm512_setzero_pd (),
  954. (__mmask8) __U,
  955. _MM_FROUND_CUR_DIRECTION);
  956. }
  957. #ifdef __OPTIMIZE__
  958. extern __inline __mmask8
  959. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  960. _kshiftli_mask8 (__mmask8 __A, unsigned int __B)
  961. {
  962. return (__mmask8) __builtin_ia32_kshiftliqi ((__mmask8) __A, (__mmask8) __B);
  963. }
  964. extern __inline __mmask8
  965. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  966. _kshiftri_mask8 (__mmask8 __A, unsigned int __B)
  967. {
  968. return (__mmask8) __builtin_ia32_kshiftriqi ((__mmask8) __A, (__mmask8) __B);
  969. }
  970. extern __inline __m512d
  971. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  972. _mm512_range_pd (__m512d __A, __m512d __B, int __C)
  973. {
  974. return (__m512d) __builtin_ia32_rangepd512_mask ((__v8df) __A,
  975. (__v8df) __B, __C,
  976. (__v8df)
  977. _mm512_setzero_pd (),
  978. (__mmask8) -1,
  979. _MM_FROUND_CUR_DIRECTION);
  980. }
  981. extern __inline __m512d
  982. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  983. _mm512_mask_range_pd (__m512d __W, __mmask8 __U,
  984. __m512d __A, __m512d __B, int __C)
  985. {
  986. return (__m512d) __builtin_ia32_rangepd512_mask ((__v8df) __A,
  987. (__v8df) __B, __C,
  988. (__v8df) __W,
  989. (__mmask8) __U,
  990. _MM_FROUND_CUR_DIRECTION);
  991. }
  992. extern __inline __m512d
  993. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  994. _mm512_maskz_range_pd (__mmask8 __U, __m512d __A, __m512d __B, int __C)
  995. {
  996. return (__m512d) __builtin_ia32_rangepd512_mask ((__v8df) __A,
  997. (__v8df) __B, __C,
  998. (__v8df)
  999. _mm512_setzero_pd (),
  1000. (__mmask8) __U,
  1001. _MM_FROUND_CUR_DIRECTION);
  1002. }
  1003. extern __inline __m512
  1004. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1005. _mm512_range_ps (__m512 __A, __m512 __B, int __C)
  1006. {
  1007. return (__m512) __builtin_ia32_rangeps512_mask ((__v16sf) __A,
  1008. (__v16sf) __B, __C,
  1009. (__v16sf)
  1010. _mm512_setzero_ps (),
  1011. (__mmask16) -1,
  1012. _MM_FROUND_CUR_DIRECTION);
  1013. }
  1014. extern __inline __m512
  1015. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1016. _mm512_mask_range_ps (__m512 __W, __mmask16 __U,
  1017. __m512 __A, __m512 __B, int __C)
  1018. {
  1019. return (__m512) __builtin_ia32_rangeps512_mask ((__v16sf) __A,
  1020. (__v16sf) __B, __C,
  1021. (__v16sf) __W,
  1022. (__mmask16) __U,
  1023. _MM_FROUND_CUR_DIRECTION);
  1024. }
  1025. extern __inline __m512
  1026. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1027. _mm512_maskz_range_ps (__mmask16 __U, __m512 __A, __m512 __B, int __C)
  1028. {
  1029. return (__m512) __builtin_ia32_rangeps512_mask ((__v16sf) __A,
  1030. (__v16sf) __B, __C,
  1031. (__v16sf)
  1032. _mm512_setzero_ps (),
  1033. (__mmask16) __U,
  1034. _MM_FROUND_CUR_DIRECTION);
  1035. }
  1036. extern __inline __m128d
  1037. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1038. _mm_reduce_sd (__m128d __A, __m128d __B, int __C)
  1039. {
  1040. return (__m128d) __builtin_ia32_reducesd_mask ((__v2df) __A,
  1041. (__v2df) __B, __C,
  1042. (__v2df) _mm_setzero_pd (),
  1043. (__mmask8) -1);
  1044. }
  1045. extern __inline __m128d
  1046. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1047. _mm_mask_reduce_sd (__m128d __W, __mmask8 __U, __m128d __A,
  1048. __m128d __B, int __C)
  1049. {
  1050. return (__m128d) __builtin_ia32_reducesd_mask ((__v2df) __A,
  1051. (__v2df) __B, __C,
  1052. (__v2df) __W,
  1053. (__mmask8) __U);
  1054. }
  1055. extern __inline __m128d
  1056. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1057. _mm_maskz_reduce_sd (__mmask8 __U, __m128d __A, __m128d __B, int __C)
  1058. {
  1059. return (__m128d) __builtin_ia32_reducesd_mask ((__v2df) __A,
  1060. (__v2df) __B, __C,
  1061. (__v2df) _mm_setzero_pd (),
  1062. (__mmask8) __U);
  1063. }
  1064. extern __inline __m128
  1065. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1066. _mm_reduce_ss (__m128 __A, __m128 __B, int __C)
  1067. {
  1068. return (__m128) __builtin_ia32_reducess_mask ((__v4sf) __A,
  1069. (__v4sf) __B, __C,
  1070. (__v4sf) _mm_setzero_ps (),
  1071. (__mmask8) -1);
  1072. }
  1073. extern __inline __m128
  1074. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1075. _mm_mask_reduce_ss (__m128 __W, __mmask8 __U, __m128 __A,
  1076. __m128 __B, int __C)
  1077. {
  1078. return (__m128) __builtin_ia32_reducess_mask ((__v4sf) __A,
  1079. (__v4sf) __B, __C,
  1080. (__v4sf) __W,
  1081. (__mmask8) __U);
  1082. }
  1083. extern __inline __m128
  1084. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1085. _mm_maskz_reduce_ss (__mmask8 __U, __m128 __A, __m128 __B, int __C)
  1086. {
  1087. return (__m128) __builtin_ia32_reducess_mask ((__v4sf) __A,
  1088. (__v4sf) __B, __C,
  1089. (__v4sf) _mm_setzero_ps (),
  1090. (__mmask8) __U);
  1091. }
  1092. extern __inline __m128d
  1093. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1094. _mm_range_sd (__m128d __A, __m128d __B, int __C)
  1095. {
  1096. return (__m128d) __builtin_ia32_rangesd128_mask_round ((__v2df) __A,
  1097. (__v2df) __B, __C,
  1098. (__v2df)
  1099. _mm_setzero_pd (),
  1100. (__mmask8) -1,
  1101. _MM_FROUND_CUR_DIRECTION);
  1102. }
  1103. extern __inline __m128d
  1104. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1105. _mm_mask_range_sd (__m128d __W, __mmask8 __U, __m128d __A, __m128d __B, int __C)
  1106. {
  1107. return (__m128d) __builtin_ia32_rangesd128_mask_round ((__v2df) __A,
  1108. (__v2df) __B, __C,
  1109. (__v2df) __W,
  1110. (__mmask8) __U,
  1111. _MM_FROUND_CUR_DIRECTION);
  1112. }
  1113. extern __inline __m128d
  1114. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1115. _mm_maskz_range_sd (__mmask8 __U, __m128d __A, __m128d __B, int __C)
  1116. {
  1117. return (__m128d) __builtin_ia32_rangesd128_mask_round ((__v2df) __A,
  1118. (__v2df) __B, __C,
  1119. (__v2df)
  1120. _mm_setzero_pd (),
  1121. (__mmask8) __U,
  1122. _MM_FROUND_CUR_DIRECTION);
  1123. }
  1124. extern __inline __m128
  1125. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1126. _mm_range_ss (__m128 __A, __m128 __B, int __C)
  1127. {
  1128. return (__m128) __builtin_ia32_rangess128_mask_round ((__v4sf) __A,
  1129. (__v4sf) __B, __C,
  1130. (__v4sf)
  1131. _mm_setzero_ps (),
  1132. (__mmask8) -1,
  1133. _MM_FROUND_CUR_DIRECTION);
  1134. }
  1135. extern __inline __m128
  1136. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1137. _mm_mask_range_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B, int __C)
  1138. {
  1139. return (__m128) __builtin_ia32_rangess128_mask_round ((__v4sf) __A,
  1140. (__v4sf) __B, __C,
  1141. (__v4sf) __W,
  1142. (__mmask8) __U,
  1143. _MM_FROUND_CUR_DIRECTION);
  1144. }
  1145. extern __inline __m128
  1146. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1147. _mm_maskz_range_ss (__mmask8 __U, __m128 __A, __m128 __B, int __C)
  1148. {
  1149. return (__m128) __builtin_ia32_rangess128_mask_round ((__v4sf) __A,
  1150. (__v4sf) __B, __C,
  1151. (__v4sf)
  1152. _mm_setzero_ps (),
  1153. (__mmask8) __U,
  1154. _MM_FROUND_CUR_DIRECTION);
  1155. }
  1156. extern __inline __m128d
  1157. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1158. _mm_range_round_sd (__m128d __A, __m128d __B, int __C, const int __R)
  1159. {
  1160. return (__m128d) __builtin_ia32_rangesd128_mask_round ((__v2df) __A,
  1161. (__v2df) __B, __C,
  1162. (__v2df)
  1163. _mm_setzero_pd (),
  1164. (__mmask8) -1, __R);
  1165. }
  1166. extern __inline __m128d
  1167. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1168. _mm_mask_range_round_sd (__m128d __W, __mmask8 __U, __m128d __A, __m128d __B,
  1169. int __C, const int __R)
  1170. {
  1171. return (__m128d) __builtin_ia32_rangesd128_mask_round ((__v2df) __A,
  1172. (__v2df) __B, __C,
  1173. (__v2df) __W,
  1174. (__mmask8) __U, __R);
  1175. }
  1176. extern __inline __m128d
  1177. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1178. _mm_maskz_range_round_sd (__mmask8 __U, __m128d __A, __m128d __B, int __C,
  1179. const int __R)
  1180. {
  1181. return (__m128d) __builtin_ia32_rangesd128_mask_round ((__v2df) __A,
  1182. (__v2df) __B, __C,
  1183. (__v2df)
  1184. _mm_setzero_pd (),
  1185. (__mmask8) __U, __R);
  1186. }
  1187. extern __inline __m128
  1188. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1189. _mm_range_round_ss (__m128 __A, __m128 __B, int __C, const int __R)
  1190. {
  1191. return (__m128) __builtin_ia32_rangess128_mask_round ((__v4sf) __A,
  1192. (__v4sf) __B, __C,
  1193. (__v4sf)
  1194. _mm_setzero_ps (),
  1195. (__mmask8) -1, __R);
  1196. }
  1197. extern __inline __m128
  1198. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1199. _mm_mask_range_round_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B,
  1200. int __C, const int __R)
  1201. {
  1202. return (__m128) __builtin_ia32_rangess128_mask_round ((__v4sf) __A,
  1203. (__v4sf) __B, __C,
  1204. (__v4sf) __W,
  1205. (__mmask8) __U, __R);
  1206. }
  1207. extern __inline __m128
  1208. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1209. _mm_maskz_range_round_ss (__mmask8 __U, __m128 __A, __m128 __B, int __C,
  1210. const int __R)
  1211. {
  1212. return (__m128) __builtin_ia32_rangess128_mask_round ((__v4sf) __A,
  1213. (__v4sf) __B, __C,
  1214. (__v4sf)
  1215. _mm_setzero_ps (),
  1216. (__mmask8) __U, __R);
  1217. }
  1218. extern __inline __mmask8
  1219. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1220. _mm_fpclass_ss_mask (__m128 __A, const int __imm)
  1221. {
  1222. return (__mmask8) __builtin_ia32_fpclassss ((__v4sf) __A, __imm);
  1223. }
  1224. extern __inline __mmask8
  1225. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1226. _mm_fpclass_sd_mask (__m128d __A, const int __imm)
  1227. {
  1228. return (__mmask8) __builtin_ia32_fpclasssd ((__v2df) __A, __imm);
  1229. }
  1230. extern __inline __m512i
  1231. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1232. _mm512_cvtt_roundpd_epi64 (__m512d __A, const int __R)
  1233. {
  1234. return (__m512i) __builtin_ia32_cvttpd2qq512_mask ((__v8df) __A,
  1235. (__v8di)
  1236. _mm512_setzero_si512 (),
  1237. (__mmask8) -1,
  1238. __R);
  1239. }
  1240. extern __inline __m512i
  1241. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1242. _mm512_mask_cvtt_roundpd_epi64 (__m512i __W, __mmask8 __U, __m512d __A,
  1243. const int __R)
  1244. {
  1245. return (__m512i) __builtin_ia32_cvttpd2qq512_mask ((__v8df) __A,
  1246. (__v8di) __W,
  1247. (__mmask8) __U,
  1248. __R);
  1249. }
  1250. extern __inline __m512i
  1251. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1252. _mm512_maskz_cvtt_roundpd_epi64 (__mmask8 __U, __m512d __A,
  1253. const int __R)
  1254. {
  1255. return (__m512i) __builtin_ia32_cvttpd2qq512_mask ((__v8df) __A,
  1256. (__v8di)
  1257. _mm512_setzero_si512 (),
  1258. (__mmask8) __U,
  1259. __R);
  1260. }
  1261. extern __inline __m512i
  1262. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1263. _mm512_cvtt_roundpd_epu64 (__m512d __A, const int __R)
  1264. {
  1265. return (__m512i) __builtin_ia32_cvttpd2uqq512_mask ((__v8df) __A,
  1266. (__v8di)
  1267. _mm512_setzero_si512 (),
  1268. (__mmask8) -1,
  1269. __R);
  1270. }
  1271. extern __inline __m512i
  1272. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1273. _mm512_mask_cvtt_roundpd_epu64 (__m512i __W, __mmask8 __U, __m512d __A,
  1274. const int __R)
  1275. {
  1276. return (__m512i) __builtin_ia32_cvttpd2uqq512_mask ((__v8df) __A,
  1277. (__v8di) __W,
  1278. (__mmask8) __U,
  1279. __R);
  1280. }
  1281. extern __inline __m512i
  1282. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1283. _mm512_maskz_cvtt_roundpd_epu64 (__mmask8 __U, __m512d __A,
  1284. const int __R)
  1285. {
  1286. return (__m512i) __builtin_ia32_cvttpd2uqq512_mask ((__v8df) __A,
  1287. (__v8di)
  1288. _mm512_setzero_si512 (),
  1289. (__mmask8) __U,
  1290. __R);
  1291. }
  1292. extern __inline __m512i
  1293. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1294. _mm512_cvtt_roundps_epi64 (__m256 __A, const int __R)
  1295. {
  1296. return (__m512i) __builtin_ia32_cvttps2qq512_mask ((__v8sf) __A,
  1297. (__v8di)
  1298. _mm512_setzero_si512 (),
  1299. (__mmask8) -1,
  1300. __R);
  1301. }
  1302. extern __inline __m512i
  1303. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1304. _mm512_mask_cvtt_roundps_epi64 (__m512i __W, __mmask8 __U, __m256 __A,
  1305. const int __R)
  1306. {
  1307. return (__m512i) __builtin_ia32_cvttps2qq512_mask ((__v8sf) __A,
  1308. (__v8di) __W,
  1309. (__mmask8) __U,
  1310. __R);
  1311. }
  1312. extern __inline __m512i
  1313. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1314. _mm512_maskz_cvtt_roundps_epi64 (__mmask8 __U, __m256 __A,
  1315. const int __R)
  1316. {
  1317. return (__m512i) __builtin_ia32_cvttps2qq512_mask ((__v8sf) __A,
  1318. (__v8di)
  1319. _mm512_setzero_si512 (),
  1320. (__mmask8) __U,
  1321. __R);
  1322. }
  1323. extern __inline __m512i
  1324. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1325. _mm512_cvtt_roundps_epu64 (__m256 __A, const int __R)
  1326. {
  1327. return (__m512i) __builtin_ia32_cvttps2uqq512_mask ((__v8sf) __A,
  1328. (__v8di)
  1329. _mm512_setzero_si512 (),
  1330. (__mmask8) -1,
  1331. __R);
  1332. }
  1333. extern __inline __m512i
  1334. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1335. _mm512_mask_cvtt_roundps_epu64 (__m512i __W, __mmask8 __U, __m256 __A,
  1336. const int __R)
  1337. {
  1338. return (__m512i) __builtin_ia32_cvttps2uqq512_mask ((__v8sf) __A,
  1339. (__v8di) __W,
  1340. (__mmask8) __U,
  1341. __R);
  1342. }
  1343. extern __inline __m512i
  1344. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1345. _mm512_maskz_cvtt_roundps_epu64 (__mmask8 __U, __m256 __A,
  1346. const int __R)
  1347. {
  1348. return (__m512i) __builtin_ia32_cvttps2uqq512_mask ((__v8sf) __A,
  1349. (__v8di)
  1350. _mm512_setzero_si512 (),
  1351. (__mmask8) __U,
  1352. __R);
  1353. }
  1354. extern __inline __m512i
  1355. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1356. _mm512_cvt_roundpd_epi64 (__m512d __A, const int __R)
  1357. {
  1358. return (__m512i) __builtin_ia32_cvtpd2qq512_mask ((__v8df) __A,
  1359. (__v8di)
  1360. _mm512_setzero_si512 (),
  1361. (__mmask8) -1,
  1362. __R);
  1363. }
  1364. extern __inline __m512i
  1365. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1366. _mm512_mask_cvt_roundpd_epi64 (__m512i __W, __mmask8 __U, __m512d __A,
  1367. const int __R)
  1368. {
  1369. return (__m512i) __builtin_ia32_cvtpd2qq512_mask ((__v8df) __A,
  1370. (__v8di) __W,
  1371. (__mmask8) __U,
  1372. __R);
  1373. }
  1374. extern __inline __m512i
  1375. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1376. _mm512_maskz_cvt_roundpd_epi64 (__mmask8 __U, __m512d __A,
  1377. const int __R)
  1378. {
  1379. return (__m512i) __builtin_ia32_cvtpd2qq512_mask ((__v8df) __A,
  1380. (__v8di)
  1381. _mm512_setzero_si512 (),
  1382. (__mmask8) __U,
  1383. __R);
  1384. }
  1385. extern __inline __m512i
  1386. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1387. _mm512_cvt_roundpd_epu64 (__m512d __A, const int __R)
  1388. {
  1389. return (__m512i) __builtin_ia32_cvtpd2uqq512_mask ((__v8df) __A,
  1390. (__v8di)
  1391. _mm512_setzero_si512 (),
  1392. (__mmask8) -1,
  1393. __R);
  1394. }
  1395. extern __inline __m512i
  1396. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1397. _mm512_mask_cvt_roundpd_epu64 (__m512i __W, __mmask8 __U, __m512d __A,
  1398. const int __R)
  1399. {
  1400. return (__m512i) __builtin_ia32_cvtpd2uqq512_mask ((__v8df) __A,
  1401. (__v8di) __W,
  1402. (__mmask8) __U,
  1403. __R);
  1404. }
  1405. extern __inline __m512i
  1406. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1407. _mm512_maskz_cvt_roundpd_epu64 (__mmask8 __U, __m512d __A,
  1408. const int __R)
  1409. {
  1410. return (__m512i) __builtin_ia32_cvtpd2uqq512_mask ((__v8df) __A,
  1411. (__v8di)
  1412. _mm512_setzero_si512 (),
  1413. (__mmask8) __U,
  1414. __R);
  1415. }
  1416. extern __inline __m512i
  1417. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1418. _mm512_cvt_roundps_epi64 (__m256 __A, const int __R)
  1419. {
  1420. return (__m512i) __builtin_ia32_cvtps2qq512_mask ((__v8sf) __A,
  1421. (__v8di)
  1422. _mm512_setzero_si512 (),
  1423. (__mmask8) -1,
  1424. __R);
  1425. }
  1426. extern __inline __m512i
  1427. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1428. _mm512_mask_cvt_roundps_epi64 (__m512i __W, __mmask8 __U, __m256 __A,
  1429. const int __R)
  1430. {
  1431. return (__m512i) __builtin_ia32_cvtps2qq512_mask ((__v8sf) __A,
  1432. (__v8di) __W,
  1433. (__mmask8) __U,
  1434. __R);
  1435. }
  1436. extern __inline __m512i
  1437. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1438. _mm512_maskz_cvt_roundps_epi64 (__mmask8 __U, __m256 __A,
  1439. const int __R)
  1440. {
  1441. return (__m512i) __builtin_ia32_cvtps2qq512_mask ((__v8sf) __A,
  1442. (__v8di)
  1443. _mm512_setzero_si512 (),
  1444. (__mmask8) __U,
  1445. __R);
  1446. }
  1447. extern __inline __m512i
  1448. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1449. _mm512_cvt_roundps_epu64 (__m256 __A, const int __R)
  1450. {
  1451. return (__m512i) __builtin_ia32_cvtps2uqq512_mask ((__v8sf) __A,
  1452. (__v8di)
  1453. _mm512_setzero_si512 (),
  1454. (__mmask8) -1,
  1455. __R);
  1456. }
  1457. extern __inline __m512i
  1458. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1459. _mm512_mask_cvt_roundps_epu64 (__m512i __W, __mmask8 __U, __m256 __A,
  1460. const int __R)
  1461. {
  1462. return (__m512i) __builtin_ia32_cvtps2uqq512_mask ((__v8sf) __A,
  1463. (__v8di) __W,
  1464. (__mmask8) __U,
  1465. __R);
  1466. }
  1467. extern __inline __m512i
  1468. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1469. _mm512_maskz_cvt_roundps_epu64 (__mmask8 __U, __m256 __A,
  1470. const int __R)
  1471. {
  1472. return (__m512i) __builtin_ia32_cvtps2uqq512_mask ((__v8sf) __A,
  1473. (__v8di)
  1474. _mm512_setzero_si512 (),
  1475. (__mmask8) __U,
  1476. __R);
  1477. }
  1478. extern __inline __m256
  1479. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1480. _mm512_cvt_roundepi64_ps (__m512i __A, const int __R)
  1481. {
  1482. return (__m256) __builtin_ia32_cvtqq2ps512_mask ((__v8di) __A,
  1483. (__v8sf)
  1484. _mm256_setzero_ps (),
  1485. (__mmask8) -1,
  1486. __R);
  1487. }
  1488. extern __inline __m256
  1489. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1490. _mm512_mask_cvt_roundepi64_ps (__m256 __W, __mmask8 __U, __m512i __A,
  1491. const int __R)
  1492. {
  1493. return (__m256) __builtin_ia32_cvtqq2ps512_mask ((__v8di) __A,
  1494. (__v8sf) __W,
  1495. (__mmask8) __U,
  1496. __R);
  1497. }
  1498. extern __inline __m256
  1499. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1500. _mm512_maskz_cvt_roundepi64_ps (__mmask8 __U, __m512i __A,
  1501. const int __R)
  1502. {
  1503. return (__m256) __builtin_ia32_cvtqq2ps512_mask ((__v8di) __A,
  1504. (__v8sf)
  1505. _mm256_setzero_ps (),
  1506. (__mmask8) __U,
  1507. __R);
  1508. }
  1509. extern __inline __m256
  1510. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1511. _mm512_cvt_roundepu64_ps (__m512i __A, const int __R)
  1512. {
  1513. return (__m256) __builtin_ia32_cvtuqq2ps512_mask ((__v8di) __A,
  1514. (__v8sf)
  1515. _mm256_setzero_ps (),
  1516. (__mmask8) -1,
  1517. __R);
  1518. }
  1519. extern __inline __m256
  1520. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1521. _mm512_mask_cvt_roundepu64_ps (__m256 __W, __mmask8 __U, __m512i __A,
  1522. const int __R)
  1523. {
  1524. return (__m256) __builtin_ia32_cvtuqq2ps512_mask ((__v8di) __A,
  1525. (__v8sf) __W,
  1526. (__mmask8) __U,
  1527. __R);
  1528. }
  1529. extern __inline __m256
  1530. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1531. _mm512_maskz_cvt_roundepu64_ps (__mmask8 __U, __m512i __A,
  1532. const int __R)
  1533. {
  1534. return (__m256) __builtin_ia32_cvtuqq2ps512_mask ((__v8di) __A,
  1535. (__v8sf)
  1536. _mm256_setzero_ps (),
  1537. (__mmask8) __U,
  1538. __R);
  1539. }
  1540. extern __inline __m512d
  1541. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1542. _mm512_cvt_roundepi64_pd (__m512i __A, const int __R)
  1543. {
  1544. return (__m512d) __builtin_ia32_cvtqq2pd512_mask ((__v8di) __A,
  1545. (__v8df)
  1546. _mm512_setzero_pd (),
  1547. (__mmask8) -1,
  1548. __R);
  1549. }
  1550. extern __inline __m512d
  1551. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1552. _mm512_mask_cvt_roundepi64_pd (__m512d __W, __mmask8 __U, __m512i __A,
  1553. const int __R)
  1554. {
  1555. return (__m512d) __builtin_ia32_cvtqq2pd512_mask ((__v8di) __A,
  1556. (__v8df) __W,
  1557. (__mmask8) __U,
  1558. __R);
  1559. }
  1560. extern __inline __m512d
  1561. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1562. _mm512_maskz_cvt_roundepi64_pd (__mmask8 __U, __m512i __A,
  1563. const int __R)
  1564. {
  1565. return (__m512d) __builtin_ia32_cvtqq2pd512_mask ((__v8di) __A,
  1566. (__v8df)
  1567. _mm512_setzero_pd (),
  1568. (__mmask8) __U,
  1569. __R);
  1570. }
  1571. extern __inline __m512d
  1572. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1573. _mm512_cvt_roundepu64_pd (__m512i __A, const int __R)
  1574. {
  1575. return (__m512d) __builtin_ia32_cvtuqq2pd512_mask ((__v8di) __A,
  1576. (__v8df)
  1577. _mm512_setzero_pd (),
  1578. (__mmask8) -1,
  1579. __R);
  1580. }
  1581. extern __inline __m512d
  1582. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1583. _mm512_mask_cvt_roundepu64_pd (__m512d __W, __mmask8 __U, __m512i __A,
  1584. const int __R)
  1585. {
  1586. return (__m512d) __builtin_ia32_cvtuqq2pd512_mask ((__v8di) __A,
  1587. (__v8df) __W,
  1588. (__mmask8) __U,
  1589. __R);
  1590. }
  1591. extern __inline __m512d
  1592. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1593. _mm512_maskz_cvt_roundepu64_pd (__mmask8 __U, __m512i __A,
  1594. const int __R)
  1595. {
  1596. return (__m512d) __builtin_ia32_cvtuqq2pd512_mask ((__v8di) __A,
  1597. (__v8df)
  1598. _mm512_setzero_pd (),
  1599. (__mmask8) __U,
  1600. __R);
  1601. }
  1602. extern __inline __m512d
  1603. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1604. _mm512_reduce_pd (__m512d __A, int __B)
  1605. {
  1606. return (__m512d) __builtin_ia32_reducepd512_mask ((__v8df) __A, __B,
  1607. (__v8df)
  1608. _mm512_setzero_pd (),
  1609. (__mmask8) -1);
  1610. }
  1611. extern __inline __m512d
  1612. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1613. _mm512_mask_reduce_pd (__m512d __W, __mmask8 __U, __m512d __A, int __B)
  1614. {
  1615. return (__m512d) __builtin_ia32_reducepd512_mask ((__v8df) __A, __B,
  1616. (__v8df) __W,
  1617. (__mmask8) __U);
  1618. }
  1619. extern __inline __m512d
  1620. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1621. _mm512_maskz_reduce_pd (__mmask8 __U, __m512d __A, int __B)
  1622. {
  1623. return (__m512d) __builtin_ia32_reducepd512_mask ((__v8df) __A, __B,
  1624. (__v8df)
  1625. _mm512_setzero_pd (),
  1626. (__mmask8) __U);
  1627. }
  1628. extern __inline __m512
  1629. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1630. _mm512_reduce_ps (__m512 __A, int __B)
  1631. {
  1632. return (__m512) __builtin_ia32_reduceps512_mask ((__v16sf) __A, __B,
  1633. (__v16sf)
  1634. _mm512_setzero_ps (),
  1635. (__mmask16) -1);
  1636. }
  1637. extern __inline __m512
  1638. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1639. _mm512_mask_reduce_ps (__m512 __W, __mmask16 __U, __m512 __A, int __B)
  1640. {
  1641. return (__m512) __builtin_ia32_reduceps512_mask ((__v16sf) __A, __B,
  1642. (__v16sf) __W,
  1643. (__mmask16) __U);
  1644. }
  1645. extern __inline __m512
  1646. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1647. _mm512_maskz_reduce_ps (__mmask16 __U, __m512 __A, int __B)
  1648. {
  1649. return (__m512) __builtin_ia32_reduceps512_mask ((__v16sf) __A, __B,
  1650. (__v16sf)
  1651. _mm512_setzero_ps (),
  1652. (__mmask16) __U);
  1653. }
  1654. extern __inline __m256
  1655. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1656. _mm512_extractf32x8_ps (__m512 __A, const int __imm)
  1657. {
  1658. return (__m256) __builtin_ia32_extractf32x8_mask ((__v16sf) __A,
  1659. __imm,
  1660. (__v8sf)
  1661. _mm256_setzero_ps (),
  1662. (__mmask8) -1);
  1663. }
  1664. extern __inline __m256
  1665. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1666. _mm512_mask_extractf32x8_ps (__m256 __W, __mmask8 __U, __m512 __A,
  1667. const int __imm)
  1668. {
  1669. return (__m256) __builtin_ia32_extractf32x8_mask ((__v16sf) __A,
  1670. __imm,
  1671. (__v8sf) __W,
  1672. (__mmask8) __U);
  1673. }
  1674. extern __inline __m256
  1675. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1676. _mm512_maskz_extractf32x8_ps (__mmask8 __U, __m512 __A,
  1677. const int __imm)
  1678. {
  1679. return (__m256) __builtin_ia32_extractf32x8_mask ((__v16sf) __A,
  1680. __imm,
  1681. (__v8sf)
  1682. _mm256_setzero_ps (),
  1683. (__mmask8) __U);
  1684. }
  1685. extern __inline __m128d
  1686. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1687. _mm512_extractf64x2_pd (__m512d __A, const int __imm)
  1688. {
  1689. return (__m128d) __builtin_ia32_extractf64x2_512_mask ((__v8df) __A,
  1690. __imm,
  1691. (__v2df)
  1692. _mm_setzero_pd (),
  1693. (__mmask8) -1);
  1694. }
  1695. extern __inline __m128d
  1696. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1697. _mm512_mask_extractf64x2_pd (__m128d __W, __mmask8 __U, __m512d __A,
  1698. const int __imm)
  1699. {
  1700. return (__m128d) __builtin_ia32_extractf64x2_512_mask ((__v8df) __A,
  1701. __imm,
  1702. (__v2df) __W,
  1703. (__mmask8)
  1704. __U);
  1705. }
  1706. extern __inline __m128d
  1707. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1708. _mm512_maskz_extractf64x2_pd (__mmask8 __U, __m512d __A,
  1709. const int __imm)
  1710. {
  1711. return (__m128d) __builtin_ia32_extractf64x2_512_mask ((__v8df) __A,
  1712. __imm,
  1713. (__v2df)
  1714. _mm_setzero_pd (),
  1715. (__mmask8)
  1716. __U);
  1717. }
  1718. extern __inline __m256i
  1719. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1720. _mm512_extracti32x8_epi32 (__m512i __A, const int __imm)
  1721. {
  1722. return (__m256i) __builtin_ia32_extracti32x8_mask ((__v16si) __A,
  1723. __imm,
  1724. (__v8si)
  1725. _mm256_setzero_si256 (),
  1726. (__mmask8) -1);
  1727. }
  1728. extern __inline __m256i
  1729. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1730. _mm512_mask_extracti32x8_epi32 (__m256i __W, __mmask8 __U, __m512i __A,
  1731. const int __imm)
  1732. {
  1733. return (__m256i) __builtin_ia32_extracti32x8_mask ((__v16si) __A,
  1734. __imm,
  1735. (__v8si) __W,
  1736. (__mmask8) __U);
  1737. }
  1738. extern __inline __m256i
  1739. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1740. _mm512_maskz_extracti32x8_epi32 (__mmask8 __U, __m512i __A,
  1741. const int __imm)
  1742. {
  1743. return (__m256i) __builtin_ia32_extracti32x8_mask ((__v16si) __A,
  1744. __imm,
  1745. (__v8si)
  1746. _mm256_setzero_si256 (),
  1747. (__mmask8) __U);
  1748. }
  1749. extern __inline __m128i
  1750. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1751. _mm512_extracti64x2_epi64 (__m512i __A, const int __imm)
  1752. {
  1753. return (__m128i) __builtin_ia32_extracti64x2_512_mask ((__v8di) __A,
  1754. __imm,
  1755. (__v2di)
  1756. _mm_setzero_si128 (),
  1757. (__mmask8) -1);
  1758. }
  1759. extern __inline __m128i
  1760. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1761. _mm512_mask_extracti64x2_epi64 (__m128i __W, __mmask8 __U, __m512i __A,
  1762. const int __imm)
  1763. {
  1764. return (__m128i) __builtin_ia32_extracti64x2_512_mask ((__v8di) __A,
  1765. __imm,
  1766. (__v2di) __W,
  1767. (__mmask8)
  1768. __U);
  1769. }
  1770. extern __inline __m128i
  1771. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1772. _mm512_maskz_extracti64x2_epi64 (__mmask8 __U, __m512i __A,
  1773. const int __imm)
  1774. {
  1775. return (__m128i) __builtin_ia32_extracti64x2_512_mask ((__v8di) __A,
  1776. __imm,
  1777. (__v2di)
  1778. _mm_setzero_si128 (),
  1779. (__mmask8)
  1780. __U);
  1781. }
  1782. extern __inline __m512d
  1783. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1784. _mm512_range_round_pd (__m512d __A, __m512d __B, int __C,
  1785. const int __R)
  1786. {
  1787. return (__m512d) __builtin_ia32_rangepd512_mask ((__v8df) __A,
  1788. (__v8df) __B, __C,
  1789. (__v8df)
  1790. _mm512_setzero_pd (),
  1791. (__mmask8) -1,
  1792. __R);
  1793. }
  1794. extern __inline __m512d
  1795. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1796. _mm512_mask_range_round_pd (__m512d __W, __mmask8 __U,
  1797. __m512d __A, __m512d __B, int __C,
  1798. const int __R)
  1799. {
  1800. return (__m512d) __builtin_ia32_rangepd512_mask ((__v8df) __A,
  1801. (__v8df) __B, __C,
  1802. (__v8df) __W,
  1803. (__mmask8) __U,
  1804. __R);
  1805. }
  1806. extern __inline __m512d
  1807. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1808. _mm512_maskz_range_round_pd (__mmask8 __U, __m512d __A, __m512d __B,
  1809. int __C, const int __R)
  1810. {
  1811. return (__m512d) __builtin_ia32_rangepd512_mask ((__v8df) __A,
  1812. (__v8df) __B, __C,
  1813. (__v8df)
  1814. _mm512_setzero_pd (),
  1815. (__mmask8) __U,
  1816. __R);
  1817. }
  1818. extern __inline __m512
  1819. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1820. _mm512_range_round_ps (__m512 __A, __m512 __B, int __C, const int __R)
  1821. {
  1822. return (__m512) __builtin_ia32_rangeps512_mask ((__v16sf) __A,
  1823. (__v16sf) __B, __C,
  1824. (__v16sf)
  1825. _mm512_setzero_ps (),
  1826. (__mmask16) -1,
  1827. __R);
  1828. }
  1829. extern __inline __m512
  1830. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1831. _mm512_mask_range_round_ps (__m512 __W, __mmask16 __U,
  1832. __m512 __A, __m512 __B, int __C,
  1833. const int __R)
  1834. {
  1835. return (__m512) __builtin_ia32_rangeps512_mask ((__v16sf) __A,
  1836. (__v16sf) __B, __C,
  1837. (__v16sf) __W,
  1838. (__mmask16) __U,
  1839. __R);
  1840. }
  1841. extern __inline __m512
  1842. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1843. _mm512_maskz_range_round_ps (__mmask16 __U, __m512 __A, __m512 __B,
  1844. int __C, const int __R)
  1845. {
  1846. return (__m512) __builtin_ia32_rangeps512_mask ((__v16sf) __A,
  1847. (__v16sf) __B, __C,
  1848. (__v16sf)
  1849. _mm512_setzero_ps (),
  1850. (__mmask16) __U,
  1851. __R);
  1852. }
  1853. extern __inline __m512i
  1854. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1855. _mm512_inserti32x8 (__m512i __A, __m256i __B, const int __imm)
  1856. {
  1857. return (__m512i) __builtin_ia32_inserti32x8_mask ((__v16si) __A,
  1858. (__v8si) __B,
  1859. __imm,
  1860. (__v16si)
  1861. _mm512_setzero_si512 (),
  1862. (__mmask16) -1);
  1863. }
  1864. extern __inline __m512i
  1865. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1866. _mm512_mask_inserti32x8 (__m512i __W, __mmask16 __U, __m512i __A,
  1867. __m256i __B, const int __imm)
  1868. {
  1869. return (__m512i) __builtin_ia32_inserti32x8_mask ((__v16si) __A,
  1870. (__v8si) __B,
  1871. __imm,
  1872. (__v16si) __W,
  1873. (__mmask16) __U);
  1874. }
  1875. extern __inline __m512i
  1876. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1877. _mm512_maskz_inserti32x8 (__mmask16 __U, __m512i __A, __m256i __B,
  1878. const int __imm)
  1879. {
  1880. return (__m512i) __builtin_ia32_inserti32x8_mask ((__v16si) __A,
  1881. (__v8si) __B,
  1882. __imm,
  1883. (__v16si)
  1884. _mm512_setzero_si512 (),
  1885. (__mmask16) __U);
  1886. }
  1887. extern __inline __m512
  1888. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1889. _mm512_insertf32x8 (__m512 __A, __m256 __B, const int __imm)
  1890. {
  1891. return (__m512) __builtin_ia32_insertf32x8_mask ((__v16sf) __A,
  1892. (__v8sf) __B,
  1893. __imm,
  1894. (__v16sf)
  1895. _mm512_setzero_ps (),
  1896. (__mmask16) -1);
  1897. }
  1898. extern __inline __m512
  1899. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1900. _mm512_mask_insertf32x8 (__m512 __W, __mmask16 __U, __m512 __A,
  1901. __m256 __B, const int __imm)
  1902. {
  1903. return (__m512) __builtin_ia32_insertf32x8_mask ((__v16sf) __A,
  1904. (__v8sf) __B,
  1905. __imm,
  1906. (__v16sf) __W,
  1907. (__mmask16) __U);
  1908. }
  1909. extern __inline __m512
  1910. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1911. _mm512_maskz_insertf32x8 (__mmask16 __U, __m512 __A, __m256 __B,
  1912. const int __imm)
  1913. {
  1914. return (__m512) __builtin_ia32_insertf32x8_mask ((__v16sf) __A,
  1915. (__v8sf) __B,
  1916. __imm,
  1917. (__v16sf)
  1918. _mm512_setzero_ps (),
  1919. (__mmask16) __U);
  1920. }
  1921. extern __inline __m512i
  1922. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1923. _mm512_inserti64x2 (__m512i __A, __m128i __B, const int __imm)
  1924. {
  1925. return (__m512i) __builtin_ia32_inserti64x2_512_mask ((__v8di) __A,
  1926. (__v2di) __B,
  1927. __imm,
  1928. (__v8di)
  1929. _mm512_setzero_si512 (),
  1930. (__mmask8) -1);
  1931. }
  1932. extern __inline __m512i
  1933. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1934. _mm512_mask_inserti64x2 (__m512i __W, __mmask8 __U, __m512i __A,
  1935. __m128i __B, const int __imm)
  1936. {
  1937. return (__m512i) __builtin_ia32_inserti64x2_512_mask ((__v8di) __A,
  1938. (__v2di) __B,
  1939. __imm,
  1940. (__v8di) __W,
  1941. (__mmask8)
  1942. __U);
  1943. }
  1944. extern __inline __m512i
  1945. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1946. _mm512_maskz_inserti64x2 (__mmask8 __U, __m512i __A, __m128i __B,
  1947. const int __imm)
  1948. {
  1949. return (__m512i) __builtin_ia32_inserti64x2_512_mask ((__v8di) __A,
  1950. (__v2di) __B,
  1951. __imm,
  1952. (__v8di)
  1953. _mm512_setzero_si512 (),
  1954. (__mmask8)
  1955. __U);
  1956. }
  1957. extern __inline __m512d
  1958. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1959. _mm512_insertf64x2 (__m512d __A, __m128d __B, const int __imm)
  1960. {
  1961. return (__m512d) __builtin_ia32_insertf64x2_512_mask ((__v8df) __A,
  1962. (__v2df) __B,
  1963. __imm,
  1964. (__v8df)
  1965. _mm512_setzero_pd (),
  1966. (__mmask8) -1);
  1967. }
  1968. extern __inline __m512d
  1969. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1970. _mm512_mask_insertf64x2 (__m512d __W, __mmask8 __U, __m512d __A,
  1971. __m128d __B, const int __imm)
  1972. {
  1973. return (__m512d) __builtin_ia32_insertf64x2_512_mask ((__v8df) __A,
  1974. (__v2df) __B,
  1975. __imm,
  1976. (__v8df) __W,
  1977. (__mmask8)
  1978. __U);
  1979. }
  1980. extern __inline __m512d
  1981. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1982. _mm512_maskz_insertf64x2 (__mmask8 __U, __m512d __A, __m128d __B,
  1983. const int __imm)
  1984. {
  1985. return (__m512d) __builtin_ia32_insertf64x2_512_mask ((__v8df) __A,
  1986. (__v2df) __B,
  1987. __imm,
  1988. (__v8df)
  1989. _mm512_setzero_pd (),
  1990. (__mmask8)
  1991. __U);
  1992. }
  1993. extern __inline __mmask8
  1994. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  1995. _mm512_mask_fpclass_pd_mask (__mmask8 __U, __m512d __A,
  1996. const int __imm)
  1997. {
  1998. return (__mmask8) __builtin_ia32_fpclasspd512_mask ((__v8df) __A,
  1999. __imm, __U);
  2000. }
  2001. extern __inline __mmask8
  2002. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  2003. _mm512_fpclass_pd_mask (__m512d __A, const int __imm)
  2004. {
  2005. return (__mmask8) __builtin_ia32_fpclasspd512_mask ((__v8df) __A,
  2006. __imm,
  2007. (__mmask8) -1);
  2008. }
  2009. extern __inline __mmask16
  2010. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  2011. _mm512_mask_fpclass_ps_mask (__mmask16 __U, __m512 __A,
  2012. const int __imm)
  2013. {
  2014. return (__mmask16) __builtin_ia32_fpclassps512_mask ((__v16sf) __A,
  2015. __imm, __U);
  2016. }
  2017. extern __inline __mmask16
  2018. __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
  2019. _mm512_fpclass_ps_mask (__m512 __A, const int __imm)
  2020. {
  2021. return (__mmask16) __builtin_ia32_fpclassps512_mask ((__v16sf) __A,
  2022. __imm,
  2023. (__mmask16) -1);
  2024. }
  2025. #else
  2026. #define _kshiftli_mask8(X, Y) \
  2027. ((__mmask8) __builtin_ia32_kshiftliqi ((__mmask8)(X), (__mmask8)(Y)))
  2028. #define _kshiftri_mask8(X, Y) \
  2029. ((__mmask8) __builtin_ia32_kshiftriqi ((__mmask8)(X), (__mmask8)(Y)))
  2030. #define _mm_range_sd(A, B, C) \
  2031. ((__m128d) __builtin_ia32_rangesd128_mask_round ((__v2df)(__m128d)(A), \
  2032. (__v2df)(__m128d)(B), (int)(C), (__v2df) _mm_setzero_pd (), \
  2033. (__mmask8) -1, _MM_FROUND_CUR_DIRECTION))
  2034. #define _mm_mask_range_sd(W, U, A, B, C) \
  2035. ((__m128d) __builtin_ia32_rangesd128_mask_round ((__v2df)(__m128d)(A), \
  2036. (__v2df)(__m128d)(B), (int)(C), (__v2df)(__m128d)(W), \
  2037. (__mmask8)(U), _MM_FROUND_CUR_DIRECTION))
  2038. #define _mm_maskz_range_sd(U, A, B, C) \
  2039. ((__m128d) __builtin_ia32_rangesd128_mask_round ((__v2df)(__m128d)(A), \
  2040. (__v2df)(__m128d)(B), (int)(C), (__v2df) _mm_setzero_pd (), \
  2041. (__mmask8)(U), _MM_FROUND_CUR_DIRECTION))
  2042. #define _mm_range_ss(A, B, C) \
  2043. ((__m128) __builtin_ia32_rangess128_mask_round ((__v4sf)(__m128)(A), \
  2044. (__v4sf)(__m128)(B), (int)(C), (__v4sf) _mm_setzero_ps (), \
  2045. (__mmask8) -1, _MM_FROUND_CUR_DIRECTION))
  2046. #define _mm_mask_range_ss(W, U, A, B, C) \
  2047. ((__m128) __builtin_ia32_rangess128_mask_round ((__v4sf)(__m128)(A), \
  2048. (__v4sf)(__m128)(B), (int)(C), (__v4sf)(__m128)(W), \
  2049. (__mmask8)(U), _MM_FROUND_CUR_DIRECTION))
  2050. #define _mm_maskz_range_ss(U, A, B, C) \
  2051. ((__m128) __builtin_ia32_rangess128_mask_round ((__v4sf)(__m128)(A), \
  2052. (__v4sf)(__m128)(B), (int)(C), (__v4sf) _mm_setzero_ps (), \
  2053. (__mmask8)(U), _MM_FROUND_CUR_DIRECTION))
  2054. #define _mm_range_round_sd(A, B, C, R) \
  2055. ((__m128d) __builtin_ia32_rangesd128_mask_round ((__v2df)(__m128d)(A), \
  2056. (__v2df)(__m128d)(B), (int)(C), (__v2df) _mm_setzero_pd (), \
  2057. (__mmask8) -1, (R)))
  2058. #define _mm_mask_range_round_sd(W, U, A, B, C, R) \
  2059. ((__m128d) __builtin_ia32_rangesd128_mask_round ((__v2df)(__m128d)(A), \
  2060. (__v2df)(__m128d)(B), (int)(C), (__v2df)(__m128d)(W), \
  2061. (__mmask8)(U), (R)))
  2062. #define _mm_maskz_range_round_sd(U, A, B, C, R) \
  2063. ((__m128d) __builtin_ia32_rangesd128_mask_round ((__v2df)(__m128d)(A), \
  2064. (__v2df)(__m128d)(B), (int)(C), (__v2df) _mm_setzero_pd (), \
  2065. (__mmask8)(U), (R)))
  2066. #define _mm_range_round_ss(A, B, C, R) \
  2067. ((__m128) __builtin_ia32_rangess128_mask_round ((__v4sf)(__m128)(A), \
  2068. (__v4sf)(__m128)(B), (int)(C), (__v4sf) _mm_setzero_ps (), \
  2069. (__mmask8) -1, (R)))
  2070. #define _mm_mask_range_round_ss(W, U, A, B, C, R) \
  2071. ((__m128) __builtin_ia32_rangess128_mask_round ((__v4sf)(__m128)(A), \
  2072. (__v4sf)(__m128)(B), (int)(C), (__v4sf)(__m128)(W), \
  2073. (__mmask8)(U), (R)))
  2074. #define _mm_maskz_range_round_ss(U, A, B, C, R) \
  2075. ((__m128) __builtin_ia32_rangess128_mask_round ((__v4sf)(__m128)(A), \
  2076. (__v4sf)(__m128)(B), (int)(C), (__v4sf) _mm_setzero_ps (), \
  2077. (__mmask8)(U), (R)))
  2078. #define _mm512_cvtt_roundpd_epi64(A, B) \
  2079. ((__m512i)__builtin_ia32_cvttpd2qq512_mask ((A), (__v8di) \
  2080. _mm512_setzero_si512 (), \
  2081. -1, (B)))
  2082. #define _mm512_mask_cvtt_roundpd_epi64(W, U, A, B) \
  2083. ((__m512i)__builtin_ia32_cvttpd2qq512_mask ((A), (__v8di)(W), (U), (B)))
  2084. #define _mm512_maskz_cvtt_roundpd_epi64(U, A, B) \
  2085. ((__m512i)__builtin_ia32_cvttpd2qq512_mask ((A), (__v8di)_mm512_setzero_si512 (), (U), (B)))
  2086. #define _mm512_cvtt_roundpd_epu64(A, B) \
  2087. ((__m512i)__builtin_ia32_cvttpd2uqq512_mask ((A), (__v8di)_mm512_setzero_si512 (), -1, (B)))
  2088. #define _mm512_mask_cvtt_roundpd_epu64(W, U, A, B) \
  2089. ((__m512i)__builtin_ia32_cvttpd2uqq512_mask ((A), (__v8di)(W), (U), (B)))
  2090. #define _mm512_maskz_cvtt_roundpd_epu64(U, A, B) \
  2091. ((__m512i)__builtin_ia32_cvttpd2uqq512_mask ((A), (__v8di)_mm512_setzero_si512 (), (U), (B)))
  2092. #define _mm512_cvtt_roundps_epi64(A, B) \
  2093. ((__m512i)__builtin_ia32_cvttps2qq512_mask ((A), (__v8di)_mm512_setzero_si512 (), -1, (B)))
  2094. #define _mm512_mask_cvtt_roundps_epi64(W, U, A, B) \
  2095. ((__m512i)__builtin_ia32_cvttps2qq512_mask ((A), (__v8di)(W), (U), (B)))
  2096. #define _mm512_maskz_cvtt_roundps_epi64(U, A, B) \
  2097. ((__m512i)__builtin_ia32_cvttps2qq512_mask ((A), (__v8di)_mm512_setzero_si512 (), (U), (B)))
  2098. #define _mm512_cvtt_roundps_epu64(A, B) \
  2099. ((__m512i)__builtin_ia32_cvttps2uqq512_mask ((A), (__v8di)_mm512_setzero_si512 (), -1, (B)))
  2100. #define _mm512_mask_cvtt_roundps_epu64(W, U, A, B) \
  2101. ((__m512i)__builtin_ia32_cvttps2uqq512_mask ((A), (__v8di)(W), (U), (B)))
  2102. #define _mm512_maskz_cvtt_roundps_epu64(U, A, B) \
  2103. ((__m512i)__builtin_ia32_cvttps2uqq512_mask ((A), (__v8di)_mm512_setzero_si512 (), (U), (B)))
  2104. #define _mm512_cvt_roundpd_epi64(A, B) \
  2105. ((__m512i)__builtin_ia32_cvtpd2qq512_mask ((A), (__v8di)_mm512_setzero_si512 (), -1, (B)))
  2106. #define _mm512_mask_cvt_roundpd_epi64(W, U, A, B) \
  2107. ((__m512i)__builtin_ia32_cvtpd2qq512_mask ((A), (__v8di)(W), (U), (B)))
  2108. #define _mm512_maskz_cvt_roundpd_epi64(U, A, B) \
  2109. ((__m512i)__builtin_ia32_cvtpd2qq512_mask ((A), (__v8di)_mm512_setzero_si512 (), (U), (B)))
  2110. #define _mm512_cvt_roundpd_epu64(A, B) \
  2111. ((__m512i)__builtin_ia32_cvtpd2uqq512_mask ((A), (__v8di)_mm512_setzero_si512 (), -1, (B)))
  2112. #define _mm512_mask_cvt_roundpd_epu64(W, U, A, B) \
  2113. ((__m512i)__builtin_ia32_cvtpd2uqq512_mask ((A), (__v8di)(W), (U), (B)))
  2114. #define _mm512_maskz_cvt_roundpd_epu64(U, A, B) \
  2115. ((__m512i)__builtin_ia32_cvtpd2uqq512_mask ((A), (__v8di)_mm512_setzero_si512 (), (U), (B)))
  2116. #define _mm512_cvt_roundps_epi64(A, B) \
  2117. ((__m512i)__builtin_ia32_cvtps2qq512_mask ((A), (__v8di)_mm512_setzero_si512 (), -1, (B)))
  2118. #define _mm512_mask_cvt_roundps_epi64(W, U, A, B) \
  2119. ((__m512i)__builtin_ia32_cvtps2qq512_mask ((A), (__v8di)(W), (U), (B)))
  2120. #define _mm512_maskz_cvt_roundps_epi64(U, A, B) \
  2121. ((__m512i)__builtin_ia32_cvtps2qq512_mask ((A), (__v8di)_mm512_setzero_si512 (), (U), (B)))
  2122. #define _mm512_cvt_roundps_epu64(A, B) \
  2123. ((__m512i)__builtin_ia32_cvtps2uqq512_mask ((A), (__v8di)_mm512_setzero_si512 (), -1, (B)))
  2124. #define _mm512_mask_cvt_roundps_epu64(W, U, A, B) \
  2125. ((__m512i)__builtin_ia32_cvtps2uqq512_mask ((A), (__v8di)(W), (U), (B)))
  2126. #define _mm512_maskz_cvt_roundps_epu64(U, A, B) \
  2127. ((__m512i)__builtin_ia32_cvtps2uqq512_mask ((A), (__v8di)_mm512_setzero_si512 (), (U), (B)))
  2128. #define _mm512_cvt_roundepi64_ps(A, B) \
  2129. ((__m256)__builtin_ia32_cvtqq2ps512_mask ((__v8di)(A), (__v8sf)_mm256_setzero_ps (), -1, (B)))
  2130. #define _mm512_mask_cvt_roundepi64_ps(W, U, A, B) \
  2131. ((__m256)__builtin_ia32_cvtqq2ps512_mask ((__v8di)(A), (W), (U), (B)))
  2132. #define _mm512_maskz_cvt_roundepi64_ps(U, A, B) \
  2133. ((__m256)__builtin_ia32_cvtqq2ps512_mask ((__v8di)(A), (__v8sf)_mm256_setzero_ps (), (U), (B)))
  2134. #define _mm512_cvt_roundepu64_ps(A, B) \
  2135. ((__m256)__builtin_ia32_cvtuqq2ps512_mask ((__v8di)(A), (__v8sf)_mm256_setzero_ps (), -1, (B)))
  2136. #define _mm512_mask_cvt_roundepu64_ps(W, U, A, B) \
  2137. ((__m256)__builtin_ia32_cvtuqq2ps512_mask ((__v8di)(A), (W), (U), (B)))
  2138. #define _mm512_maskz_cvt_roundepu64_ps(U, A, B) \
  2139. ((__m256)__builtin_ia32_cvtuqq2ps512_mask ((__v8di)(A), (__v8sf)_mm256_setzero_ps (), (U), (B)))
  2140. #define _mm512_cvt_roundepi64_pd(A, B) \
  2141. ((__m512d)__builtin_ia32_cvtqq2pd512_mask ((__v8di)(A), (__v8df)_mm512_setzero_pd (), -1, (B)))
  2142. #define _mm512_mask_cvt_roundepi64_pd(W, U, A, B) \
  2143. ((__m512d)__builtin_ia32_cvtqq2pd512_mask ((__v8di)(A), (W), (U), (B)))
  2144. #define _mm512_maskz_cvt_roundepi64_pd(U, A, B) \
  2145. ((__m512d)__builtin_ia32_cvtqq2pd512_mask ((__v8di)(A), (__v8df)_mm512_setzero_pd (), (U), (B)))
  2146. #define _mm512_cvt_roundepu64_pd(A, B) \
  2147. ((__m512d)__builtin_ia32_cvtuqq2pd512_mask ((__v8di)(A), (__v8df)_mm512_setzero_pd (), -1, (B)))
  2148. #define _mm512_mask_cvt_roundepu64_pd(W, U, A, B) \
  2149. ((__m512d)__builtin_ia32_cvtuqq2pd512_mask ((__v8di)(A), (W), (U), (B)))
  2150. #define _mm512_maskz_cvt_roundepu64_pd(U, A, B) \
  2151. ((__m512d)__builtin_ia32_cvtuqq2pd512_mask ((__v8di)(A), (__v8df)_mm512_setzero_pd (), (U), (B)))
  2152. #define _mm512_reduce_pd(A, B) \
  2153. ((__m512d) __builtin_ia32_reducepd512_mask ((__v8df)(__m512d)(A), \
  2154. (int)(B), (__v8df)_mm512_setzero_pd (), (__mmask8)-1))
  2155. #define _mm512_mask_reduce_pd(W, U, A, B) \
  2156. ((__m512d) __builtin_ia32_reducepd512_mask ((__v8df)(__m512d)(A), \
  2157. (int)(B), (__v8df)(__m512d)(W), (__mmask8)(U)))
  2158. #define _mm512_maskz_reduce_pd(U, A, B) \
  2159. ((__m512d) __builtin_ia32_reducepd512_mask ((__v8df)(__m512d)(A), \
  2160. (int)(B), (__v8df)_mm512_setzero_pd (), (__mmask8)(U)))
  2161. #define _mm512_reduce_ps(A, B) \
  2162. ((__m512) __builtin_ia32_reduceps512_mask ((__v16sf)(__m512)(A), \
  2163. (int)(B), (__v16sf)_mm512_setzero_ps (), (__mmask16)-1))
  2164. #define _mm512_mask_reduce_ps(W, U, A, B) \
  2165. ((__m512) __builtin_ia32_reduceps512_mask ((__v16sf)(__m512)(A), \
  2166. (int)(B), (__v16sf)(__m512)(W), (__mmask16)(U)))
  2167. #define _mm512_maskz_reduce_ps(U, A, B) \
  2168. ((__m512) __builtin_ia32_reduceps512_mask ((__v16sf)(__m512)(A), \
  2169. (int)(B), (__v16sf)_mm512_setzero_ps (), (__mmask16)(U)))
  2170. #define _mm512_extractf32x8_ps(X, C) \
  2171. ((__m256) __builtin_ia32_extractf32x8_mask ((__v16sf)(__m512) (X), \
  2172. (int) (C), (__v8sf)(__m256) _mm256_setzero_ps (), (__mmask8)-1))
  2173. #define _mm512_mask_extractf32x8_ps(W, U, X, C) \
  2174. ((__m256) __builtin_ia32_extractf32x8_mask ((__v16sf)(__m512) (X), \
  2175. (int) (C), (__v8sf)(__m256) (W), (__mmask8) (U)))
  2176. #define _mm512_maskz_extractf32x8_ps(U, X, C) \
  2177. ((__m256) __builtin_ia32_extractf32x8_mask ((__v16sf)(__m512) (X), \
  2178. (int) (C), (__v8sf)(__m256) _mm256_setzero_ps (), (__mmask8) (U)))
  2179. #define _mm512_extractf64x2_pd(X, C) \
  2180. ((__m128d) __builtin_ia32_extractf64x2_512_mask ((__v8df)(__m512d) (X),\
  2181. (int) (C), (__v2df)(__m128d) _mm_setzero_pd (), (__mmask8)-1))
  2182. #define _mm512_mask_extractf64x2_pd(W, U, X, C) \
  2183. ((__m128d) __builtin_ia32_extractf64x2_512_mask ((__v8df)(__m512d) (X),\
  2184. (int) (C), (__v2df)(__m128d) (W), (__mmask8) (U)))
  2185. #define _mm512_maskz_extractf64x2_pd(U, X, C) \
  2186. ((__m128d) __builtin_ia32_extractf64x2_512_mask ((__v8df)(__m512d) (X),\
  2187. (int) (C), (__v2df)(__m128d) _mm_setzero_pd (), (__mmask8) (U)))
  2188. #define _mm512_extracti32x8_epi32(X, C) \
  2189. ((__m256i) __builtin_ia32_extracti32x8_mask ((__v16si)(__m512i) (X), \
  2190. (int) (C), (__v8si)(__m256i) _mm256_setzero_si256 (), (__mmask8)-1))
  2191. #define _mm512_mask_extracti32x8_epi32(W, U, X, C) \
  2192. ((__m256i) __builtin_ia32_extracti32x8_mask ((__v16si)(__m512i) (X), \
  2193. (int) (C), (__v8si)(__m256i) (W), (__mmask8) (U)))
  2194. #define _mm512_maskz_extracti32x8_epi32(U, X, C) \
  2195. ((__m256i) __builtin_ia32_extracti32x8_mask ((__v16si)(__m512i) (X), \
  2196. (int) (C), (__v8si)(__m256i) _mm256_setzero_si256 (), (__mmask8) (U)))
  2197. #define _mm512_extracti64x2_epi64(X, C) \
  2198. ((__m128i) __builtin_ia32_extracti64x2_512_mask ((__v8di)(__m512i) (X),\
  2199. (int) (C), (__v2di)(__m128i) _mm_setzero_si128 (), (__mmask8)-1))
  2200. #define _mm512_mask_extracti64x2_epi64(W, U, X, C) \
  2201. ((__m128i) __builtin_ia32_extracti64x2_512_mask ((__v8di)(__m512i) (X),\
  2202. (int) (C), (__v2di)(__m128i) (W), (__mmask8) (U)))
  2203. #define _mm512_maskz_extracti64x2_epi64(U, X, C) \
  2204. ((__m128i) __builtin_ia32_extracti64x2_512_mask ((__v8di)(__m512i) (X),\
  2205. (int) (C), (__v2di)(__m128i) _mm_setzero_si128 (), (__mmask8) (U)))
  2206. #define _mm512_range_pd(A, B, C) \
  2207. ((__m512d) __builtin_ia32_rangepd512_mask ((__v8df)(__m512d)(A), \
  2208. (__v8df)(__m512d)(B), (int)(C), \
  2209. (__v8df)_mm512_setzero_pd (), (__mmask8)-1, _MM_FROUND_CUR_DIRECTION))
  2210. #define _mm512_mask_range_pd(W, U, A, B, C) \
  2211. ((__m512d) __builtin_ia32_rangepd512_mask ((__v8df)(__m512d)(A), \
  2212. (__v8df)(__m512d)(B), (int)(C), \
  2213. (__v8df)(__m512d)(W), (__mmask8)(U), _MM_FROUND_CUR_DIRECTION))
  2214. #define _mm512_maskz_range_pd(U, A, B, C) \
  2215. ((__m512d) __builtin_ia32_rangepd512_mask ((__v8df)(__m512d)(A), \
  2216. (__v8df)(__m512d)(B), (int)(C), \
  2217. (__v8df)_mm512_setzero_pd (), (__mmask8)(U), _MM_FROUND_CUR_DIRECTION))
  2218. #define _mm512_range_ps(A, B, C) \
  2219. ((__m512) __builtin_ia32_rangeps512_mask ((__v16sf)(__m512)(A), \
  2220. (__v16sf)(__m512)(B), (int)(C), \
  2221. (__v16sf)_mm512_setzero_ps (), (__mmask16)-1, _MM_FROUND_CUR_DIRECTION))
  2222. #define _mm512_mask_range_ps(W, U, A, B, C) \
  2223. ((__m512) __builtin_ia32_rangeps512_mask ((__v16sf)(__m512)(A), \
  2224. (__v16sf)(__m512)(B), (int)(C), \
  2225. (__v16sf)(__m512)(W), (__mmask16)(U), _MM_FROUND_CUR_DIRECTION))
  2226. #define _mm512_maskz_range_ps(U, A, B, C) \
  2227. ((__m512) __builtin_ia32_rangeps512_mask ((__v16sf)(__m512)(A), \
  2228. (__v16sf)(__m512)(B), (int)(C), \
  2229. (__v16sf)_mm512_setzero_ps (), (__mmask16)(U), _MM_FROUND_CUR_DIRECTION))
  2230. #define _mm512_range_round_pd(A, B, C, R) \
  2231. ((__m512d) __builtin_ia32_rangepd512_mask ((__v8df)(__m512d)(A), \
  2232. (__v8df)(__m512d)(B), (int)(C), \
  2233. (__v8df)_mm512_setzero_pd (), (__mmask8)-1, (R)))
  2234. #define _mm512_mask_range_round_pd(W, U, A, B, C, R) \
  2235. ((__m512d) __builtin_ia32_rangepd512_mask ((__v8df)(__m512d)(A), \
  2236. (__v8df)(__m512d)(B), (int)(C), \
  2237. (__v8df)(__m512d)(W), (__mmask8)(U), (R)))
  2238. #define _mm512_maskz_range_round_pd(U, A, B, C, R) \
  2239. ((__m512d) __builtin_ia32_rangepd512_mask ((__v8df)(__m512d)(A), \
  2240. (__v8df)(__m512d)(B), (int)(C), \
  2241. (__v8df)_mm512_setzero_pd (), (__mmask8)(U), (R)))
  2242. #define _mm512_range_round_ps(A, B, C, R) \
  2243. ((__m512) __builtin_ia32_rangeps512_mask ((__v16sf)(__m512)(A), \
  2244. (__v16sf)(__m512)(B), (int)(C), \
  2245. (__v16sf)_mm512_setzero_ps (), (__mmask16)-1, (R)))
  2246. #define _mm512_mask_range_round_ps(W, U, A, B, C, R) \
  2247. ((__m512) __builtin_ia32_rangeps512_mask ((__v16sf)(__m512)(A), \
  2248. (__v16sf)(__m512)(B), (int)(C), \
  2249. (__v16sf)(__m512)(W), (__mmask16)(U), (R)))
  2250. #define _mm512_maskz_range_round_ps(U, A, B, C, R) \
  2251. ((__m512) __builtin_ia32_rangeps512_mask ((__v16sf)(__m512)(A), \
  2252. (__v16sf)(__m512)(B), (int)(C), \
  2253. (__v16sf)_mm512_setzero_ps (), (__mmask16)(U), (R)))
  2254. #define _mm512_insertf64x2(X, Y, C) \
  2255. ((__m512d) __builtin_ia32_insertf64x2_512_mask ((__v8df)(__m512d) (X),\
  2256. (__v2df)(__m128d) (Y), (int) (C), (__v8df)(__m512d) (X), \
  2257. (__mmask8)-1))
  2258. #define _mm512_mask_insertf64x2(W, U, X, Y, C) \
  2259. ((__m512d) __builtin_ia32_insertf64x2_512_mask ((__v8df)(__m512d) (X),\
  2260. (__v2df)(__m128d) (Y), (int) (C), (__v8df)(__m512d) (W), \
  2261. (__mmask8) (U)))
  2262. #define _mm512_maskz_insertf64x2(U, X, Y, C) \
  2263. ((__m512d) __builtin_ia32_insertf64x2_512_mask ((__v8df)(__m512d) (X),\
  2264. (__v2df)(__m128d) (Y), (int) (C), \
  2265. (__v8df)(__m512d) _mm512_setzero_pd (), (__mmask8) (U)))
  2266. #define _mm512_inserti64x2(X, Y, C) \
  2267. ((__m512i) __builtin_ia32_inserti64x2_512_mask ((__v8di)(__m512i) (X),\
  2268. (__v2di)(__m128i) (Y), (int) (C), (__v8di)(__m512i) (X), (__mmask8)-1))
  2269. #define _mm512_mask_inserti64x2(W, U, X, Y, C) \
  2270. ((__m512i) __builtin_ia32_inserti64x2_512_mask ((__v8di)(__m512i) (X),\
  2271. (__v2di)(__m128i) (Y), (int) (C), (__v8di)(__m512i) (W), \
  2272. (__mmask8) (U)))
  2273. #define _mm512_maskz_inserti64x2(U, X, Y, C) \
  2274. ((__m512i) __builtin_ia32_inserti64x2_512_mask ((__v8di)(__m512i) (X),\
  2275. (__v2di)(__m128i) (Y), (int) (C), \
  2276. (__v8di)(__m512i) _mm512_setzero_si512 (), (__mmask8) (U)))
  2277. #define _mm512_insertf32x8(X, Y, C) \
  2278. ((__m512) __builtin_ia32_insertf32x8_mask ((__v16sf)(__m512) (X), \
  2279. (__v8sf)(__m256) (Y), (int) (C),\
  2280. (__v16sf)(__m512)_mm512_setzero_ps (),\
  2281. (__mmask16)-1))
  2282. #define _mm512_mask_insertf32x8(W, U, X, Y, C) \
  2283. ((__m512) __builtin_ia32_insertf32x8_mask ((__v16sf)(__m512) (X), \
  2284. (__v8sf)(__m256) (Y), (int) (C),\
  2285. (__v16sf)(__m512)(W),\
  2286. (__mmask16)(U)))
  2287. #define _mm512_maskz_insertf32x8(U, X, Y, C) \
  2288. ((__m512) __builtin_ia32_insertf32x8_mask ((__v16sf)(__m512) (X), \
  2289. (__v8sf)(__m256) (Y), (int) (C),\
  2290. (__v16sf)(__m512)_mm512_setzero_ps (),\
  2291. (__mmask16)(U)))
  2292. #define _mm512_inserti32x8(X, Y, C) \
  2293. ((__m512i) __builtin_ia32_inserti32x8_mask ((__v16si)(__m512i) (X), \
  2294. (__v8si)(__m256i) (Y), (int) (C),\
  2295. (__v16si)(__m512i)_mm512_setzero_si512 (),\
  2296. (__mmask16)-1))
  2297. #define _mm512_mask_inserti32x8(W, U, X, Y, C) \
  2298. ((__m512i) __builtin_ia32_inserti32x8_mask ((__v16si)(__m512i) (X), \
  2299. (__v8si)(__m256i) (Y), (int) (C),\
  2300. (__v16si)(__m512i)(W),\
  2301. (__mmask16)(U)))
  2302. #define _mm512_maskz_inserti32x8(U, X, Y, C) \
  2303. ((__m512i) __builtin_ia32_inserti32x8_mask ((__v16si)(__m512i) (X), \
  2304. (__v8si)(__m256i) (Y), (int) (C),\
  2305. (__v16si)(__m512i)_mm512_setzero_si512 (),\
  2306. (__mmask16)(U)))
  2307. #define _mm_fpclass_ss_mask(X, C) \
  2308. ((__mmask8) __builtin_ia32_fpclassss ((__v4sf) (__m128) (X), (int) (C))) \
  2309. #define _mm_fpclass_sd_mask(X, C) \
  2310. ((__mmask8) __builtin_ia32_fpclasssd ((__v2df) (__m128d) (X), (int) (C))) \
  2311. #define _mm512_mask_fpclass_pd_mask(u, X, C) \
  2312. ((__mmask8) __builtin_ia32_fpclasspd512_mask ((__v8df) (__m512d) (X), \
  2313. (int) (C), (__mmask8)(u)))
  2314. #define _mm512_mask_fpclass_ps_mask(u, x, c) \
  2315. ((__mmask16) __builtin_ia32_fpclassps512_mask ((__v16sf) (__m512) (x),\
  2316. (int) (c),(__mmask8)(u)))
  2317. #define _mm512_fpclass_pd_mask(X, C) \
  2318. ((__mmask8) __builtin_ia32_fpclasspd512_mask ((__v8df) (__m512d) (X), \
  2319. (int) (C), (__mmask8)-1))
  2320. #define _mm512_fpclass_ps_mask(x, c) \
  2321. ((__mmask16) __builtin_ia32_fpclassps512_mask ((__v16sf) (__m512) (x),\
  2322. (int) (c),(__mmask8)-1))
  2323. #define _mm_reduce_sd(A, B, C) \
  2324. ((__m128d) __builtin_ia32_reducesd_mask ((__v2df)(__m128d)(A), \
  2325. (__v2df)(__m128d)(B), (int)(C), (__v2df) _mm_setzero_pd (), \
  2326. (__mmask8)-1))
  2327. #define _mm_mask_reduce_sd(W, U, A, B, C) \
  2328. ((__m128d) __builtin_ia32_reducesd_mask ((__v2df)(__m128d)(A), \
  2329. (__v2df)(__m128d)(B), (int)(C), (__v2df)(__m128d)(W), (__mmask8)(U)))
  2330. #define _mm_maskz_reduce_sd(U, A, B, C) \
  2331. ((__m128d) __builtin_ia32_reducesd_mask ((__v2df)(__m128d)(A), \
  2332. (__v2df)(__m128d)(B), (int)(C), (__v2df) _mm_setzero_pd (), \
  2333. (__mmask8)(U)))
  2334. #define _mm_reduce_ss(A, B, C) \
  2335. ((__m128) __builtin_ia32_reducess_mask ((__v4sf)(__m128)(A), \
  2336. (__v4sf)(__m128)(B), (int)(C), (__v4sf) _mm_setzero_ps (), \
  2337. (__mmask8)-1))
  2338. #define _mm_mask_reduce_ss(W, U, A, B, C) \
  2339. ((__m128) __builtin_ia32_reducess_mask ((__v4sf)(__m128)(A), \
  2340. (__v4sf)(__m128)(B), (int)(C), (__v4sf)(__m128)(W), (__mmask8)(U)))
  2341. #define _mm_maskz_reduce_ss(U, A, B, C) \
  2342. ((__m128) __builtin_ia32_reducess_mask ((__v4sf)(__m128)(A), \
  2343. (__v4sf)(__m128)(B), (int)(C), (__v4sf) _mm_setzero_ps (), \
  2344. (__mmask8)(U)))
  2345. #endif
  2346. #ifdef __DISABLE_AVX512DQ__
  2347. #undef __DISABLE_AVX512DQ__
  2348. #pragma GCC pop_options
  2349. #endif /* __DISABLE_AVX512DQ__ */
  2350. #endif /* _AVX512DQINTRIN_H_INCLUDED */