IntrinsicsAArch64.td 105 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430
  1. //===- IntrinsicsAARCH64.td - Defines AARCH64 intrinsics ---*- tablegen -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This file defines all of the AARCH64-specific intrinsics.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. let TargetPrefix = "aarch64" in {
  13. def int_aarch64_ldxr : Intrinsic<[llvm_i64_ty], [llvm_anyptr_ty],
  14. [IntrNoFree, IntrWillReturn]>;
  15. def int_aarch64_ldaxr : Intrinsic<[llvm_i64_ty], [llvm_anyptr_ty],
  16. [IntrNoFree, IntrWillReturn]>;
  17. def int_aarch64_stxr : Intrinsic<[llvm_i32_ty], [llvm_i64_ty, llvm_anyptr_ty],
  18. [IntrNoFree, IntrWillReturn]>;
  19. def int_aarch64_stlxr : Intrinsic<[llvm_i32_ty], [llvm_i64_ty, llvm_anyptr_ty],
  20. [IntrNoFree, IntrWillReturn]>;
  21. def int_aarch64_ldxp : Intrinsic<[llvm_i64_ty, llvm_i64_ty], [llvm_ptr_ty],
  22. [IntrNoFree, IntrWillReturn]>;
  23. def int_aarch64_ldaxp : Intrinsic<[llvm_i64_ty, llvm_i64_ty], [llvm_ptr_ty],
  24. [IntrNoFree, IntrWillReturn]>;
  25. def int_aarch64_stxp : Intrinsic<[llvm_i32_ty],
  26. [llvm_i64_ty, llvm_i64_ty, llvm_ptr_ty],
  27. [IntrNoFree, IntrWillReturn]>;
  28. def int_aarch64_stlxp : Intrinsic<[llvm_i32_ty],
  29. [llvm_i64_ty, llvm_i64_ty, llvm_ptr_ty],
  30. [IntrNoFree, IntrWillReturn]>;
  31. def int_aarch64_clrex : Intrinsic<[]>;
  32. def int_aarch64_sdiv : DefaultAttrsIntrinsic<[llvm_anyint_ty], [LLVMMatchType<0>,
  33. LLVMMatchType<0>], [IntrNoMem]>;
  34. def int_aarch64_udiv : DefaultAttrsIntrinsic<[llvm_anyint_ty], [LLVMMatchType<0>,
  35. LLVMMatchType<0>], [IntrNoMem]>;
  36. def int_aarch64_fjcvtzs : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem]>;
  37. def int_aarch64_cls: DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem]>;
  38. def int_aarch64_cls64: DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem]>;
  39. //===----------------------------------------------------------------------===//
  40. // HINT
  41. def int_aarch64_hint : DefaultAttrsIntrinsic<[], [llvm_i32_ty]>;
  42. //===----------------------------------------------------------------------===//
  43. // Data Barrier Instructions
  44. def int_aarch64_dmb : GCCBuiltin<"__builtin_arm_dmb">, MSBuiltin<"__dmb">,
  45. Intrinsic<[], [llvm_i32_ty], [IntrNoFree, IntrWillReturn]>;
  46. def int_aarch64_dsb : GCCBuiltin<"__builtin_arm_dsb">, MSBuiltin<"__dsb">,
  47. Intrinsic<[], [llvm_i32_ty], [IntrNoFree, IntrWillReturn]>;
  48. def int_aarch64_isb : GCCBuiltin<"__builtin_arm_isb">, MSBuiltin<"__isb">,
  49. Intrinsic<[], [llvm_i32_ty], [IntrNoFree, IntrWillReturn]>;
  50. // A space-consuming intrinsic primarily for testing block and jump table
  51. // placements. The first argument is the number of bytes this "instruction"
  52. // takes up, the second and return value are essentially chains, used to force
  53. // ordering during ISel.
  54. def int_aarch64_space : DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_i32_ty, llvm_i64_ty], []>;
  55. }
  56. //===----------------------------------------------------------------------===//
  57. // Advanced SIMD (NEON)
  58. let TargetPrefix = "aarch64" in { // All intrinsics start with "llvm.aarch64.".
  59. class AdvSIMD_2Scalar_Float_Intrinsic
  60. : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>, LLVMMatchType<0>],
  61. [IntrNoMem]>;
  62. class AdvSIMD_FPToIntRounding_Intrinsic
  63. : DefaultAttrsIntrinsic<[llvm_anyint_ty], [llvm_anyfloat_ty], [IntrNoMem]>;
  64. class AdvSIMD_1IntArg_Intrinsic
  65. : DefaultAttrsIntrinsic<[llvm_anyint_ty], [LLVMMatchType<0>], [IntrNoMem]>;
  66. class AdvSIMD_1FloatArg_Intrinsic
  67. : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>], [IntrNoMem]>;
  68. class AdvSIMD_1VectorArg_Intrinsic
  69. : DefaultAttrsIntrinsic<[llvm_anyvector_ty], [LLVMMatchType<0>], [IntrNoMem]>;
  70. class AdvSIMD_1VectorArg_Expand_Intrinsic
  71. : DefaultAttrsIntrinsic<[llvm_anyvector_ty], [llvm_anyvector_ty], [IntrNoMem]>;
  72. class AdvSIMD_1VectorArg_Long_Intrinsic
  73. : DefaultAttrsIntrinsic<[llvm_anyvector_ty], [LLVMTruncatedType<0>], [IntrNoMem]>;
  74. class AdvSIMD_1IntArg_Narrow_Intrinsic
  75. : DefaultAttrsIntrinsic<[llvm_anyint_ty], [llvm_anyint_ty], [IntrNoMem]>;
  76. class AdvSIMD_1VectorArg_Narrow_Intrinsic
  77. : DefaultAttrsIntrinsic<[llvm_anyint_ty], [LLVMExtendedType<0>], [IntrNoMem]>;
  78. class AdvSIMD_1VectorArg_Int_Across_Intrinsic
  79. : DefaultAttrsIntrinsic<[llvm_anyint_ty], [llvm_anyvector_ty], [IntrNoMem]>;
  80. class AdvSIMD_1VectorArg_Float_Across_Intrinsic
  81. : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [llvm_anyvector_ty], [IntrNoMem]>;
  82. class AdvSIMD_2IntArg_Intrinsic
  83. : DefaultAttrsIntrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, LLVMMatchType<0>],
  84. [IntrNoMem]>;
  85. class AdvSIMD_2FloatArg_Intrinsic
  86. : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>, LLVMMatchType<0>],
  87. [IntrNoMem]>;
  88. class AdvSIMD_2VectorArg_Intrinsic
  89. : DefaultAttrsIntrinsic<[llvm_anyvector_ty], [LLVMMatchType<0>, LLVMMatchType<0>],
  90. [IntrNoMem]>;
  91. class AdvSIMD_2VectorArg_Compare_Intrinsic
  92. : DefaultAttrsIntrinsic<[llvm_anyvector_ty], [llvm_anyvector_ty, LLVMMatchType<1>],
  93. [IntrNoMem]>;
  94. class AdvSIMD_2Arg_FloatCompare_Intrinsic
  95. : DefaultAttrsIntrinsic<[llvm_anyint_ty], [llvm_anyfloat_ty, LLVMMatchType<1>],
  96. [IntrNoMem]>;
  97. class AdvSIMD_2VectorArg_Long_Intrinsic
  98. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  99. [LLVMTruncatedType<0>, LLVMTruncatedType<0>],
  100. [IntrNoMem]>;
  101. class AdvSIMD_2VectorArg_Wide_Intrinsic
  102. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  103. [LLVMMatchType<0>, LLVMTruncatedType<0>],
  104. [IntrNoMem]>;
  105. class AdvSIMD_2VectorArg_Narrow_Intrinsic
  106. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  107. [LLVMExtendedType<0>, LLVMExtendedType<0>],
  108. [IntrNoMem]>;
  109. class AdvSIMD_2Arg_Scalar_Narrow_Intrinsic
  110. : DefaultAttrsIntrinsic<[llvm_anyint_ty],
  111. [LLVMExtendedType<0>, llvm_i32_ty],
  112. [IntrNoMem]>;
  113. class AdvSIMD_2VectorArg_Scalar_Expand_BySize_Intrinsic
  114. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  115. [llvm_anyvector_ty],
  116. [IntrNoMem]>;
  117. class AdvSIMD_2VectorArg_Scalar_Wide_BySize_Intrinsic
  118. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  119. [LLVMTruncatedType<0>],
  120. [IntrNoMem]>;
  121. class AdvSIMD_2VectorArg_Scalar_Wide_Intrinsic
  122. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  123. [LLVMTruncatedType<0>, llvm_i32_ty],
  124. [IntrNoMem]>;
  125. class AdvSIMD_2VectorArg_Tied_Narrow_Intrinsic
  126. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  127. [LLVMHalfElementsVectorType<0>, llvm_anyvector_ty],
  128. [IntrNoMem]>;
  129. class AdvSIMD_2VectorArg_Lane_Intrinsic
  130. : DefaultAttrsIntrinsic<[llvm_anyint_ty],
  131. [LLVMMatchType<0>, llvm_anyint_ty, llvm_i32_ty],
  132. [IntrNoMem]>;
  133. class AdvSIMD_3VectorArg_Intrinsic
  134. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  135. [LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>],
  136. [IntrNoMem]>;
  137. class AdvSIMD_3VectorArg_Scalar_Intrinsic
  138. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  139. [LLVMMatchType<0>, LLVMMatchType<0>, llvm_i32_ty],
  140. [IntrNoMem]>;
  141. class AdvSIMD_3VectorArg_Tied_Narrow_Intrinsic
  142. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  143. [LLVMHalfElementsVectorType<0>, llvm_anyvector_ty,
  144. LLVMMatchType<1>], [IntrNoMem]>;
  145. class AdvSIMD_3VectorArg_Scalar_Tied_Narrow_Intrinsic
  146. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  147. [LLVMHalfElementsVectorType<0>, llvm_anyvector_ty, llvm_i32_ty],
  148. [IntrNoMem]>;
  149. class AdvSIMD_CvtFxToFP_Intrinsic
  150. : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [llvm_anyint_ty, llvm_i32_ty],
  151. [IntrNoMem]>;
  152. class AdvSIMD_CvtFPToFx_Intrinsic
  153. : DefaultAttrsIntrinsic<[llvm_anyint_ty], [llvm_anyfloat_ty, llvm_i32_ty],
  154. [IntrNoMem]>;
  155. class AdvSIMD_1Arg_Intrinsic
  156. : DefaultAttrsIntrinsic<[llvm_any_ty], [LLVMMatchType<0>], [IntrNoMem]>;
  157. class AdvSIMD_Dot_Intrinsic
  158. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  159. [LLVMMatchType<0>, llvm_anyvector_ty, LLVMMatchType<1>],
  160. [IntrNoMem]>;
  161. class AdvSIMD_FP16FML_Intrinsic
  162. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  163. [LLVMMatchType<0>, llvm_anyvector_ty, LLVMMatchType<1>],
  164. [IntrNoMem]>;
  165. class AdvSIMD_MatMul_Intrinsic
  166. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  167. [LLVMMatchType<0>, llvm_anyvector_ty, LLVMMatchType<1>],
  168. [IntrNoMem]>;
  169. class AdvSIMD_FML_Intrinsic
  170. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  171. [LLVMMatchType<0>, llvm_anyvector_ty, LLVMMatchType<1>],
  172. [IntrNoMem]>;
  173. class AdvSIMD_BF16FML_Intrinsic
  174. : DefaultAttrsIntrinsic<[llvm_v4f32_ty],
  175. [llvm_v4f32_ty, llvm_v8bf16_ty, llvm_v8bf16_ty],
  176. [IntrNoMem]>;
  177. }
  178. // Arithmetic ops
  179. let TargetPrefix = "aarch64", IntrProperties = [IntrNoMem] in {
  180. // Vector Add Across Lanes
  181. def int_aarch64_neon_saddv : AdvSIMD_1VectorArg_Int_Across_Intrinsic;
  182. def int_aarch64_neon_uaddv : AdvSIMD_1VectorArg_Int_Across_Intrinsic;
  183. def int_aarch64_neon_faddv : AdvSIMD_1VectorArg_Float_Across_Intrinsic;
  184. // Vector Long Add Across Lanes
  185. def int_aarch64_neon_saddlv : AdvSIMD_1VectorArg_Int_Across_Intrinsic;
  186. def int_aarch64_neon_uaddlv : AdvSIMD_1VectorArg_Int_Across_Intrinsic;
  187. // Vector Halving Add
  188. def int_aarch64_neon_shadd : AdvSIMD_2VectorArg_Intrinsic;
  189. def int_aarch64_neon_uhadd : AdvSIMD_2VectorArg_Intrinsic;
  190. // Vector Rounding Halving Add
  191. def int_aarch64_neon_srhadd : AdvSIMD_2VectorArg_Intrinsic;
  192. def int_aarch64_neon_urhadd : AdvSIMD_2VectorArg_Intrinsic;
  193. // Vector Saturating Add
  194. def int_aarch64_neon_sqadd : AdvSIMD_2IntArg_Intrinsic;
  195. def int_aarch64_neon_suqadd : AdvSIMD_2IntArg_Intrinsic;
  196. def int_aarch64_neon_usqadd : AdvSIMD_2IntArg_Intrinsic;
  197. def int_aarch64_neon_uqadd : AdvSIMD_2IntArg_Intrinsic;
  198. // Vector Add High-Half
  199. // FIXME: this is a legacy intrinsic for aarch64_simd.h. Remove it when that
  200. // header is no longer supported.
  201. def int_aarch64_neon_addhn : AdvSIMD_2VectorArg_Narrow_Intrinsic;
  202. // Vector Rounding Add High-Half
  203. def int_aarch64_neon_raddhn : AdvSIMD_2VectorArg_Narrow_Intrinsic;
  204. // Vector Saturating Doubling Multiply High
  205. def int_aarch64_neon_sqdmulh : AdvSIMD_2IntArg_Intrinsic;
  206. def int_aarch64_neon_sqdmulh_lane : AdvSIMD_2VectorArg_Lane_Intrinsic;
  207. def int_aarch64_neon_sqdmulh_laneq : AdvSIMD_2VectorArg_Lane_Intrinsic;
  208. // Vector Saturating Rounding Doubling Multiply High
  209. def int_aarch64_neon_sqrdmulh : AdvSIMD_2IntArg_Intrinsic;
  210. def int_aarch64_neon_sqrdmulh_lane : AdvSIMD_2VectorArg_Lane_Intrinsic;
  211. def int_aarch64_neon_sqrdmulh_laneq : AdvSIMD_2VectorArg_Lane_Intrinsic;
  212. // Vector Polynominal Multiply
  213. def int_aarch64_neon_pmul : AdvSIMD_2VectorArg_Intrinsic;
  214. // Vector Long Multiply
  215. def int_aarch64_neon_smull : AdvSIMD_2VectorArg_Long_Intrinsic;
  216. def int_aarch64_neon_umull : AdvSIMD_2VectorArg_Long_Intrinsic;
  217. def int_aarch64_neon_pmull : AdvSIMD_2VectorArg_Long_Intrinsic;
  218. // 64-bit polynomial multiply really returns an i128, which is not legal. Fake
  219. // it with a v16i8.
  220. def int_aarch64_neon_pmull64 :
  221. DefaultAttrsIntrinsic<[llvm_v16i8_ty], [llvm_i64_ty, llvm_i64_ty], [IntrNoMem]>;
  222. // Vector Extending Multiply
  223. def int_aarch64_neon_fmulx : AdvSIMD_2FloatArg_Intrinsic {
  224. let IntrProperties = [IntrNoMem, Commutative];
  225. }
  226. // Vector Saturating Doubling Long Multiply
  227. def int_aarch64_neon_sqdmull : AdvSIMD_2VectorArg_Long_Intrinsic;
  228. def int_aarch64_neon_sqdmulls_scalar
  229. : DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
  230. // Vector Halving Subtract
  231. def int_aarch64_neon_shsub : AdvSIMD_2VectorArg_Intrinsic;
  232. def int_aarch64_neon_uhsub : AdvSIMD_2VectorArg_Intrinsic;
  233. // Vector Saturating Subtract
  234. def int_aarch64_neon_sqsub : AdvSIMD_2IntArg_Intrinsic;
  235. def int_aarch64_neon_uqsub : AdvSIMD_2IntArg_Intrinsic;
  236. // Vector Subtract High-Half
  237. // FIXME: this is a legacy intrinsic for aarch64_simd.h. Remove it when that
  238. // header is no longer supported.
  239. def int_aarch64_neon_subhn : AdvSIMD_2VectorArg_Narrow_Intrinsic;
  240. // Vector Rounding Subtract High-Half
  241. def int_aarch64_neon_rsubhn : AdvSIMD_2VectorArg_Narrow_Intrinsic;
  242. // Vector Compare Absolute Greater-than-or-equal
  243. def int_aarch64_neon_facge : AdvSIMD_2Arg_FloatCompare_Intrinsic;
  244. // Vector Compare Absolute Greater-than
  245. def int_aarch64_neon_facgt : AdvSIMD_2Arg_FloatCompare_Intrinsic;
  246. // Vector Absolute Difference
  247. def int_aarch64_neon_sabd : AdvSIMD_2VectorArg_Intrinsic;
  248. def int_aarch64_neon_uabd : AdvSIMD_2VectorArg_Intrinsic;
  249. def int_aarch64_neon_fabd : AdvSIMD_2VectorArg_Intrinsic;
  250. // Scalar Absolute Difference
  251. def int_aarch64_sisd_fabd : AdvSIMD_2Scalar_Float_Intrinsic;
  252. // Vector Max
  253. def int_aarch64_neon_smax : AdvSIMD_2VectorArg_Intrinsic;
  254. def int_aarch64_neon_umax : AdvSIMD_2VectorArg_Intrinsic;
  255. def int_aarch64_neon_fmax : AdvSIMD_2FloatArg_Intrinsic;
  256. def int_aarch64_neon_fmaxnmp : AdvSIMD_2VectorArg_Intrinsic;
  257. // Vector Max Across Lanes
  258. def int_aarch64_neon_smaxv : AdvSIMD_1VectorArg_Int_Across_Intrinsic;
  259. def int_aarch64_neon_umaxv : AdvSIMD_1VectorArg_Int_Across_Intrinsic;
  260. def int_aarch64_neon_fmaxv : AdvSIMD_1VectorArg_Float_Across_Intrinsic;
  261. def int_aarch64_neon_fmaxnmv : AdvSIMD_1VectorArg_Float_Across_Intrinsic;
  262. // Vector Min
  263. def int_aarch64_neon_smin : AdvSIMD_2VectorArg_Intrinsic;
  264. def int_aarch64_neon_umin : AdvSIMD_2VectorArg_Intrinsic;
  265. def int_aarch64_neon_fmin : AdvSIMD_2FloatArg_Intrinsic;
  266. def int_aarch64_neon_fminnmp : AdvSIMD_2VectorArg_Intrinsic;
  267. // Vector Min/Max Number
  268. def int_aarch64_neon_fminnm : AdvSIMD_2FloatArg_Intrinsic;
  269. def int_aarch64_neon_fmaxnm : AdvSIMD_2FloatArg_Intrinsic;
  270. // Vector Min Across Lanes
  271. def int_aarch64_neon_sminv : AdvSIMD_1VectorArg_Int_Across_Intrinsic;
  272. def int_aarch64_neon_uminv : AdvSIMD_1VectorArg_Int_Across_Intrinsic;
  273. def int_aarch64_neon_fminv : AdvSIMD_1VectorArg_Float_Across_Intrinsic;
  274. def int_aarch64_neon_fminnmv : AdvSIMD_1VectorArg_Float_Across_Intrinsic;
  275. // Pairwise Add
  276. def int_aarch64_neon_addp : AdvSIMD_2VectorArg_Intrinsic;
  277. def int_aarch64_neon_faddp : AdvSIMD_2VectorArg_Intrinsic;
  278. // Long Pairwise Add
  279. // FIXME: In theory, we shouldn't need intrinsics for saddlp or
  280. // uaddlp, but tblgen's type inference currently can't handle the
  281. // pattern fragments this ends up generating.
  282. def int_aarch64_neon_saddlp : AdvSIMD_1VectorArg_Expand_Intrinsic;
  283. def int_aarch64_neon_uaddlp : AdvSIMD_1VectorArg_Expand_Intrinsic;
  284. // Folding Maximum
  285. def int_aarch64_neon_smaxp : AdvSIMD_2VectorArg_Intrinsic;
  286. def int_aarch64_neon_umaxp : AdvSIMD_2VectorArg_Intrinsic;
  287. def int_aarch64_neon_fmaxp : AdvSIMD_2VectorArg_Intrinsic;
  288. // Folding Minimum
  289. def int_aarch64_neon_sminp : AdvSIMD_2VectorArg_Intrinsic;
  290. def int_aarch64_neon_uminp : AdvSIMD_2VectorArg_Intrinsic;
  291. def int_aarch64_neon_fminp : AdvSIMD_2VectorArg_Intrinsic;
  292. // Reciprocal Estimate/Step
  293. def int_aarch64_neon_frecps : AdvSIMD_2FloatArg_Intrinsic;
  294. def int_aarch64_neon_frsqrts : AdvSIMD_2FloatArg_Intrinsic;
  295. // Reciprocal Exponent
  296. def int_aarch64_neon_frecpx : AdvSIMD_1FloatArg_Intrinsic;
  297. // Vector Saturating Shift Left
  298. def int_aarch64_neon_sqshl : AdvSIMD_2IntArg_Intrinsic;
  299. def int_aarch64_neon_uqshl : AdvSIMD_2IntArg_Intrinsic;
  300. // Vector Rounding Shift Left
  301. def int_aarch64_neon_srshl : AdvSIMD_2IntArg_Intrinsic;
  302. def int_aarch64_neon_urshl : AdvSIMD_2IntArg_Intrinsic;
  303. // Vector Saturating Rounding Shift Left
  304. def int_aarch64_neon_sqrshl : AdvSIMD_2IntArg_Intrinsic;
  305. def int_aarch64_neon_uqrshl : AdvSIMD_2IntArg_Intrinsic;
  306. // Vector Signed->Unsigned Shift Left by Constant
  307. def int_aarch64_neon_sqshlu : AdvSIMD_2IntArg_Intrinsic;
  308. // Vector Signed->Unsigned Narrowing Saturating Shift Right by Constant
  309. def int_aarch64_neon_sqshrun : AdvSIMD_2Arg_Scalar_Narrow_Intrinsic;
  310. // Vector Signed->Unsigned Rounding Narrowing Saturating Shift Right by Const
  311. def int_aarch64_neon_sqrshrun : AdvSIMD_2Arg_Scalar_Narrow_Intrinsic;
  312. // Vector Narrowing Shift Right by Constant
  313. def int_aarch64_neon_sqshrn : AdvSIMD_2Arg_Scalar_Narrow_Intrinsic;
  314. def int_aarch64_neon_uqshrn : AdvSIMD_2Arg_Scalar_Narrow_Intrinsic;
  315. // Vector Rounding Narrowing Shift Right by Constant
  316. def int_aarch64_neon_rshrn : AdvSIMD_2Arg_Scalar_Narrow_Intrinsic;
  317. // Vector Rounding Narrowing Saturating Shift Right by Constant
  318. def int_aarch64_neon_sqrshrn : AdvSIMD_2Arg_Scalar_Narrow_Intrinsic;
  319. def int_aarch64_neon_uqrshrn : AdvSIMD_2Arg_Scalar_Narrow_Intrinsic;
  320. // Vector Shift Left
  321. def int_aarch64_neon_sshl : AdvSIMD_2IntArg_Intrinsic;
  322. def int_aarch64_neon_ushl : AdvSIMD_2IntArg_Intrinsic;
  323. // Vector Widening Shift Left by Constant
  324. def int_aarch64_neon_shll : AdvSIMD_2VectorArg_Scalar_Wide_BySize_Intrinsic;
  325. def int_aarch64_neon_sshll : AdvSIMD_2VectorArg_Scalar_Wide_Intrinsic;
  326. def int_aarch64_neon_ushll : AdvSIMD_2VectorArg_Scalar_Wide_Intrinsic;
  327. // Vector Shift Right by Constant and Insert
  328. def int_aarch64_neon_vsri : AdvSIMD_3VectorArg_Scalar_Intrinsic;
  329. // Vector Shift Left by Constant and Insert
  330. def int_aarch64_neon_vsli : AdvSIMD_3VectorArg_Scalar_Intrinsic;
  331. // Vector Saturating Narrow
  332. def int_aarch64_neon_scalar_sqxtn: AdvSIMD_1IntArg_Narrow_Intrinsic;
  333. def int_aarch64_neon_scalar_uqxtn : AdvSIMD_1IntArg_Narrow_Intrinsic;
  334. def int_aarch64_neon_sqxtn : AdvSIMD_1VectorArg_Narrow_Intrinsic;
  335. def int_aarch64_neon_uqxtn : AdvSIMD_1VectorArg_Narrow_Intrinsic;
  336. // Vector Saturating Extract and Unsigned Narrow
  337. def int_aarch64_neon_scalar_sqxtun : AdvSIMD_1IntArg_Narrow_Intrinsic;
  338. def int_aarch64_neon_sqxtun : AdvSIMD_1VectorArg_Narrow_Intrinsic;
  339. // Vector Absolute Value
  340. def int_aarch64_neon_abs : AdvSIMD_1Arg_Intrinsic;
  341. // Vector Saturating Absolute Value
  342. def int_aarch64_neon_sqabs : AdvSIMD_1IntArg_Intrinsic;
  343. // Vector Saturating Negation
  344. def int_aarch64_neon_sqneg : AdvSIMD_1IntArg_Intrinsic;
  345. // Vector Count Leading Sign Bits
  346. def int_aarch64_neon_cls : AdvSIMD_1VectorArg_Intrinsic;
  347. // Vector Reciprocal Estimate
  348. def int_aarch64_neon_urecpe : AdvSIMD_1VectorArg_Intrinsic;
  349. def int_aarch64_neon_frecpe : AdvSIMD_1FloatArg_Intrinsic;
  350. // Vector Square Root Estimate
  351. def int_aarch64_neon_ursqrte : AdvSIMD_1VectorArg_Intrinsic;
  352. def int_aarch64_neon_frsqrte : AdvSIMD_1FloatArg_Intrinsic;
  353. // Vector Bitwise Reverse
  354. def int_aarch64_neon_rbit : AdvSIMD_1VectorArg_Intrinsic;
  355. // Vector Conversions Between Half-Precision and Single-Precision.
  356. def int_aarch64_neon_vcvtfp2hf
  357. : DefaultAttrsIntrinsic<[llvm_v4i16_ty], [llvm_v4f32_ty], [IntrNoMem]>;
  358. def int_aarch64_neon_vcvthf2fp
  359. : DefaultAttrsIntrinsic<[llvm_v4f32_ty], [llvm_v4i16_ty], [IntrNoMem]>;
  360. // Vector Conversions Between Floating-point and Fixed-point.
  361. def int_aarch64_neon_vcvtfp2fxs : AdvSIMD_CvtFPToFx_Intrinsic;
  362. def int_aarch64_neon_vcvtfp2fxu : AdvSIMD_CvtFPToFx_Intrinsic;
  363. def int_aarch64_neon_vcvtfxs2fp : AdvSIMD_CvtFxToFP_Intrinsic;
  364. def int_aarch64_neon_vcvtfxu2fp : AdvSIMD_CvtFxToFP_Intrinsic;
  365. // Vector FP->Int Conversions
  366. def int_aarch64_neon_fcvtas : AdvSIMD_FPToIntRounding_Intrinsic;
  367. def int_aarch64_neon_fcvtau : AdvSIMD_FPToIntRounding_Intrinsic;
  368. def int_aarch64_neon_fcvtms : AdvSIMD_FPToIntRounding_Intrinsic;
  369. def int_aarch64_neon_fcvtmu : AdvSIMD_FPToIntRounding_Intrinsic;
  370. def int_aarch64_neon_fcvtns : AdvSIMD_FPToIntRounding_Intrinsic;
  371. def int_aarch64_neon_fcvtnu : AdvSIMD_FPToIntRounding_Intrinsic;
  372. def int_aarch64_neon_fcvtps : AdvSIMD_FPToIntRounding_Intrinsic;
  373. def int_aarch64_neon_fcvtpu : AdvSIMD_FPToIntRounding_Intrinsic;
  374. def int_aarch64_neon_fcvtzs : AdvSIMD_FPToIntRounding_Intrinsic;
  375. def int_aarch64_neon_fcvtzu : AdvSIMD_FPToIntRounding_Intrinsic;
  376. // Vector FP Rounding: only ties to even is unrepresented by a normal
  377. // intrinsic.
  378. def int_aarch64_neon_frintn : AdvSIMD_1FloatArg_Intrinsic;
  379. // Scalar FP->Int conversions
  380. // Vector FP Inexact Narrowing
  381. def int_aarch64_neon_fcvtxn : AdvSIMD_1VectorArg_Expand_Intrinsic;
  382. // Scalar FP Inexact Narrowing
  383. def int_aarch64_sisd_fcvtxn : DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_double_ty],
  384. [IntrNoMem]>;
  385. // v8.2-A Dot Product
  386. def int_aarch64_neon_udot : AdvSIMD_Dot_Intrinsic;
  387. def int_aarch64_neon_sdot : AdvSIMD_Dot_Intrinsic;
  388. // v8.6-A Matrix Multiply Intrinsics
  389. def int_aarch64_neon_ummla : AdvSIMD_MatMul_Intrinsic;
  390. def int_aarch64_neon_smmla : AdvSIMD_MatMul_Intrinsic;
  391. def int_aarch64_neon_usmmla : AdvSIMD_MatMul_Intrinsic;
  392. def int_aarch64_neon_usdot : AdvSIMD_Dot_Intrinsic;
  393. def int_aarch64_neon_bfdot : AdvSIMD_Dot_Intrinsic;
  394. def int_aarch64_neon_bfmmla
  395. : DefaultAttrsIntrinsic<[llvm_v4f32_ty],
  396. [llvm_v4f32_ty, llvm_v8bf16_ty, llvm_v8bf16_ty],
  397. [IntrNoMem]>;
  398. def int_aarch64_neon_bfmlalb : AdvSIMD_BF16FML_Intrinsic;
  399. def int_aarch64_neon_bfmlalt : AdvSIMD_BF16FML_Intrinsic;
  400. // v8.6-A Bfloat Intrinsics
  401. def int_aarch64_neon_bfcvt
  402. : DefaultAttrsIntrinsic<[llvm_bfloat_ty], [llvm_float_ty], [IntrNoMem]>;
  403. def int_aarch64_neon_bfcvtn
  404. : DefaultAttrsIntrinsic<[llvm_v8bf16_ty], [llvm_v4f32_ty], [IntrNoMem]>;
  405. def int_aarch64_neon_bfcvtn2
  406. : DefaultAttrsIntrinsic<[llvm_v8bf16_ty],
  407. [llvm_v8bf16_ty, llvm_v4f32_ty],
  408. [IntrNoMem]>;
  409. // v8.2-A FP16 Fused Multiply-Add Long
  410. def int_aarch64_neon_fmlal : AdvSIMD_FP16FML_Intrinsic;
  411. def int_aarch64_neon_fmlsl : AdvSIMD_FP16FML_Intrinsic;
  412. def int_aarch64_neon_fmlal2 : AdvSIMD_FP16FML_Intrinsic;
  413. def int_aarch64_neon_fmlsl2 : AdvSIMD_FP16FML_Intrinsic;
  414. // v8.3-A Floating-point complex add
  415. def int_aarch64_neon_vcadd_rot90 : AdvSIMD_2VectorArg_Intrinsic;
  416. def int_aarch64_neon_vcadd_rot270 : AdvSIMD_2VectorArg_Intrinsic;
  417. def int_aarch64_neon_vcmla_rot0 : AdvSIMD_3VectorArg_Intrinsic;
  418. def int_aarch64_neon_vcmla_rot90 : AdvSIMD_3VectorArg_Intrinsic;
  419. def int_aarch64_neon_vcmla_rot180 : AdvSIMD_3VectorArg_Intrinsic;
  420. def int_aarch64_neon_vcmla_rot270 : AdvSIMD_3VectorArg_Intrinsic;
  421. }
  422. let TargetPrefix = "aarch64" in { // All intrinsics start with "llvm.aarch64.".
  423. class AdvSIMD_2Vector2Index_Intrinsic
  424. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  425. [llvm_anyvector_ty, llvm_i64_ty, LLVMMatchType<0>, llvm_i64_ty],
  426. [IntrNoMem]>;
  427. }
  428. // Vector element to element moves
  429. def int_aarch64_neon_vcopy_lane: AdvSIMD_2Vector2Index_Intrinsic;
  430. let TargetPrefix = "aarch64" in { // All intrinsics start with "llvm.aarch64.".
  431. class AdvSIMD_1Vec_Load_Intrinsic
  432. : DefaultAttrsIntrinsic<[llvm_anyvector_ty], [LLVMAnyPointerType<LLVMMatchType<0>>],
  433. [IntrReadMem, IntrArgMemOnly]>;
  434. class AdvSIMD_1Vec_Store_Lane_Intrinsic
  435. : DefaultAttrsIntrinsic<[], [llvm_anyvector_ty, llvm_i64_ty, llvm_anyptr_ty],
  436. [IntrArgMemOnly, NoCapture<ArgIndex<2>>]>;
  437. class AdvSIMD_2Vec_Load_Intrinsic
  438. : DefaultAttrsIntrinsic<[LLVMMatchType<0>, llvm_anyvector_ty],
  439. [LLVMAnyPointerType<LLVMMatchType<0>>],
  440. [IntrReadMem, IntrArgMemOnly]>;
  441. class AdvSIMD_2Vec_Load_Lane_Intrinsic
  442. : DefaultAttrsIntrinsic<[LLVMMatchType<0>, LLVMMatchType<0>],
  443. [LLVMMatchType<0>, llvm_anyvector_ty,
  444. llvm_i64_ty, llvm_anyptr_ty],
  445. [IntrReadMem, IntrArgMemOnly]>;
  446. class AdvSIMD_2Vec_Store_Intrinsic
  447. : DefaultAttrsIntrinsic<[], [llvm_anyvector_ty, LLVMMatchType<0>,
  448. LLVMAnyPointerType<LLVMMatchType<0>>],
  449. [IntrArgMemOnly, NoCapture<ArgIndex<2>>]>;
  450. class AdvSIMD_2Vec_Store_Lane_Intrinsic
  451. : DefaultAttrsIntrinsic<[], [llvm_anyvector_ty, LLVMMatchType<0>,
  452. llvm_i64_ty, llvm_anyptr_ty],
  453. [IntrArgMemOnly, NoCapture<ArgIndex<3>>]>;
  454. class AdvSIMD_3Vec_Load_Intrinsic
  455. : DefaultAttrsIntrinsic<[LLVMMatchType<0>, LLVMMatchType<0>, llvm_anyvector_ty],
  456. [LLVMAnyPointerType<LLVMMatchType<0>>],
  457. [IntrReadMem, IntrArgMemOnly]>;
  458. class AdvSIMD_3Vec_Load_Lane_Intrinsic
  459. : DefaultAttrsIntrinsic<[LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>],
  460. [LLVMMatchType<0>, LLVMMatchType<0>, llvm_anyvector_ty,
  461. llvm_i64_ty, llvm_anyptr_ty],
  462. [IntrReadMem, IntrArgMemOnly]>;
  463. class AdvSIMD_3Vec_Store_Intrinsic
  464. : DefaultAttrsIntrinsic<[], [llvm_anyvector_ty, LLVMMatchType<0>,
  465. LLVMMatchType<0>, LLVMAnyPointerType<LLVMMatchType<0>>],
  466. [IntrArgMemOnly, NoCapture<ArgIndex<3>>]>;
  467. class AdvSIMD_3Vec_Store_Lane_Intrinsic
  468. : DefaultAttrsIntrinsic<[], [llvm_anyvector_ty,
  469. LLVMMatchType<0>, LLVMMatchType<0>,
  470. llvm_i64_ty, llvm_anyptr_ty],
  471. [IntrArgMemOnly, NoCapture<ArgIndex<4>>]>;
  472. class AdvSIMD_4Vec_Load_Intrinsic
  473. : DefaultAttrsIntrinsic<[LLVMMatchType<0>, LLVMMatchType<0>,
  474. LLVMMatchType<0>, llvm_anyvector_ty],
  475. [LLVMAnyPointerType<LLVMMatchType<0>>],
  476. [IntrReadMem, IntrArgMemOnly]>;
  477. class AdvSIMD_4Vec_Load_Lane_Intrinsic
  478. : DefaultAttrsIntrinsic<[LLVMMatchType<0>, LLVMMatchType<0>,
  479. LLVMMatchType<0>, LLVMMatchType<0>],
  480. [LLVMMatchType<0>, LLVMMatchType<0>,
  481. LLVMMatchType<0>, llvm_anyvector_ty,
  482. llvm_i64_ty, llvm_anyptr_ty],
  483. [IntrReadMem, IntrArgMemOnly]>;
  484. class AdvSIMD_4Vec_Store_Intrinsic
  485. : DefaultAttrsIntrinsic<[], [llvm_anyvector_ty, LLVMMatchType<0>,
  486. LLVMMatchType<0>, LLVMMatchType<0>,
  487. LLVMAnyPointerType<LLVMMatchType<0>>],
  488. [IntrArgMemOnly, NoCapture<ArgIndex<4>>]>;
  489. class AdvSIMD_4Vec_Store_Lane_Intrinsic
  490. : DefaultAttrsIntrinsic<[], [llvm_anyvector_ty, LLVMMatchType<0>,
  491. LLVMMatchType<0>, LLVMMatchType<0>,
  492. llvm_i64_ty, llvm_anyptr_ty],
  493. [IntrArgMemOnly, NoCapture<ArgIndex<5>>]>;
  494. }
  495. // Memory ops
  496. def int_aarch64_neon_ld1x2 : AdvSIMD_2Vec_Load_Intrinsic;
  497. def int_aarch64_neon_ld1x3 : AdvSIMD_3Vec_Load_Intrinsic;
  498. def int_aarch64_neon_ld1x4 : AdvSIMD_4Vec_Load_Intrinsic;
  499. def int_aarch64_neon_st1x2 : AdvSIMD_2Vec_Store_Intrinsic;
  500. def int_aarch64_neon_st1x3 : AdvSIMD_3Vec_Store_Intrinsic;
  501. def int_aarch64_neon_st1x4 : AdvSIMD_4Vec_Store_Intrinsic;
  502. def int_aarch64_neon_ld2 : AdvSIMD_2Vec_Load_Intrinsic;
  503. def int_aarch64_neon_ld3 : AdvSIMD_3Vec_Load_Intrinsic;
  504. def int_aarch64_neon_ld4 : AdvSIMD_4Vec_Load_Intrinsic;
  505. def int_aarch64_neon_ld2lane : AdvSIMD_2Vec_Load_Lane_Intrinsic;
  506. def int_aarch64_neon_ld3lane : AdvSIMD_3Vec_Load_Lane_Intrinsic;
  507. def int_aarch64_neon_ld4lane : AdvSIMD_4Vec_Load_Lane_Intrinsic;
  508. def int_aarch64_neon_ld2r : AdvSIMD_2Vec_Load_Intrinsic;
  509. def int_aarch64_neon_ld3r : AdvSIMD_3Vec_Load_Intrinsic;
  510. def int_aarch64_neon_ld4r : AdvSIMD_4Vec_Load_Intrinsic;
  511. def int_aarch64_neon_st2 : AdvSIMD_2Vec_Store_Intrinsic;
  512. def int_aarch64_neon_st3 : AdvSIMD_3Vec_Store_Intrinsic;
  513. def int_aarch64_neon_st4 : AdvSIMD_4Vec_Store_Intrinsic;
  514. def int_aarch64_neon_st2lane : AdvSIMD_2Vec_Store_Lane_Intrinsic;
  515. def int_aarch64_neon_st3lane : AdvSIMD_3Vec_Store_Lane_Intrinsic;
  516. def int_aarch64_neon_st4lane : AdvSIMD_4Vec_Store_Lane_Intrinsic;
  517. let TargetPrefix = "aarch64" in { // All intrinsics start with "llvm.aarch64.".
  518. class AdvSIMD_Tbl1_Intrinsic
  519. : DefaultAttrsIntrinsic<[llvm_anyvector_ty], [llvm_v16i8_ty, LLVMMatchType<0>],
  520. [IntrNoMem]>;
  521. class AdvSIMD_Tbl2_Intrinsic
  522. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  523. [llvm_v16i8_ty, llvm_v16i8_ty, LLVMMatchType<0>], [IntrNoMem]>;
  524. class AdvSIMD_Tbl3_Intrinsic
  525. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  526. [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty,
  527. LLVMMatchType<0>],
  528. [IntrNoMem]>;
  529. class AdvSIMD_Tbl4_Intrinsic
  530. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  531. [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty,
  532. LLVMMatchType<0>],
  533. [IntrNoMem]>;
  534. class AdvSIMD_Tbx1_Intrinsic
  535. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  536. [LLVMMatchType<0>, llvm_v16i8_ty, LLVMMatchType<0>],
  537. [IntrNoMem]>;
  538. class AdvSIMD_Tbx2_Intrinsic
  539. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  540. [LLVMMatchType<0>, llvm_v16i8_ty, llvm_v16i8_ty,
  541. LLVMMatchType<0>],
  542. [IntrNoMem]>;
  543. class AdvSIMD_Tbx3_Intrinsic
  544. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  545. [LLVMMatchType<0>, llvm_v16i8_ty, llvm_v16i8_ty,
  546. llvm_v16i8_ty, LLVMMatchType<0>],
  547. [IntrNoMem]>;
  548. class AdvSIMD_Tbx4_Intrinsic
  549. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  550. [LLVMMatchType<0>, llvm_v16i8_ty, llvm_v16i8_ty,
  551. llvm_v16i8_ty, llvm_v16i8_ty, LLVMMatchType<0>],
  552. [IntrNoMem]>;
  553. }
  554. def int_aarch64_neon_tbl1 : AdvSIMD_Tbl1_Intrinsic;
  555. def int_aarch64_neon_tbl2 : AdvSIMD_Tbl2_Intrinsic;
  556. def int_aarch64_neon_tbl3 : AdvSIMD_Tbl3_Intrinsic;
  557. def int_aarch64_neon_tbl4 : AdvSIMD_Tbl4_Intrinsic;
  558. def int_aarch64_neon_tbx1 : AdvSIMD_Tbx1_Intrinsic;
  559. def int_aarch64_neon_tbx2 : AdvSIMD_Tbx2_Intrinsic;
  560. def int_aarch64_neon_tbx3 : AdvSIMD_Tbx3_Intrinsic;
  561. def int_aarch64_neon_tbx4 : AdvSIMD_Tbx4_Intrinsic;
  562. let TargetPrefix = "aarch64" in {
  563. class FPCR_Get_Intrinsic
  564. : DefaultAttrsIntrinsic<[llvm_i64_ty], [], [IntrNoMem, IntrHasSideEffects]>;
  565. }
  566. // FPCR
  567. def int_aarch64_get_fpcr : FPCR_Get_Intrinsic;
  568. let TargetPrefix = "aarch64" in {
  569. class Crypto_AES_DataKey_Intrinsic
  570. : DefaultAttrsIntrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
  571. class Crypto_AES_Data_Intrinsic
  572. : DefaultAttrsIntrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty], [IntrNoMem]>;
  573. // SHA intrinsic taking 5 words of the hash (v4i32, i32) and 4 of the schedule
  574. // (v4i32).
  575. class Crypto_SHA_5Hash4Schedule_Intrinsic
  576. : DefaultAttrsIntrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty, llvm_v4i32_ty],
  577. [IntrNoMem]>;
  578. // SHA intrinsic taking 5 words of the hash (v4i32, i32) and 4 of the schedule
  579. // (v4i32).
  580. class Crypto_SHA_1Hash_Intrinsic
  581. : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem]>;
  582. // SHA intrinsic taking 8 words of the schedule
  583. class Crypto_SHA_8Schedule_Intrinsic
  584. : DefaultAttrsIntrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
  585. // SHA intrinsic taking 12 words of the schedule
  586. class Crypto_SHA_12Schedule_Intrinsic
  587. : DefaultAttrsIntrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
  588. [IntrNoMem]>;
  589. // SHA intrinsic taking 8 words of the hash and 4 of the schedule.
  590. class Crypto_SHA_8Hash4Schedule_Intrinsic
  591. : DefaultAttrsIntrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
  592. [IntrNoMem]>;
  593. }
  594. // AES
  595. def int_aarch64_crypto_aese : Crypto_AES_DataKey_Intrinsic;
  596. def int_aarch64_crypto_aesd : Crypto_AES_DataKey_Intrinsic;
  597. def int_aarch64_crypto_aesmc : Crypto_AES_Data_Intrinsic;
  598. def int_aarch64_crypto_aesimc : Crypto_AES_Data_Intrinsic;
  599. // SHA1
  600. def int_aarch64_crypto_sha1c : Crypto_SHA_5Hash4Schedule_Intrinsic;
  601. def int_aarch64_crypto_sha1p : Crypto_SHA_5Hash4Schedule_Intrinsic;
  602. def int_aarch64_crypto_sha1m : Crypto_SHA_5Hash4Schedule_Intrinsic;
  603. def int_aarch64_crypto_sha1h : Crypto_SHA_1Hash_Intrinsic;
  604. def int_aarch64_crypto_sha1su0 : Crypto_SHA_12Schedule_Intrinsic;
  605. def int_aarch64_crypto_sha1su1 : Crypto_SHA_8Schedule_Intrinsic;
  606. // SHA256
  607. def int_aarch64_crypto_sha256h : Crypto_SHA_8Hash4Schedule_Intrinsic;
  608. def int_aarch64_crypto_sha256h2 : Crypto_SHA_8Hash4Schedule_Intrinsic;
  609. def int_aarch64_crypto_sha256su0 : Crypto_SHA_8Schedule_Intrinsic;
  610. def int_aarch64_crypto_sha256su1 : Crypto_SHA_12Schedule_Intrinsic;
  611. //===----------------------------------------------------------------------===//
  612. // CRC32
  613. let TargetPrefix = "aarch64" in {
  614. def int_aarch64_crc32b : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  615. [IntrNoMem]>;
  616. def int_aarch64_crc32cb : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  617. [IntrNoMem]>;
  618. def int_aarch64_crc32h : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  619. [IntrNoMem]>;
  620. def int_aarch64_crc32ch : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  621. [IntrNoMem]>;
  622. def int_aarch64_crc32w : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  623. [IntrNoMem]>;
  624. def int_aarch64_crc32cw : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  625. [IntrNoMem]>;
  626. def int_aarch64_crc32x : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i64_ty],
  627. [IntrNoMem]>;
  628. def int_aarch64_crc32cx : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i64_ty],
  629. [IntrNoMem]>;
  630. }
  631. //===----------------------------------------------------------------------===//
  632. // Memory Tagging Extensions (MTE) Intrinsics
  633. let TargetPrefix = "aarch64" in {
  634. def int_aarch64_irg : DefaultAttrsIntrinsic<[llvm_ptr_ty], [llvm_ptr_ty, llvm_i64_ty],
  635. [IntrNoMem, IntrHasSideEffects]>;
  636. def int_aarch64_addg : DefaultAttrsIntrinsic<[llvm_ptr_ty], [llvm_ptr_ty, llvm_i64_ty],
  637. [IntrNoMem]>;
  638. def int_aarch64_gmi : DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_ptr_ty, llvm_i64_ty],
  639. [IntrNoMem]>;
  640. def int_aarch64_ldg : DefaultAttrsIntrinsic<[llvm_ptr_ty], [llvm_ptr_ty, llvm_ptr_ty],
  641. [IntrReadMem]>;
  642. def int_aarch64_stg : DefaultAttrsIntrinsic<[], [llvm_ptr_ty, llvm_ptr_ty],
  643. [IntrWriteMem]>;
  644. def int_aarch64_subp : DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_ptr_ty, llvm_ptr_ty],
  645. [IntrNoMem]>;
  646. // The following are codegen-only intrinsics for stack instrumentation.
  647. // Generate a randomly tagged stack base pointer.
  648. def int_aarch64_irg_sp : DefaultAttrsIntrinsic<[llvm_ptr_ty], [llvm_i64_ty],
  649. [IntrNoMem, IntrHasSideEffects]>;
  650. // Transfer pointer tag with offset.
  651. // ptr1 = tagp(ptr0, baseptr, tag_offset) returns a pointer where
  652. // * address is the address in ptr0
  653. // * tag is a function of (tag in baseptr, tag_offset).
  654. // ** Beware, this is not the same function as implemented by the ADDG instruction!
  655. // Backend optimizations may change tag_offset; the only guarantee is that calls
  656. // to tagp with the same pair of (baseptr, tag_offset) will produce pointers
  657. // with the same tag value, assuming the set of excluded tags has not changed.
  658. // Address bits in baseptr and tag bits in ptr0 are ignored.
  659. // When offset between ptr0 and baseptr is a compile time constant, this can be emitted as
  660. // ADDG ptr1, baseptr, (ptr0 - baseptr), tag_offset
  661. // It is intended that ptr0 is an alloca address, and baseptr is the direct output of llvm.aarch64.irg.sp.
  662. def int_aarch64_tagp : DefaultAttrsIntrinsic<[llvm_anyptr_ty], [LLVMMatchType<0>, llvm_ptr_ty, llvm_i64_ty],
  663. [IntrNoMem, ImmArg<ArgIndex<2>>]>;
  664. // Update allocation tags for the memory range to match the tag in the pointer argument.
  665. def int_aarch64_settag : DefaultAttrsIntrinsic<[], [llvm_ptr_ty, llvm_i64_ty],
  666. [IntrWriteMem, IntrArgMemOnly, NoCapture<ArgIndex<0>>, WriteOnly<ArgIndex<0>>]>;
  667. // Update allocation tags for the memory range to match the tag in the pointer argument,
  668. // and set memory contents to zero.
  669. def int_aarch64_settag_zero : DefaultAttrsIntrinsic<[], [llvm_ptr_ty, llvm_i64_ty],
  670. [IntrWriteMem, IntrArgMemOnly, NoCapture<ArgIndex<0>>, WriteOnly<ArgIndex<0>>]>;
  671. // Update allocation tags for 16-aligned, 16-sized memory region, and store a pair 8-byte values.
  672. def int_aarch64_stgp : DefaultAttrsIntrinsic<[], [llvm_ptr_ty, llvm_i64_ty, llvm_i64_ty],
  673. [IntrWriteMem, IntrArgMemOnly, NoCapture<ArgIndex<0>>, WriteOnly<ArgIndex<0>>]>;
  674. }
  675. // Transactional Memory Extension (TME) Intrinsics
  676. let TargetPrefix = "aarch64" in {
  677. def int_aarch64_tstart : GCCBuiltin<"__builtin_arm_tstart">,
  678. Intrinsic<[llvm_i64_ty], [], [IntrWillReturn]>;
  679. def int_aarch64_tcommit : GCCBuiltin<"__builtin_arm_tcommit">, Intrinsic<[], [], [IntrWillReturn]>;
  680. def int_aarch64_tcancel : GCCBuiltin<"__builtin_arm_tcancel">,
  681. Intrinsic<[], [llvm_i64_ty], [IntrWillReturn, ImmArg<ArgIndex<0>>]>;
  682. def int_aarch64_ttest : GCCBuiltin<"__builtin_arm_ttest">,
  683. Intrinsic<[llvm_i64_ty], [],
  684. [IntrNoMem, IntrHasSideEffects, IntrWillReturn]>;
  685. // Armv8.7-A load/store 64-byte intrinsics
  686. defvar data512 = !listsplat(llvm_i64_ty, 8);
  687. def int_aarch64_ld64b: Intrinsic<data512, [llvm_ptr_ty]>;
  688. def int_aarch64_st64b: Intrinsic<[], !listconcat([llvm_ptr_ty], data512)>;
  689. def int_aarch64_st64bv: Intrinsic<[llvm_i64_ty], !listconcat([llvm_ptr_ty], data512)>;
  690. def int_aarch64_st64bv0: Intrinsic<[llvm_i64_ty], !listconcat([llvm_ptr_ty], data512)>;
  691. }
  692. def llvm_nxv2i1_ty : LLVMType<nxv2i1>;
  693. def llvm_nxv4i1_ty : LLVMType<nxv4i1>;
  694. def llvm_nxv8i1_ty : LLVMType<nxv8i1>;
  695. def llvm_nxv16i1_ty : LLVMType<nxv16i1>;
  696. def llvm_nxv16i8_ty : LLVMType<nxv16i8>;
  697. def llvm_nxv4i32_ty : LLVMType<nxv4i32>;
  698. def llvm_nxv2i64_ty : LLVMType<nxv2i64>;
  699. def llvm_nxv8f16_ty : LLVMType<nxv8f16>;
  700. def llvm_nxv8bf16_ty : LLVMType<nxv8bf16>;
  701. def llvm_nxv4f32_ty : LLVMType<nxv4f32>;
  702. def llvm_nxv2f64_ty : LLVMType<nxv2f64>;
  703. let TargetPrefix = "aarch64" in { // All intrinsics start with "llvm.aarch64.".
  704. class AdvSIMD_SVE_Create_2Vector_Tuple
  705. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  706. [llvm_anyvector_ty, LLVMMatchType<1>],
  707. [IntrReadMem]>;
  708. class AdvSIMD_SVE_Create_3Vector_Tuple
  709. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  710. [llvm_anyvector_ty, LLVMMatchType<1>, LLVMMatchType<1>],
  711. [IntrReadMem]>;
  712. class AdvSIMD_SVE_Create_4Vector_Tuple
  713. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  714. [llvm_anyvector_ty, LLVMMatchType<1>, LLVMMatchType<1>,
  715. LLVMMatchType<1>],
  716. [IntrReadMem]>;
  717. class AdvSIMD_SVE_Set_Vector_Tuple
  718. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  719. [LLVMMatchType<0>, llvm_i32_ty, llvm_anyvector_ty],
  720. [IntrReadMem, ImmArg<ArgIndex<1>>]>;
  721. class AdvSIMD_SVE_Get_Vector_Tuple
  722. : DefaultAttrsIntrinsic<[llvm_anyvector_ty], [llvm_anyvector_ty, llvm_i32_ty],
  723. [IntrReadMem, IntrArgMemOnly, ImmArg<ArgIndex<1>>]>;
  724. class AdvSIMD_ManyVec_PredLoad_Intrinsic
  725. : DefaultAttrsIntrinsic<[llvm_anyvector_ty], [llvm_anyvector_ty, LLVMPointerToElt<0>],
  726. [IntrReadMem, IntrArgMemOnly]>;
  727. class AdvSIMD_1Vec_PredLoad_Intrinsic
  728. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  729. [LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  730. LLVMPointerToElt<0>],
  731. [IntrReadMem, IntrArgMemOnly]>;
  732. class AdvSIMD_1Vec_PredStore_Intrinsic
  733. : DefaultAttrsIntrinsic<[],
  734. [llvm_anyvector_ty,
  735. LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  736. LLVMPointerToElt<0>],
  737. [IntrArgMemOnly, NoCapture<ArgIndex<2>>]>;
  738. class AdvSIMD_2Vec_PredStore_Intrinsic
  739. : DefaultAttrsIntrinsic<[],
  740. [llvm_anyvector_ty, LLVMMatchType<0>,
  741. LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>, LLVMPointerToElt<0>],
  742. [IntrArgMemOnly, NoCapture<ArgIndex<3>>]>;
  743. class AdvSIMD_3Vec_PredStore_Intrinsic
  744. : DefaultAttrsIntrinsic<[],
  745. [llvm_anyvector_ty, LLVMMatchType<0>, LLVMMatchType<0>,
  746. LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>, LLVMPointerToElt<0>],
  747. [IntrArgMemOnly, NoCapture<ArgIndex<4>>]>;
  748. class AdvSIMD_4Vec_PredStore_Intrinsic
  749. : DefaultAttrsIntrinsic<[],
  750. [llvm_anyvector_ty, LLVMMatchType<0>, LLVMMatchType<0>,
  751. LLVMMatchType<0>,
  752. LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>, LLVMPointerToElt<0>],
  753. [IntrArgMemOnly, NoCapture<ArgIndex<5>>]>;
  754. class AdvSIMD_SVE_Index_Intrinsic
  755. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  756. [LLVMVectorElementType<0>,
  757. LLVMVectorElementType<0>],
  758. [IntrNoMem]>;
  759. class AdvSIMD_Merged1VectorArg_Intrinsic
  760. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  761. [LLVMMatchType<0>,
  762. LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  763. LLVMMatchType<0>],
  764. [IntrNoMem]>;
  765. class AdvSIMD_2VectorArgIndexed_Intrinsic
  766. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  767. [LLVMMatchType<0>,
  768. LLVMMatchType<0>,
  769. llvm_i32_ty],
  770. [IntrNoMem, ImmArg<ArgIndex<2>>]>;
  771. class AdvSIMD_3VectorArgIndexed_Intrinsic
  772. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  773. [LLVMMatchType<0>,
  774. LLVMMatchType<0>,
  775. LLVMMatchType<0>,
  776. llvm_i32_ty],
  777. [IntrNoMem, ImmArg<ArgIndex<3>>]>;
  778. class AdvSIMD_Pred1VectorArg_Intrinsic
  779. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  780. [LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  781. LLVMMatchType<0>],
  782. [IntrNoMem]>;
  783. class AdvSIMD_Pred2VectorArg_Intrinsic
  784. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  785. [LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  786. LLVMMatchType<0>,
  787. LLVMMatchType<0>],
  788. [IntrNoMem]>;
  789. class AdvSIMD_Pred3VectorArg_Intrinsic
  790. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  791. [LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  792. LLVMMatchType<0>,
  793. LLVMMatchType<0>,
  794. LLVMMatchType<0>],
  795. [IntrNoMem]>;
  796. class AdvSIMD_SVE_Compare_Intrinsic
  797. : DefaultAttrsIntrinsic<[LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
  798. [LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  799. llvm_anyvector_ty,
  800. LLVMMatchType<0>],
  801. [IntrNoMem]>;
  802. class AdvSIMD_SVE_CompareWide_Intrinsic
  803. : DefaultAttrsIntrinsic<[LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
  804. [LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  805. llvm_anyvector_ty,
  806. llvm_nxv2i64_ty],
  807. [IntrNoMem]>;
  808. class AdvSIMD_SVE_Saturating_Intrinsic
  809. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  810. [LLVMMatchType<0>,
  811. LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
  812. [IntrNoMem]>;
  813. class AdvSIMD_SVE_SaturatingWithPattern_Intrinsic
  814. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  815. [LLVMMatchType<0>,
  816. llvm_i32_ty,
  817. llvm_i32_ty],
  818. [IntrNoMem, ImmArg<ArgIndex<1>>, ImmArg<ArgIndex<2>>]>;
  819. class AdvSIMD_SVE_Saturating_N_Intrinsic<LLVMType T>
  820. : DefaultAttrsIntrinsic<[T],
  821. [T, llvm_anyvector_ty],
  822. [IntrNoMem]>;
  823. class AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<LLVMType T>
  824. : DefaultAttrsIntrinsic<[T],
  825. [T, llvm_i32_ty, llvm_i32_ty],
  826. [IntrNoMem, ImmArg<ArgIndex<1>>, ImmArg<ArgIndex<2>>]>;
  827. class AdvSIMD_SVE_CNT_Intrinsic
  828. : DefaultAttrsIntrinsic<[LLVMVectorOfBitcastsToInt<0>],
  829. [LLVMVectorOfBitcastsToInt<0>,
  830. LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  831. llvm_anyvector_ty],
  832. [IntrNoMem]>;
  833. class AdvSIMD_SVE_ReduceWithInit_Intrinsic
  834. : DefaultAttrsIntrinsic<[LLVMVectorElementType<0>],
  835. [LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  836. LLVMVectorElementType<0>,
  837. llvm_anyvector_ty],
  838. [IntrNoMem]>;
  839. class AdvSIMD_SVE_ShiftByImm_Intrinsic
  840. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  841. [LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  842. LLVMMatchType<0>,
  843. llvm_i32_ty],
  844. [IntrNoMem, ImmArg<ArgIndex<2>>]>;
  845. class AdvSIMD_SVE_ShiftWide_Intrinsic
  846. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  847. [LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  848. LLVMMatchType<0>,
  849. llvm_nxv2i64_ty],
  850. [IntrNoMem]>;
  851. class AdvSIMD_SVE_Unpack_Intrinsic
  852. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  853. [LLVMSubdivide2VectorType<0>],
  854. [IntrNoMem]>;
  855. class AdvSIMD_SVE_CADD_Intrinsic
  856. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  857. [LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  858. LLVMMatchType<0>,
  859. LLVMMatchType<0>,
  860. llvm_i32_ty],
  861. [IntrNoMem, ImmArg<ArgIndex<3>>]>;
  862. class AdvSIMD_SVE_CMLA_Intrinsic
  863. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  864. [LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  865. LLVMMatchType<0>,
  866. LLVMMatchType<0>,
  867. LLVMMatchType<0>,
  868. llvm_i32_ty],
  869. [IntrNoMem, ImmArg<ArgIndex<4>>]>;
  870. class AdvSIMD_SVE_CMLA_LANE_Intrinsic
  871. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  872. [LLVMMatchType<0>,
  873. LLVMMatchType<0>,
  874. LLVMMatchType<0>,
  875. llvm_i32_ty,
  876. llvm_i32_ty],
  877. [IntrNoMem, ImmArg<ArgIndex<3>>, ImmArg<ArgIndex<4>>]>;
  878. class AdvSIMD_SVE_DUP_Intrinsic
  879. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  880. [LLVMMatchType<0>,
  881. LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  882. LLVMVectorElementType<0>],
  883. [IntrNoMem]>;
  884. class AdvSIMD_SVE_DUP_Unpred_Intrinsic
  885. : DefaultAttrsIntrinsic<[llvm_anyvector_ty], [LLVMVectorElementType<0>],
  886. [IntrNoMem]>;
  887. class AdvSIMD_SVE_DUPQ_Intrinsic
  888. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  889. [LLVMMatchType<0>,
  890. llvm_i64_ty],
  891. [IntrNoMem]>;
  892. class AdvSIMD_SVE_EXPA_Intrinsic
  893. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  894. [LLVMVectorOfBitcastsToInt<0>],
  895. [IntrNoMem]>;
  896. class AdvSIMD_SVE_FCVT_Intrinsic
  897. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  898. [LLVMMatchType<0>,
  899. LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  900. llvm_anyvector_ty],
  901. [IntrNoMem]>;
  902. class AdvSIMD_SVE_FCVTZS_Intrinsic
  903. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  904. [LLVMVectorOfBitcastsToInt<0>,
  905. LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  906. llvm_anyvector_ty],
  907. [IntrNoMem]>;
  908. class AdvSIMD_SVE_INSR_Intrinsic
  909. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  910. [LLVMMatchType<0>,
  911. LLVMVectorElementType<0>],
  912. [IntrNoMem]>;
  913. class AdvSIMD_SVE_PTRUE_Intrinsic
  914. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  915. [llvm_i32_ty],
  916. [IntrNoMem, ImmArg<ArgIndex<0>>]>;
  917. class AdvSIMD_SVE_PUNPKHI_Intrinsic
  918. : DefaultAttrsIntrinsic<[LLVMHalfElementsVectorType<0>],
  919. [llvm_anyvector_ty],
  920. [IntrNoMem]>;
  921. class AdvSIMD_SVE_SCALE_Intrinsic
  922. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  923. [LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  924. LLVMMatchType<0>,
  925. LLVMVectorOfBitcastsToInt<0>],
  926. [IntrNoMem]>;
  927. class AdvSIMD_SVE_SCVTF_Intrinsic
  928. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  929. [LLVMMatchType<0>,
  930. LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  931. llvm_anyvector_ty],
  932. [IntrNoMem]>;
  933. class AdvSIMD_SVE_TSMUL_Intrinsic
  934. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  935. [LLVMMatchType<0>,
  936. LLVMVectorOfBitcastsToInt<0>],
  937. [IntrNoMem]>;
  938. class AdvSIMD_SVE_CNTB_Intrinsic
  939. : DefaultAttrsIntrinsic<[llvm_i64_ty],
  940. [llvm_i32_ty],
  941. [IntrNoMem, ImmArg<ArgIndex<0>>]>;
  942. class AdvSIMD_SVE_CNTP_Intrinsic
  943. : DefaultAttrsIntrinsic<[llvm_i64_ty],
  944. [llvm_anyvector_ty, LLVMMatchType<0>],
  945. [IntrNoMem]>;
  946. class AdvSIMD_SVE_DOT_Intrinsic
  947. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  948. [LLVMMatchType<0>,
  949. LLVMSubdivide4VectorType<0>,
  950. LLVMSubdivide4VectorType<0>],
  951. [IntrNoMem]>;
  952. class AdvSIMD_SVE_DOT_Indexed_Intrinsic
  953. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  954. [LLVMMatchType<0>,
  955. LLVMSubdivide4VectorType<0>,
  956. LLVMSubdivide4VectorType<0>,
  957. llvm_i32_ty],
  958. [IntrNoMem, ImmArg<ArgIndex<3>>]>;
  959. class AdvSIMD_SVE_PTEST_Intrinsic
  960. : DefaultAttrsIntrinsic<[llvm_i1_ty],
  961. [llvm_anyvector_ty,
  962. LLVMMatchType<0>],
  963. [IntrNoMem]>;
  964. class AdvSIMD_SVE_TBL_Intrinsic
  965. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  966. [LLVMMatchType<0>,
  967. LLVMVectorOfBitcastsToInt<0>],
  968. [IntrNoMem]>;
  969. class AdvSIMD_SVE2_TBX_Intrinsic
  970. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  971. [LLVMMatchType<0>,
  972. LLVMMatchType<0>,
  973. LLVMVectorOfBitcastsToInt<0>],
  974. [IntrNoMem]>;
  975. class SVE2_1VectorArg_Long_Intrinsic
  976. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  977. [LLVMSubdivide2VectorType<0>,
  978. llvm_i32_ty],
  979. [IntrNoMem, ImmArg<ArgIndex<1>>]>;
  980. class SVE2_2VectorArg_Long_Intrinsic
  981. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  982. [LLVMSubdivide2VectorType<0>,
  983. LLVMSubdivide2VectorType<0>],
  984. [IntrNoMem]>;
  985. class SVE2_2VectorArgIndexed_Long_Intrinsic
  986. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  987. [LLVMSubdivide2VectorType<0>,
  988. LLVMSubdivide2VectorType<0>,
  989. llvm_i32_ty],
  990. [IntrNoMem, ImmArg<ArgIndex<2>>]>;
  991. class SVE2_2VectorArg_Wide_Intrinsic
  992. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  993. [LLVMMatchType<0>,
  994. LLVMSubdivide2VectorType<0>],
  995. [IntrNoMem]>;
  996. class SVE2_2VectorArg_Pred_Long_Intrinsic
  997. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  998. [LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  999. LLVMMatchType<0>,
  1000. LLVMSubdivide2VectorType<0>],
  1001. [IntrNoMem]>;
  1002. class SVE2_3VectorArg_Long_Intrinsic
  1003. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  1004. [LLVMMatchType<0>,
  1005. LLVMSubdivide2VectorType<0>,
  1006. LLVMSubdivide2VectorType<0>],
  1007. [IntrNoMem]>;
  1008. class SVE2_3VectorArgIndexed_Long_Intrinsic
  1009. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  1010. [LLVMMatchType<0>,
  1011. LLVMSubdivide2VectorType<0>,
  1012. LLVMSubdivide2VectorType<0>,
  1013. llvm_i32_ty],
  1014. [IntrNoMem, ImmArg<ArgIndex<3>>]>;
  1015. class SVE2_1VectorArg_Narrowing_Intrinsic
  1016. : DefaultAttrsIntrinsic<[LLVMSubdivide2VectorType<0>],
  1017. [llvm_anyvector_ty],
  1018. [IntrNoMem]>;
  1019. class SVE2_Merged1VectorArg_Narrowing_Intrinsic
  1020. : DefaultAttrsIntrinsic<[LLVMSubdivide2VectorType<0>],
  1021. [LLVMSubdivide2VectorType<0>,
  1022. llvm_anyvector_ty],
  1023. [IntrNoMem]>;
  1024. class SVE2_2VectorArg_Narrowing_Intrinsic
  1025. : DefaultAttrsIntrinsic<
  1026. [LLVMSubdivide2VectorType<0>],
  1027. [llvm_anyvector_ty, LLVMMatchType<0>],
  1028. [IntrNoMem]>;
  1029. class SVE2_Merged2VectorArg_Narrowing_Intrinsic
  1030. : DefaultAttrsIntrinsic<
  1031. [LLVMSubdivide2VectorType<0>],
  1032. [LLVMSubdivide2VectorType<0>, llvm_anyvector_ty, LLVMMatchType<0>],
  1033. [IntrNoMem]>;
  1034. class SVE2_1VectorArg_Imm_Narrowing_Intrinsic
  1035. : DefaultAttrsIntrinsic<[LLVMSubdivide2VectorType<0>],
  1036. [llvm_anyvector_ty, llvm_i32_ty],
  1037. [IntrNoMem, ImmArg<ArgIndex<1>>]>;
  1038. class SVE2_2VectorArg_Imm_Narrowing_Intrinsic
  1039. : DefaultAttrsIntrinsic<[LLVMSubdivide2VectorType<0>],
  1040. [LLVMSubdivide2VectorType<0>, llvm_anyvector_ty,
  1041. llvm_i32_ty],
  1042. [IntrNoMem, ImmArg<ArgIndex<2>>]>;
  1043. class SVE2_CONFLICT_DETECT_Intrinsic
  1044. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  1045. [LLVMAnyPointerType<llvm_any_ty>,
  1046. LLVMMatchType<1>]>;
  1047. class SVE2_3VectorArg_Indexed_Intrinsic
  1048. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  1049. [LLVMMatchType<0>,
  1050. LLVMSubdivide2VectorType<0>,
  1051. LLVMSubdivide2VectorType<0>,
  1052. llvm_i32_ty],
  1053. [IntrNoMem, ImmArg<ArgIndex<3>>]>;
  1054. class AdvSIMD_SVE_CDOT_LANE_Intrinsic
  1055. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  1056. [LLVMMatchType<0>,
  1057. LLVMSubdivide4VectorType<0>,
  1058. LLVMSubdivide4VectorType<0>,
  1059. llvm_i32_ty,
  1060. llvm_i32_ty],
  1061. [IntrNoMem, ImmArg<ArgIndex<3>>, ImmArg<ArgIndex<4>>]>;
  1062. // NOTE: There is no relationship between these intrinsics beyond an attempt
  1063. // to reuse currently identical class definitions.
  1064. class AdvSIMD_SVE_LOGB_Intrinsic : AdvSIMD_SVE_CNT_Intrinsic;
  1065. class AdvSIMD_SVE2_CADD_Intrinsic : AdvSIMD_2VectorArgIndexed_Intrinsic;
  1066. class AdvSIMD_SVE2_CMLA_Intrinsic : AdvSIMD_3VectorArgIndexed_Intrinsic;
  1067. // This class of intrinsics are not intended to be useful within LLVM IR but
  1068. // are instead here to support some of the more regid parts of the ACLE.
  1069. class Builtin_SVCVT<string name, LLVMType OUT, LLVMType PRED, LLVMType IN>
  1070. : DefaultAttrsIntrinsic<[OUT], [OUT, PRED, IN], [IntrNoMem]>;
  1071. }
  1072. //===----------------------------------------------------------------------===//
  1073. // SVE
  1074. let TargetPrefix = "aarch64" in { // All intrinsics start with "llvm.aarch64.".
  1075. class AdvSIMD_SVE_Reduce_Intrinsic
  1076. : DefaultAttrsIntrinsic<[LLVMVectorElementType<0>],
  1077. [LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  1078. llvm_anyvector_ty],
  1079. [IntrNoMem]>;
  1080. class AdvSIMD_SVE_SADDV_Reduce_Intrinsic
  1081. : DefaultAttrsIntrinsic<[llvm_i64_ty],
  1082. [LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  1083. llvm_anyvector_ty],
  1084. [IntrNoMem]>;
  1085. class AdvSIMD_SVE_WHILE_Intrinsic
  1086. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  1087. [llvm_anyint_ty, LLVMMatchType<1>],
  1088. [IntrNoMem]>;
  1089. class AdvSIMD_GatherLoad_SV_64b_Offsets_Intrinsic
  1090. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  1091. [
  1092. LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  1093. LLVMPointerToElt<0>,
  1094. LLVMScalarOrSameVectorWidth<0, llvm_i64_ty>
  1095. ],
  1096. [IntrReadMem, IntrArgMemOnly]>;
  1097. class AdvSIMD_GatherLoad_SV_32b_Offsets_Intrinsic
  1098. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  1099. [
  1100. LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  1101. LLVMPointerToElt<0>,
  1102. LLVMScalarOrSameVectorWidth<0, llvm_i32_ty>
  1103. ],
  1104. [IntrReadMem, IntrArgMemOnly]>;
  1105. class AdvSIMD_GatherLoad_VS_Intrinsic
  1106. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  1107. [
  1108. LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  1109. llvm_anyvector_ty,
  1110. llvm_i64_ty
  1111. ],
  1112. [IntrReadMem]>;
  1113. class AdvSIMD_ScatterStore_SV_64b_Offsets_Intrinsic
  1114. : DefaultAttrsIntrinsic<[],
  1115. [
  1116. llvm_anyvector_ty,
  1117. LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  1118. LLVMPointerToElt<0>,
  1119. LLVMScalarOrSameVectorWidth<0, llvm_i64_ty>
  1120. ],
  1121. [IntrWriteMem, IntrArgMemOnly]>;
  1122. class AdvSIMD_ScatterStore_SV_32b_Offsets_Intrinsic
  1123. : DefaultAttrsIntrinsic<[],
  1124. [
  1125. llvm_anyvector_ty,
  1126. LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  1127. LLVMPointerToElt<0>,
  1128. LLVMScalarOrSameVectorWidth<0, llvm_i32_ty>
  1129. ],
  1130. [IntrWriteMem, IntrArgMemOnly]>;
  1131. class AdvSIMD_ScatterStore_VS_Intrinsic
  1132. : DefaultAttrsIntrinsic<[],
  1133. [
  1134. llvm_anyvector_ty,
  1135. LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
  1136. llvm_anyvector_ty, llvm_i64_ty
  1137. ],
  1138. [IntrWriteMem]>;
  1139. class SVE_gather_prf_SV
  1140. : DefaultAttrsIntrinsic<[],
  1141. [
  1142. LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>, // Predicate
  1143. llvm_ptr_ty, // Base address
  1144. llvm_anyvector_ty, // Offsets
  1145. llvm_i32_ty // Prfop
  1146. ],
  1147. [IntrInaccessibleMemOrArgMemOnly, NoCapture<ArgIndex<1>>, ImmArg<ArgIndex<3>>]>;
  1148. class SVE_gather_prf_VS
  1149. : DefaultAttrsIntrinsic<[],
  1150. [
  1151. LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>, // Predicate
  1152. llvm_anyvector_ty, // Base addresses
  1153. llvm_i64_ty, // Scalar offset
  1154. llvm_i32_ty // Prfop
  1155. ],
  1156. [IntrInaccessibleMemOrArgMemOnly, ImmArg<ArgIndex<3>>]>;
  1157. class SVE_MatMul_Intrinsic
  1158. : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  1159. [LLVMMatchType<0>, LLVMSubdivide4VectorType<0>, LLVMSubdivide4VectorType<0>],
  1160. [IntrNoMem]>;
  1161. class SVE_4Vec_BF16
  1162. : DefaultAttrsIntrinsic<[llvm_nxv4f32_ty],
  1163. [llvm_nxv4f32_ty, llvm_nxv8bf16_ty, llvm_nxv8bf16_ty],
  1164. [IntrNoMem]>;
  1165. class SVE_4Vec_BF16_Indexed
  1166. : DefaultAttrsIntrinsic<[llvm_nxv4f32_ty],
  1167. [llvm_nxv4f32_ty, llvm_nxv8bf16_ty, llvm_nxv8bf16_ty, llvm_i64_ty],
  1168. [IntrNoMem, ImmArg<ArgIndex<3>>]>;
  1169. //
  1170. // Vector tuple creation intrinsics (ACLE)
  1171. //
  1172. def int_aarch64_sve_tuple_create2 : AdvSIMD_SVE_Create_2Vector_Tuple;
  1173. def int_aarch64_sve_tuple_create3 : AdvSIMD_SVE_Create_3Vector_Tuple;
  1174. def int_aarch64_sve_tuple_create4 : AdvSIMD_SVE_Create_4Vector_Tuple;
  1175. //
  1176. // Vector tuple insertion/extraction intrinsics (ACLE)
  1177. //
  1178. def int_aarch64_sve_tuple_get : AdvSIMD_SVE_Get_Vector_Tuple;
  1179. def int_aarch64_sve_tuple_set : AdvSIMD_SVE_Set_Vector_Tuple;
  1180. //
  1181. // Loads
  1182. //
  1183. def int_aarch64_sve_ld1 : AdvSIMD_1Vec_PredLoad_Intrinsic;
  1184. def int_aarch64_sve_ld2 : AdvSIMD_ManyVec_PredLoad_Intrinsic;
  1185. def int_aarch64_sve_ld3 : AdvSIMD_ManyVec_PredLoad_Intrinsic;
  1186. def int_aarch64_sve_ld4 : AdvSIMD_ManyVec_PredLoad_Intrinsic;
  1187. def int_aarch64_sve_ldnt1 : AdvSIMD_1Vec_PredLoad_Intrinsic;
  1188. def int_aarch64_sve_ldnf1 : AdvSIMD_1Vec_PredLoad_Intrinsic;
  1189. def int_aarch64_sve_ldff1 : AdvSIMD_1Vec_PredLoad_Intrinsic;
  1190. def int_aarch64_sve_ld1rq : AdvSIMD_1Vec_PredLoad_Intrinsic;
  1191. def int_aarch64_sve_ld1ro : AdvSIMD_1Vec_PredLoad_Intrinsic;
  1192. //
  1193. // Stores
  1194. //
  1195. def int_aarch64_sve_st1 : AdvSIMD_1Vec_PredStore_Intrinsic;
  1196. def int_aarch64_sve_st2 : AdvSIMD_2Vec_PredStore_Intrinsic;
  1197. def int_aarch64_sve_st3 : AdvSIMD_3Vec_PredStore_Intrinsic;
  1198. def int_aarch64_sve_st4 : AdvSIMD_4Vec_PredStore_Intrinsic;
  1199. def int_aarch64_sve_stnt1 : AdvSIMD_1Vec_PredStore_Intrinsic;
  1200. //
  1201. // Prefetches
  1202. //
  1203. def int_aarch64_sve_prf
  1204. : DefaultAttrsIntrinsic<[], [llvm_anyvector_ty, llvm_ptr_ty, llvm_i32_ty],
  1205. [IntrArgMemOnly, ImmArg<ArgIndex<2>>]>;
  1206. // Scalar + 32-bit scaled offset vector, zero extend, packed and
  1207. // unpacked.
  1208. def int_aarch64_sve_prfb_gather_uxtw_index : SVE_gather_prf_SV;
  1209. def int_aarch64_sve_prfh_gather_uxtw_index : SVE_gather_prf_SV;
  1210. def int_aarch64_sve_prfw_gather_uxtw_index : SVE_gather_prf_SV;
  1211. def int_aarch64_sve_prfd_gather_uxtw_index : SVE_gather_prf_SV;
  1212. // Scalar + 32-bit scaled offset vector, sign extend, packed and
  1213. // unpacked.
  1214. def int_aarch64_sve_prfb_gather_sxtw_index : SVE_gather_prf_SV;
  1215. def int_aarch64_sve_prfw_gather_sxtw_index : SVE_gather_prf_SV;
  1216. def int_aarch64_sve_prfh_gather_sxtw_index : SVE_gather_prf_SV;
  1217. def int_aarch64_sve_prfd_gather_sxtw_index : SVE_gather_prf_SV;
  1218. // Scalar + 64-bit scaled offset vector.
  1219. def int_aarch64_sve_prfb_gather_index : SVE_gather_prf_SV;
  1220. def int_aarch64_sve_prfh_gather_index : SVE_gather_prf_SV;
  1221. def int_aarch64_sve_prfw_gather_index : SVE_gather_prf_SV;
  1222. def int_aarch64_sve_prfd_gather_index : SVE_gather_prf_SV;
  1223. // Vector + scalar.
  1224. def int_aarch64_sve_prfb_gather_scalar_offset : SVE_gather_prf_VS;
  1225. def int_aarch64_sve_prfh_gather_scalar_offset : SVE_gather_prf_VS;
  1226. def int_aarch64_sve_prfw_gather_scalar_offset : SVE_gather_prf_VS;
  1227. def int_aarch64_sve_prfd_gather_scalar_offset : SVE_gather_prf_VS;
  1228. //
  1229. // Scalar to vector operations
  1230. //
  1231. def int_aarch64_sve_dup : AdvSIMD_SVE_DUP_Intrinsic;
  1232. def int_aarch64_sve_dup_x : AdvSIMD_SVE_DUP_Unpred_Intrinsic;
  1233. def int_aarch64_sve_index : AdvSIMD_SVE_Index_Intrinsic;
  1234. //
  1235. // Address calculation
  1236. //
  1237. def int_aarch64_sve_adrb : AdvSIMD_2VectorArg_Intrinsic;
  1238. def int_aarch64_sve_adrh : AdvSIMD_2VectorArg_Intrinsic;
  1239. def int_aarch64_sve_adrw : AdvSIMD_2VectorArg_Intrinsic;
  1240. def int_aarch64_sve_adrd : AdvSIMD_2VectorArg_Intrinsic;
  1241. //
  1242. // Integer arithmetic
  1243. //
  1244. def int_aarch64_sve_add : AdvSIMD_Pred2VectorArg_Intrinsic;
  1245. def int_aarch64_sve_sub : AdvSIMD_Pred2VectorArg_Intrinsic;
  1246. def int_aarch64_sve_subr : AdvSIMD_Pred2VectorArg_Intrinsic;
  1247. def int_aarch64_sve_pmul : AdvSIMD_2VectorArg_Intrinsic;
  1248. def int_aarch64_sve_mul : AdvSIMD_Pred2VectorArg_Intrinsic;
  1249. def int_aarch64_sve_mul_lane : AdvSIMD_2VectorArgIndexed_Intrinsic;
  1250. def int_aarch64_sve_smulh : AdvSIMD_Pred2VectorArg_Intrinsic;
  1251. def int_aarch64_sve_umulh : AdvSIMD_Pred2VectorArg_Intrinsic;
  1252. def int_aarch64_sve_sdiv : AdvSIMD_Pred2VectorArg_Intrinsic;
  1253. def int_aarch64_sve_udiv : AdvSIMD_Pred2VectorArg_Intrinsic;
  1254. def int_aarch64_sve_sdivr : AdvSIMD_Pred2VectorArg_Intrinsic;
  1255. def int_aarch64_sve_udivr : AdvSIMD_Pred2VectorArg_Intrinsic;
  1256. def int_aarch64_sve_smax : AdvSIMD_Pred2VectorArg_Intrinsic;
  1257. def int_aarch64_sve_umax : AdvSIMD_Pred2VectorArg_Intrinsic;
  1258. def int_aarch64_sve_smin : AdvSIMD_Pred2VectorArg_Intrinsic;
  1259. def int_aarch64_sve_umin : AdvSIMD_Pred2VectorArg_Intrinsic;
  1260. def int_aarch64_sve_sabd : AdvSIMD_Pred2VectorArg_Intrinsic;
  1261. def int_aarch64_sve_uabd : AdvSIMD_Pred2VectorArg_Intrinsic;
  1262. def int_aarch64_sve_mad : AdvSIMD_Pred3VectorArg_Intrinsic;
  1263. def int_aarch64_sve_msb : AdvSIMD_Pred3VectorArg_Intrinsic;
  1264. def int_aarch64_sve_mla : AdvSIMD_Pred3VectorArg_Intrinsic;
  1265. def int_aarch64_sve_mla_lane : AdvSIMD_3VectorArgIndexed_Intrinsic;
  1266. def int_aarch64_sve_mls : AdvSIMD_Pred3VectorArg_Intrinsic;
  1267. def int_aarch64_sve_mls_lane : AdvSIMD_3VectorArgIndexed_Intrinsic;
  1268. def int_aarch64_sve_saddv : AdvSIMD_SVE_SADDV_Reduce_Intrinsic;
  1269. def int_aarch64_sve_uaddv : AdvSIMD_SVE_SADDV_Reduce_Intrinsic;
  1270. def int_aarch64_sve_smaxv : AdvSIMD_SVE_Reduce_Intrinsic;
  1271. def int_aarch64_sve_umaxv : AdvSIMD_SVE_Reduce_Intrinsic;
  1272. def int_aarch64_sve_sminv : AdvSIMD_SVE_Reduce_Intrinsic;
  1273. def int_aarch64_sve_uminv : AdvSIMD_SVE_Reduce_Intrinsic;
  1274. def int_aarch64_sve_orv : AdvSIMD_SVE_Reduce_Intrinsic;
  1275. def int_aarch64_sve_eorv : AdvSIMD_SVE_Reduce_Intrinsic;
  1276. def int_aarch64_sve_andv : AdvSIMD_SVE_Reduce_Intrinsic;
  1277. def int_aarch64_sve_abs : AdvSIMD_Merged1VectorArg_Intrinsic;
  1278. def int_aarch64_sve_neg : AdvSIMD_Merged1VectorArg_Intrinsic;
  1279. def int_aarch64_sve_sdot : AdvSIMD_SVE_DOT_Intrinsic;
  1280. def int_aarch64_sve_sdot_lane : AdvSIMD_SVE_DOT_Indexed_Intrinsic;
  1281. def int_aarch64_sve_udot : AdvSIMD_SVE_DOT_Intrinsic;
  1282. def int_aarch64_sve_udot_lane : AdvSIMD_SVE_DOT_Indexed_Intrinsic;
  1283. def int_aarch64_sve_sqadd_x : AdvSIMD_2VectorArg_Intrinsic;
  1284. def int_aarch64_sve_sqsub_x : AdvSIMD_2VectorArg_Intrinsic;
  1285. def int_aarch64_sve_uqadd_x : AdvSIMD_2VectorArg_Intrinsic;
  1286. def int_aarch64_sve_uqsub_x : AdvSIMD_2VectorArg_Intrinsic;
  1287. // Shifts
  1288. def int_aarch64_sve_asr : AdvSIMD_Pred2VectorArg_Intrinsic;
  1289. def int_aarch64_sve_asr_wide : AdvSIMD_SVE_ShiftWide_Intrinsic;
  1290. def int_aarch64_sve_asrd : AdvSIMD_SVE_ShiftByImm_Intrinsic;
  1291. def int_aarch64_sve_insr : AdvSIMD_SVE_INSR_Intrinsic;
  1292. def int_aarch64_sve_lsl : AdvSIMD_Pred2VectorArg_Intrinsic;
  1293. def int_aarch64_sve_lsl_wide : AdvSIMD_SVE_ShiftWide_Intrinsic;
  1294. def int_aarch64_sve_lsr : AdvSIMD_Pred2VectorArg_Intrinsic;
  1295. def int_aarch64_sve_lsr_wide : AdvSIMD_SVE_ShiftWide_Intrinsic;
  1296. //
  1297. // Integer comparisons
  1298. //
  1299. def int_aarch64_sve_cmpeq : AdvSIMD_SVE_Compare_Intrinsic;
  1300. def int_aarch64_sve_cmpge : AdvSIMD_SVE_Compare_Intrinsic;
  1301. def int_aarch64_sve_cmpgt : AdvSIMD_SVE_Compare_Intrinsic;
  1302. def int_aarch64_sve_cmphi : AdvSIMD_SVE_Compare_Intrinsic;
  1303. def int_aarch64_sve_cmphs : AdvSIMD_SVE_Compare_Intrinsic;
  1304. def int_aarch64_sve_cmpne : AdvSIMD_SVE_Compare_Intrinsic;
  1305. def int_aarch64_sve_cmpeq_wide : AdvSIMD_SVE_CompareWide_Intrinsic;
  1306. def int_aarch64_sve_cmpge_wide : AdvSIMD_SVE_CompareWide_Intrinsic;
  1307. def int_aarch64_sve_cmpgt_wide : AdvSIMD_SVE_CompareWide_Intrinsic;
  1308. def int_aarch64_sve_cmphi_wide : AdvSIMD_SVE_CompareWide_Intrinsic;
  1309. def int_aarch64_sve_cmphs_wide : AdvSIMD_SVE_CompareWide_Intrinsic;
  1310. def int_aarch64_sve_cmple_wide : AdvSIMD_SVE_CompareWide_Intrinsic;
  1311. def int_aarch64_sve_cmplo_wide : AdvSIMD_SVE_CompareWide_Intrinsic;
  1312. def int_aarch64_sve_cmpls_wide : AdvSIMD_SVE_CompareWide_Intrinsic;
  1313. def int_aarch64_sve_cmplt_wide : AdvSIMD_SVE_CompareWide_Intrinsic;
  1314. def int_aarch64_sve_cmpne_wide : AdvSIMD_SVE_CompareWide_Intrinsic;
  1315. //
  1316. // Counting bits
  1317. //
  1318. def int_aarch64_sve_cls : AdvSIMD_Merged1VectorArg_Intrinsic;
  1319. def int_aarch64_sve_clz : AdvSIMD_Merged1VectorArg_Intrinsic;
  1320. def int_aarch64_sve_cnt : AdvSIMD_SVE_CNT_Intrinsic;
  1321. //
  1322. // Counting elements
  1323. //
  1324. def int_aarch64_sve_cntb : AdvSIMD_SVE_CNTB_Intrinsic;
  1325. def int_aarch64_sve_cnth : AdvSIMD_SVE_CNTB_Intrinsic;
  1326. def int_aarch64_sve_cntw : AdvSIMD_SVE_CNTB_Intrinsic;
  1327. def int_aarch64_sve_cntd : AdvSIMD_SVE_CNTB_Intrinsic;
  1328. def int_aarch64_sve_cntp : AdvSIMD_SVE_CNTP_Intrinsic;
  1329. //
  1330. // FFR manipulation
  1331. //
  1332. def int_aarch64_sve_rdffr : GCCBuiltin<"__builtin_sve_svrdffr">, DefaultAttrsIntrinsic<[llvm_nxv16i1_ty], []>;
  1333. def int_aarch64_sve_rdffr_z : GCCBuiltin<"__builtin_sve_svrdffr_z">, DefaultAttrsIntrinsic<[llvm_nxv16i1_ty], [llvm_nxv16i1_ty]>;
  1334. def int_aarch64_sve_setffr : GCCBuiltin<"__builtin_sve_svsetffr">, DefaultAttrsIntrinsic<[], []>;
  1335. def int_aarch64_sve_wrffr : GCCBuiltin<"__builtin_sve_svwrffr">, DefaultAttrsIntrinsic<[], [llvm_nxv16i1_ty]>;
  1336. //
  1337. // Saturating scalar arithmetic
  1338. //
  1339. def int_aarch64_sve_sqdech : AdvSIMD_SVE_SaturatingWithPattern_Intrinsic;
  1340. def int_aarch64_sve_sqdecw : AdvSIMD_SVE_SaturatingWithPattern_Intrinsic;
  1341. def int_aarch64_sve_sqdecd : AdvSIMD_SVE_SaturatingWithPattern_Intrinsic;
  1342. def int_aarch64_sve_sqdecp : AdvSIMD_SVE_Saturating_Intrinsic;
  1343. def int_aarch64_sve_sqdecb_n32 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i32_ty>;
  1344. def int_aarch64_sve_sqdecb_n64 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i64_ty>;
  1345. def int_aarch64_sve_sqdech_n32 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i32_ty>;
  1346. def int_aarch64_sve_sqdech_n64 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i64_ty>;
  1347. def int_aarch64_sve_sqdecw_n32 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i32_ty>;
  1348. def int_aarch64_sve_sqdecw_n64 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i64_ty>;
  1349. def int_aarch64_sve_sqdecd_n32 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i32_ty>;
  1350. def int_aarch64_sve_sqdecd_n64 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i64_ty>;
  1351. def int_aarch64_sve_sqdecp_n32 : AdvSIMD_SVE_Saturating_N_Intrinsic<llvm_i32_ty>;
  1352. def int_aarch64_sve_sqdecp_n64 : AdvSIMD_SVE_Saturating_N_Intrinsic<llvm_i64_ty>;
  1353. def int_aarch64_sve_sqinch : AdvSIMD_SVE_SaturatingWithPattern_Intrinsic;
  1354. def int_aarch64_sve_sqincw : AdvSIMD_SVE_SaturatingWithPattern_Intrinsic;
  1355. def int_aarch64_sve_sqincd : AdvSIMD_SVE_SaturatingWithPattern_Intrinsic;
  1356. def int_aarch64_sve_sqincp : AdvSIMD_SVE_Saturating_Intrinsic;
  1357. def int_aarch64_sve_sqincb_n32 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i32_ty>;
  1358. def int_aarch64_sve_sqincb_n64 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i64_ty>;
  1359. def int_aarch64_sve_sqinch_n32 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i32_ty>;
  1360. def int_aarch64_sve_sqinch_n64 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i64_ty>;
  1361. def int_aarch64_sve_sqincw_n32 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i32_ty>;
  1362. def int_aarch64_sve_sqincw_n64 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i64_ty>;
  1363. def int_aarch64_sve_sqincd_n32 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i32_ty>;
  1364. def int_aarch64_sve_sqincd_n64 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i64_ty>;
  1365. def int_aarch64_sve_sqincp_n32 : AdvSIMD_SVE_Saturating_N_Intrinsic<llvm_i32_ty>;
  1366. def int_aarch64_sve_sqincp_n64 : AdvSIMD_SVE_Saturating_N_Intrinsic<llvm_i64_ty>;
  1367. def int_aarch64_sve_uqdech : AdvSIMD_SVE_SaturatingWithPattern_Intrinsic;
  1368. def int_aarch64_sve_uqdecw : AdvSIMD_SVE_SaturatingWithPattern_Intrinsic;
  1369. def int_aarch64_sve_uqdecd : AdvSIMD_SVE_SaturatingWithPattern_Intrinsic;
  1370. def int_aarch64_sve_uqdecp : AdvSIMD_SVE_Saturating_Intrinsic;
  1371. def int_aarch64_sve_uqdecb_n32 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i32_ty>;
  1372. def int_aarch64_sve_uqdecb_n64 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i64_ty>;
  1373. def int_aarch64_sve_uqdech_n32 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i32_ty>;
  1374. def int_aarch64_sve_uqdech_n64 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i64_ty>;
  1375. def int_aarch64_sve_uqdecw_n32 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i32_ty>;
  1376. def int_aarch64_sve_uqdecw_n64 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i64_ty>;
  1377. def int_aarch64_sve_uqdecd_n32 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i32_ty>;
  1378. def int_aarch64_sve_uqdecd_n64 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i64_ty>;
  1379. def int_aarch64_sve_uqdecp_n32 : AdvSIMD_SVE_Saturating_N_Intrinsic<llvm_i32_ty>;
  1380. def int_aarch64_sve_uqdecp_n64 : AdvSIMD_SVE_Saturating_N_Intrinsic<llvm_i64_ty>;
  1381. def int_aarch64_sve_uqinch : AdvSIMD_SVE_SaturatingWithPattern_Intrinsic;
  1382. def int_aarch64_sve_uqincw : AdvSIMD_SVE_SaturatingWithPattern_Intrinsic;
  1383. def int_aarch64_sve_uqincd : AdvSIMD_SVE_SaturatingWithPattern_Intrinsic;
  1384. def int_aarch64_sve_uqincp : AdvSIMD_SVE_Saturating_Intrinsic;
  1385. def int_aarch64_sve_uqincb_n32 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i32_ty>;
  1386. def int_aarch64_sve_uqincb_n64 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i64_ty>;
  1387. def int_aarch64_sve_uqinch_n32 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i32_ty>;
  1388. def int_aarch64_sve_uqinch_n64 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i64_ty>;
  1389. def int_aarch64_sve_uqincw_n32 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i32_ty>;
  1390. def int_aarch64_sve_uqincw_n64 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i64_ty>;
  1391. def int_aarch64_sve_uqincd_n32 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i32_ty>;
  1392. def int_aarch64_sve_uqincd_n64 : AdvSIMD_SVE_SaturatingWithPattern_N_Intrinsic<llvm_i64_ty>;
  1393. def int_aarch64_sve_uqincp_n32 : AdvSIMD_SVE_Saturating_N_Intrinsic<llvm_i32_ty>;
  1394. def int_aarch64_sve_uqincp_n64 : AdvSIMD_SVE_Saturating_N_Intrinsic<llvm_i64_ty>;
  1395. //
  1396. // Reversal
  1397. //
  1398. def int_aarch64_sve_rbit : AdvSIMD_Merged1VectorArg_Intrinsic;
  1399. def int_aarch64_sve_revb : AdvSIMD_Merged1VectorArg_Intrinsic;
  1400. def int_aarch64_sve_revh : AdvSIMD_Merged1VectorArg_Intrinsic;
  1401. def int_aarch64_sve_revw : AdvSIMD_Merged1VectorArg_Intrinsic;
  1402. //
  1403. // Permutations and selection
  1404. //
  1405. def int_aarch64_sve_clasta : AdvSIMD_Pred2VectorArg_Intrinsic;
  1406. def int_aarch64_sve_clasta_n : AdvSIMD_SVE_ReduceWithInit_Intrinsic;
  1407. def int_aarch64_sve_clastb : AdvSIMD_Pred2VectorArg_Intrinsic;
  1408. def int_aarch64_sve_clastb_n : AdvSIMD_SVE_ReduceWithInit_Intrinsic;
  1409. def int_aarch64_sve_compact : AdvSIMD_Pred1VectorArg_Intrinsic;
  1410. def int_aarch64_sve_dupq_lane : AdvSIMD_SVE_DUPQ_Intrinsic;
  1411. def int_aarch64_sve_ext : AdvSIMD_2VectorArgIndexed_Intrinsic;
  1412. def int_aarch64_sve_sel : AdvSIMD_Pred2VectorArg_Intrinsic;
  1413. def int_aarch64_sve_lasta : AdvSIMD_SVE_Reduce_Intrinsic;
  1414. def int_aarch64_sve_lastb : AdvSIMD_SVE_Reduce_Intrinsic;
  1415. def int_aarch64_sve_rev : AdvSIMD_1VectorArg_Intrinsic;
  1416. def int_aarch64_sve_splice : AdvSIMD_Pred2VectorArg_Intrinsic;
  1417. def int_aarch64_sve_sunpkhi : AdvSIMD_SVE_Unpack_Intrinsic;
  1418. def int_aarch64_sve_sunpklo : AdvSIMD_SVE_Unpack_Intrinsic;
  1419. def int_aarch64_sve_tbl : AdvSIMD_SVE_TBL_Intrinsic;
  1420. def int_aarch64_sve_trn1 : AdvSIMD_2VectorArg_Intrinsic;
  1421. def int_aarch64_sve_trn2 : AdvSIMD_2VectorArg_Intrinsic;
  1422. def int_aarch64_sve_trn1q : AdvSIMD_2VectorArg_Intrinsic;
  1423. def int_aarch64_sve_trn2q : AdvSIMD_2VectorArg_Intrinsic;
  1424. def int_aarch64_sve_uunpkhi : AdvSIMD_SVE_Unpack_Intrinsic;
  1425. def int_aarch64_sve_uunpklo : AdvSIMD_SVE_Unpack_Intrinsic;
  1426. def int_aarch64_sve_uzp1 : AdvSIMD_2VectorArg_Intrinsic;
  1427. def int_aarch64_sve_uzp2 : AdvSIMD_2VectorArg_Intrinsic;
  1428. def int_aarch64_sve_uzp1q : AdvSIMD_2VectorArg_Intrinsic;
  1429. def int_aarch64_sve_uzp2q : AdvSIMD_2VectorArg_Intrinsic;
  1430. def int_aarch64_sve_zip1 : AdvSIMD_2VectorArg_Intrinsic;
  1431. def int_aarch64_sve_zip2 : AdvSIMD_2VectorArg_Intrinsic;
  1432. def int_aarch64_sve_zip1q : AdvSIMD_2VectorArg_Intrinsic;
  1433. def int_aarch64_sve_zip2q : AdvSIMD_2VectorArg_Intrinsic;
  1434. //
  1435. // Logical operations
  1436. //
  1437. def int_aarch64_sve_and : AdvSIMD_Pred2VectorArg_Intrinsic;
  1438. def int_aarch64_sve_bic : AdvSIMD_Pred2VectorArg_Intrinsic;
  1439. def int_aarch64_sve_cnot : AdvSIMD_Merged1VectorArg_Intrinsic;
  1440. def int_aarch64_sve_eor : AdvSIMD_Pred2VectorArg_Intrinsic;
  1441. def int_aarch64_sve_not : AdvSIMD_Merged1VectorArg_Intrinsic;
  1442. def int_aarch64_sve_orr : AdvSIMD_Pred2VectorArg_Intrinsic;
  1443. //
  1444. // Conversion
  1445. //
  1446. def int_aarch64_sve_sxtb : AdvSIMD_Merged1VectorArg_Intrinsic;
  1447. def int_aarch64_sve_sxth : AdvSIMD_Merged1VectorArg_Intrinsic;
  1448. def int_aarch64_sve_sxtw : AdvSIMD_Merged1VectorArg_Intrinsic;
  1449. def int_aarch64_sve_uxtb : AdvSIMD_Merged1VectorArg_Intrinsic;
  1450. def int_aarch64_sve_uxth : AdvSIMD_Merged1VectorArg_Intrinsic;
  1451. def int_aarch64_sve_uxtw : AdvSIMD_Merged1VectorArg_Intrinsic;
  1452. //
  1453. // While comparisons
  1454. //
  1455. def int_aarch64_sve_whilele : AdvSIMD_SVE_WHILE_Intrinsic;
  1456. def int_aarch64_sve_whilelo : AdvSIMD_SVE_WHILE_Intrinsic;
  1457. def int_aarch64_sve_whilels : AdvSIMD_SVE_WHILE_Intrinsic;
  1458. def int_aarch64_sve_whilelt : AdvSIMD_SVE_WHILE_Intrinsic;
  1459. def int_aarch64_sve_whilege : AdvSIMD_SVE_WHILE_Intrinsic;
  1460. def int_aarch64_sve_whilegt : AdvSIMD_SVE_WHILE_Intrinsic;
  1461. def int_aarch64_sve_whilehs : AdvSIMD_SVE_WHILE_Intrinsic;
  1462. def int_aarch64_sve_whilehi : AdvSIMD_SVE_WHILE_Intrinsic;
  1463. //
  1464. // Floating-point arithmetic
  1465. //
  1466. def int_aarch64_sve_fabd : AdvSIMD_Pred2VectorArg_Intrinsic;
  1467. def int_aarch64_sve_fabs : AdvSIMD_Merged1VectorArg_Intrinsic;
  1468. def int_aarch64_sve_fadd : AdvSIMD_Pred2VectorArg_Intrinsic;
  1469. def int_aarch64_sve_fcadd : AdvSIMD_SVE_CADD_Intrinsic;
  1470. def int_aarch64_sve_fcmla : AdvSIMD_SVE_CMLA_Intrinsic;
  1471. def int_aarch64_sve_fcmla_lane : AdvSIMD_SVE_CMLA_LANE_Intrinsic;
  1472. def int_aarch64_sve_fdiv : AdvSIMD_Pred2VectorArg_Intrinsic;
  1473. def int_aarch64_sve_fdivr : AdvSIMD_Pred2VectorArg_Intrinsic;
  1474. def int_aarch64_sve_fexpa_x : AdvSIMD_SVE_EXPA_Intrinsic;
  1475. def int_aarch64_sve_fmad : AdvSIMD_Pred3VectorArg_Intrinsic;
  1476. def int_aarch64_sve_fmax : AdvSIMD_Pred2VectorArg_Intrinsic;
  1477. def int_aarch64_sve_fmaxnm : AdvSIMD_Pred2VectorArg_Intrinsic;
  1478. def int_aarch64_sve_fmin : AdvSIMD_Pred2VectorArg_Intrinsic;
  1479. def int_aarch64_sve_fminnm : AdvSIMD_Pred2VectorArg_Intrinsic;
  1480. def int_aarch64_sve_fmla : AdvSIMD_Pred3VectorArg_Intrinsic;
  1481. def int_aarch64_sve_fmla_lane : AdvSIMD_3VectorArgIndexed_Intrinsic;
  1482. def int_aarch64_sve_fmls : AdvSIMD_Pred3VectorArg_Intrinsic;
  1483. def int_aarch64_sve_fmls_lane : AdvSIMD_3VectorArgIndexed_Intrinsic;
  1484. def int_aarch64_sve_fmsb : AdvSIMD_Pred3VectorArg_Intrinsic;
  1485. def int_aarch64_sve_fmul : AdvSIMD_Pred2VectorArg_Intrinsic;
  1486. def int_aarch64_sve_fmulx : AdvSIMD_Pred2VectorArg_Intrinsic;
  1487. def int_aarch64_sve_fneg : AdvSIMD_Merged1VectorArg_Intrinsic;
  1488. def int_aarch64_sve_fmul_lane : AdvSIMD_2VectorArgIndexed_Intrinsic;
  1489. def int_aarch64_sve_fnmad : AdvSIMD_Pred3VectorArg_Intrinsic;
  1490. def int_aarch64_sve_fnmla : AdvSIMD_Pred3VectorArg_Intrinsic;
  1491. def int_aarch64_sve_fnmls : AdvSIMD_Pred3VectorArg_Intrinsic;
  1492. def int_aarch64_sve_fnmsb : AdvSIMD_Pred3VectorArg_Intrinsic;
  1493. def int_aarch64_sve_frecpe_x : AdvSIMD_1VectorArg_Intrinsic;
  1494. def int_aarch64_sve_frecps_x : AdvSIMD_2VectorArg_Intrinsic;
  1495. def int_aarch64_sve_frecpx : AdvSIMD_Merged1VectorArg_Intrinsic;
  1496. def int_aarch64_sve_frinta : AdvSIMD_Merged1VectorArg_Intrinsic;
  1497. def int_aarch64_sve_frinti : AdvSIMD_Merged1VectorArg_Intrinsic;
  1498. def int_aarch64_sve_frintm : AdvSIMD_Merged1VectorArg_Intrinsic;
  1499. def int_aarch64_sve_frintn : AdvSIMD_Merged1VectorArg_Intrinsic;
  1500. def int_aarch64_sve_frintp : AdvSIMD_Merged1VectorArg_Intrinsic;
  1501. def int_aarch64_sve_frintx : AdvSIMD_Merged1VectorArg_Intrinsic;
  1502. def int_aarch64_sve_frintz : AdvSIMD_Merged1VectorArg_Intrinsic;
  1503. def int_aarch64_sve_frsqrte_x : AdvSIMD_1VectorArg_Intrinsic;
  1504. def int_aarch64_sve_frsqrts_x : AdvSIMD_2VectorArg_Intrinsic;
  1505. def int_aarch64_sve_fscale : AdvSIMD_SVE_SCALE_Intrinsic;
  1506. def int_aarch64_sve_fsqrt : AdvSIMD_Merged1VectorArg_Intrinsic;
  1507. def int_aarch64_sve_fsub : AdvSIMD_Pred2VectorArg_Intrinsic;
  1508. def int_aarch64_sve_fsubr : AdvSIMD_Pred2VectorArg_Intrinsic;
  1509. def int_aarch64_sve_ftmad_x : AdvSIMD_2VectorArgIndexed_Intrinsic;
  1510. def int_aarch64_sve_ftsmul_x : AdvSIMD_SVE_TSMUL_Intrinsic;
  1511. def int_aarch64_sve_ftssel_x : AdvSIMD_SVE_TSMUL_Intrinsic;
  1512. //
  1513. // Floating-point reductions
  1514. //
  1515. def int_aarch64_sve_fadda : AdvSIMD_SVE_ReduceWithInit_Intrinsic;
  1516. def int_aarch64_sve_faddv : AdvSIMD_SVE_Reduce_Intrinsic;
  1517. def int_aarch64_sve_fmaxv : AdvSIMD_SVE_Reduce_Intrinsic;
  1518. def int_aarch64_sve_fmaxnmv : AdvSIMD_SVE_Reduce_Intrinsic;
  1519. def int_aarch64_sve_fminv : AdvSIMD_SVE_Reduce_Intrinsic;
  1520. def int_aarch64_sve_fminnmv : AdvSIMD_SVE_Reduce_Intrinsic;
  1521. //
  1522. // Floating-point conversions
  1523. //
  1524. def int_aarch64_sve_fcvt : AdvSIMD_SVE_FCVT_Intrinsic;
  1525. def int_aarch64_sve_fcvtzs : AdvSIMD_SVE_FCVTZS_Intrinsic;
  1526. def int_aarch64_sve_fcvtzu : AdvSIMD_SVE_FCVTZS_Intrinsic;
  1527. def int_aarch64_sve_scvtf : AdvSIMD_SVE_SCVTF_Intrinsic;
  1528. def int_aarch64_sve_ucvtf : AdvSIMD_SVE_SCVTF_Intrinsic;
  1529. //
  1530. // Floating-point comparisons
  1531. //
  1532. def int_aarch64_sve_facge : AdvSIMD_SVE_Compare_Intrinsic;
  1533. def int_aarch64_sve_facgt : AdvSIMD_SVE_Compare_Intrinsic;
  1534. def int_aarch64_sve_fcmpeq : AdvSIMD_SVE_Compare_Intrinsic;
  1535. def int_aarch64_sve_fcmpge : AdvSIMD_SVE_Compare_Intrinsic;
  1536. def int_aarch64_sve_fcmpgt : AdvSIMD_SVE_Compare_Intrinsic;
  1537. def int_aarch64_sve_fcmpne : AdvSIMD_SVE_Compare_Intrinsic;
  1538. def int_aarch64_sve_fcmpuo : AdvSIMD_SVE_Compare_Intrinsic;
  1539. def int_aarch64_sve_fcvtzs_i32f16 : Builtin_SVCVT<"svcvt_s32_f16_m", llvm_nxv4i32_ty, llvm_nxv4i1_ty, llvm_nxv8f16_ty>;
  1540. def int_aarch64_sve_fcvtzs_i32f64 : Builtin_SVCVT<"svcvt_s32_f64_m", llvm_nxv4i32_ty, llvm_nxv2i1_ty, llvm_nxv2f64_ty>;
  1541. def int_aarch64_sve_fcvtzs_i64f16 : Builtin_SVCVT<"svcvt_s64_f16_m", llvm_nxv2i64_ty, llvm_nxv2i1_ty, llvm_nxv8f16_ty>;
  1542. def int_aarch64_sve_fcvtzs_i64f32 : Builtin_SVCVT<"svcvt_s64_f32_m", llvm_nxv2i64_ty, llvm_nxv2i1_ty, llvm_nxv4f32_ty>;
  1543. def int_aarch64_sve_fcvt_bf16f32 : Builtin_SVCVT<"svcvt_bf16_f32_m", llvm_nxv8bf16_ty, llvm_nxv8i1_ty, llvm_nxv4f32_ty>;
  1544. def int_aarch64_sve_fcvtnt_bf16f32 : Builtin_SVCVT<"svcvtnt_bf16_f32_m", llvm_nxv8bf16_ty, llvm_nxv8i1_ty, llvm_nxv4f32_ty>;
  1545. def int_aarch64_sve_fcvtzu_i32f16 : Builtin_SVCVT<"svcvt_u32_f16_m", llvm_nxv4i32_ty, llvm_nxv4i1_ty, llvm_nxv8f16_ty>;
  1546. def int_aarch64_sve_fcvtzu_i32f64 : Builtin_SVCVT<"svcvt_u32_f64_m", llvm_nxv4i32_ty, llvm_nxv2i1_ty, llvm_nxv2f64_ty>;
  1547. def int_aarch64_sve_fcvtzu_i64f16 : Builtin_SVCVT<"svcvt_u64_f16_m", llvm_nxv2i64_ty, llvm_nxv2i1_ty, llvm_nxv8f16_ty>;
  1548. def int_aarch64_sve_fcvtzu_i64f32 : Builtin_SVCVT<"svcvt_u64_f32_m", llvm_nxv2i64_ty, llvm_nxv2i1_ty, llvm_nxv4f32_ty>;
  1549. def int_aarch64_sve_fcvt_f16f32 : Builtin_SVCVT<"svcvt_f16_f32_m", llvm_nxv8f16_ty, llvm_nxv4i1_ty, llvm_nxv4f32_ty>;
  1550. def int_aarch64_sve_fcvt_f16f64 : Builtin_SVCVT<"svcvt_f16_f64_m", llvm_nxv8f16_ty, llvm_nxv2i1_ty, llvm_nxv2f64_ty>;
  1551. def int_aarch64_sve_fcvt_f32f64 : Builtin_SVCVT<"svcvt_f32_f64_m", llvm_nxv4f32_ty, llvm_nxv2i1_ty, llvm_nxv2f64_ty>;
  1552. def int_aarch64_sve_fcvt_f32f16 : Builtin_SVCVT<"svcvt_f32_f16_m", llvm_nxv4f32_ty, llvm_nxv4i1_ty, llvm_nxv8f16_ty>;
  1553. def int_aarch64_sve_fcvt_f64f16 : Builtin_SVCVT<"svcvt_f64_f16_m", llvm_nxv2f64_ty, llvm_nxv2i1_ty, llvm_nxv8f16_ty>;
  1554. def int_aarch64_sve_fcvt_f64f32 : Builtin_SVCVT<"svcvt_f64_f32_m", llvm_nxv2f64_ty, llvm_nxv2i1_ty, llvm_nxv4f32_ty>;
  1555. def int_aarch64_sve_fcvtlt_f32f16 : Builtin_SVCVT<"svcvtlt_f32_f16_m", llvm_nxv4f32_ty, llvm_nxv4i1_ty, llvm_nxv8f16_ty>;
  1556. def int_aarch64_sve_fcvtlt_f64f32 : Builtin_SVCVT<"svcvtlt_f64_f32_m", llvm_nxv2f64_ty, llvm_nxv2i1_ty, llvm_nxv4f32_ty>;
  1557. def int_aarch64_sve_fcvtnt_f16f32 : Builtin_SVCVT<"svcvtnt_f16_f32_m", llvm_nxv8f16_ty, llvm_nxv4i1_ty, llvm_nxv4f32_ty>;
  1558. def int_aarch64_sve_fcvtnt_f32f64 : Builtin_SVCVT<"svcvtnt_f32_f64_m", llvm_nxv4f32_ty, llvm_nxv2i1_ty, llvm_nxv2f64_ty>;
  1559. def int_aarch64_sve_fcvtx_f32f64 : Builtin_SVCVT<"svcvtx_f32_f64_m", llvm_nxv4f32_ty, llvm_nxv2i1_ty, llvm_nxv2f64_ty>;
  1560. def int_aarch64_sve_fcvtxnt_f32f64 : Builtin_SVCVT<"svcvtxnt_f32_f64_m", llvm_nxv4f32_ty, llvm_nxv2i1_ty, llvm_nxv2f64_ty>;
  1561. def int_aarch64_sve_scvtf_f16i32 : Builtin_SVCVT<"svcvt_f16_s32_m", llvm_nxv8f16_ty, llvm_nxv4i1_ty, llvm_nxv4i32_ty>;
  1562. def int_aarch64_sve_scvtf_f16i64 : Builtin_SVCVT<"svcvt_f16_s64_m", llvm_nxv8f16_ty, llvm_nxv2i1_ty, llvm_nxv2i64_ty>;
  1563. def int_aarch64_sve_scvtf_f32i64 : Builtin_SVCVT<"svcvt_f32_s64_m", llvm_nxv4f32_ty, llvm_nxv2i1_ty, llvm_nxv2i64_ty>;
  1564. def int_aarch64_sve_scvtf_f64i32 : Builtin_SVCVT<"svcvt_f64_s32_m", llvm_nxv2f64_ty, llvm_nxv2i1_ty, llvm_nxv4i32_ty>;
  1565. def int_aarch64_sve_ucvtf_f16i32 : Builtin_SVCVT<"svcvt_f16_u32_m", llvm_nxv8f16_ty, llvm_nxv4i1_ty, llvm_nxv4i32_ty>;
  1566. def int_aarch64_sve_ucvtf_f16i64 : Builtin_SVCVT<"svcvt_f16_u64_m", llvm_nxv8f16_ty, llvm_nxv2i1_ty, llvm_nxv2i64_ty>;
  1567. def int_aarch64_sve_ucvtf_f32i64 : Builtin_SVCVT<"svcvt_f32_u64_m", llvm_nxv4f32_ty, llvm_nxv2i1_ty, llvm_nxv2i64_ty>;
  1568. def int_aarch64_sve_ucvtf_f64i32 : Builtin_SVCVT<"svcvt_f64_u32_m", llvm_nxv2f64_ty, llvm_nxv2i1_ty, llvm_nxv4i32_ty>;
  1569. //
  1570. // Predicate creation
  1571. //
  1572. def int_aarch64_sve_ptrue : AdvSIMD_SVE_PTRUE_Intrinsic;
  1573. //
  1574. // Predicate operations
  1575. //
  1576. def int_aarch64_sve_and_z : AdvSIMD_Pred2VectorArg_Intrinsic;
  1577. def int_aarch64_sve_bic_z : AdvSIMD_Pred2VectorArg_Intrinsic;
  1578. def int_aarch64_sve_brka : AdvSIMD_Merged1VectorArg_Intrinsic;
  1579. def int_aarch64_sve_brka_z : AdvSIMD_Pred1VectorArg_Intrinsic;
  1580. def int_aarch64_sve_brkb : AdvSIMD_Merged1VectorArg_Intrinsic;
  1581. def int_aarch64_sve_brkb_z : AdvSIMD_Pred1VectorArg_Intrinsic;
  1582. def int_aarch64_sve_brkn_z : AdvSIMD_Pred2VectorArg_Intrinsic;
  1583. def int_aarch64_sve_brkpa_z : AdvSIMD_Pred2VectorArg_Intrinsic;
  1584. def int_aarch64_sve_brkpb_z : AdvSIMD_Pred2VectorArg_Intrinsic;
  1585. def int_aarch64_sve_eor_z : AdvSIMD_Pred2VectorArg_Intrinsic;
  1586. def int_aarch64_sve_nand_z : AdvSIMD_Pred2VectorArg_Intrinsic;
  1587. def int_aarch64_sve_nor_z : AdvSIMD_Pred2VectorArg_Intrinsic;
  1588. def int_aarch64_sve_orn_z : AdvSIMD_Pred2VectorArg_Intrinsic;
  1589. def int_aarch64_sve_orr_z : AdvSIMD_Pred2VectorArg_Intrinsic;
  1590. def int_aarch64_sve_pfirst : AdvSIMD_Pred1VectorArg_Intrinsic;
  1591. def int_aarch64_sve_pnext : AdvSIMD_Pred1VectorArg_Intrinsic;
  1592. def int_aarch64_sve_punpkhi : AdvSIMD_SVE_PUNPKHI_Intrinsic;
  1593. def int_aarch64_sve_punpklo : AdvSIMD_SVE_PUNPKHI_Intrinsic;
  1594. //
  1595. // Testing predicates
  1596. //
  1597. def int_aarch64_sve_ptest_any : AdvSIMD_SVE_PTEST_Intrinsic;
  1598. def int_aarch64_sve_ptest_first : AdvSIMD_SVE_PTEST_Intrinsic;
  1599. def int_aarch64_sve_ptest_last : AdvSIMD_SVE_PTEST_Intrinsic;
  1600. //
  1601. // Reinterpreting data
  1602. //
  1603. def int_aarch64_sve_convert_from_svbool : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
  1604. [llvm_nxv16i1_ty],
  1605. [IntrNoMem]>;
  1606. def int_aarch64_sve_convert_to_svbool : DefaultAttrsIntrinsic<[llvm_nxv16i1_ty],
  1607. [llvm_anyvector_ty],
  1608. [IntrNoMem]>;
  1609. //
  1610. // Gather loads: scalar base + vector offsets
  1611. //
  1612. // 64 bit unscaled offsets
  1613. def int_aarch64_sve_ld1_gather : AdvSIMD_GatherLoad_SV_64b_Offsets_Intrinsic;
  1614. // 64 bit scaled offsets
  1615. def int_aarch64_sve_ld1_gather_index : AdvSIMD_GatherLoad_SV_64b_Offsets_Intrinsic;
  1616. // 32 bit unscaled offsets, sign (sxtw) or zero (zxtw) extended to 64 bits
  1617. def int_aarch64_sve_ld1_gather_sxtw : AdvSIMD_GatherLoad_SV_32b_Offsets_Intrinsic;
  1618. def int_aarch64_sve_ld1_gather_uxtw : AdvSIMD_GatherLoad_SV_32b_Offsets_Intrinsic;
  1619. // 32 bit scaled offsets, sign (sxtw) or zero (zxtw) extended to 64 bits
  1620. def int_aarch64_sve_ld1_gather_sxtw_index : AdvSIMD_GatherLoad_SV_32b_Offsets_Intrinsic;
  1621. def int_aarch64_sve_ld1_gather_uxtw_index : AdvSIMD_GatherLoad_SV_32b_Offsets_Intrinsic;
  1622. //
  1623. // Gather loads: vector base + scalar offset
  1624. //
  1625. def int_aarch64_sve_ld1_gather_scalar_offset : AdvSIMD_GatherLoad_VS_Intrinsic;
  1626. //
  1627. // First-faulting gather loads: scalar base + vector offsets
  1628. //
  1629. // 64 bit unscaled offsets
  1630. def int_aarch64_sve_ldff1_gather : AdvSIMD_GatherLoad_SV_64b_Offsets_Intrinsic;
  1631. // 64 bit scaled offsets
  1632. def int_aarch64_sve_ldff1_gather_index : AdvSIMD_GatherLoad_SV_64b_Offsets_Intrinsic;
  1633. // 32 bit unscaled offsets, sign (sxtw) or zero (uxtw) extended to 64 bits
  1634. def int_aarch64_sve_ldff1_gather_sxtw : AdvSIMD_GatherLoad_SV_32b_Offsets_Intrinsic;
  1635. def int_aarch64_sve_ldff1_gather_uxtw : AdvSIMD_GatherLoad_SV_32b_Offsets_Intrinsic;
  1636. // 32 bit scaled offsets, sign (sxtw) or zero (uxtw) extended to 64 bits
  1637. def int_aarch64_sve_ldff1_gather_sxtw_index : AdvSIMD_GatherLoad_SV_32b_Offsets_Intrinsic;
  1638. def int_aarch64_sve_ldff1_gather_uxtw_index : AdvSIMD_GatherLoad_SV_32b_Offsets_Intrinsic;
  1639. //
  1640. // First-faulting gather loads: vector base + scalar offset
  1641. //
  1642. def int_aarch64_sve_ldff1_gather_scalar_offset : AdvSIMD_GatherLoad_VS_Intrinsic;
  1643. //
  1644. // Non-temporal gather loads: scalar base + vector offsets
  1645. //
  1646. // 64 bit unscaled offsets
  1647. def int_aarch64_sve_ldnt1_gather : AdvSIMD_GatherLoad_SV_64b_Offsets_Intrinsic;
  1648. // 64 bit indices
  1649. def int_aarch64_sve_ldnt1_gather_index : AdvSIMD_GatherLoad_SV_64b_Offsets_Intrinsic;
  1650. // 32 bit unscaled offsets, zero (zxtw) extended to 64 bits
  1651. def int_aarch64_sve_ldnt1_gather_uxtw : AdvSIMD_GatherLoad_SV_32b_Offsets_Intrinsic;
  1652. //
  1653. // Non-temporal gather loads: vector base + scalar offset
  1654. //
  1655. def int_aarch64_sve_ldnt1_gather_scalar_offset : AdvSIMD_GatherLoad_VS_Intrinsic;
  1656. //
  1657. // Scatter stores: scalar base + vector offsets
  1658. //
  1659. // 64 bit unscaled offsets
  1660. def int_aarch64_sve_st1_scatter : AdvSIMD_ScatterStore_SV_64b_Offsets_Intrinsic;
  1661. // 64 bit scaled offsets
  1662. def int_aarch64_sve_st1_scatter_index
  1663. : AdvSIMD_ScatterStore_SV_64b_Offsets_Intrinsic;
  1664. // 32 bit unscaled offsets, sign (sxtw) or zero (zxtw) extended to 64 bits
  1665. def int_aarch64_sve_st1_scatter_sxtw
  1666. : AdvSIMD_ScatterStore_SV_32b_Offsets_Intrinsic;
  1667. def int_aarch64_sve_st1_scatter_uxtw
  1668. : AdvSIMD_ScatterStore_SV_32b_Offsets_Intrinsic;
  1669. // 32 bit scaled offsets, sign (sxtw) or zero (zxtw) extended to 64 bits
  1670. def int_aarch64_sve_st1_scatter_sxtw_index
  1671. : AdvSIMD_ScatterStore_SV_32b_Offsets_Intrinsic;
  1672. def int_aarch64_sve_st1_scatter_uxtw_index
  1673. : AdvSIMD_ScatterStore_SV_32b_Offsets_Intrinsic;
  1674. //
  1675. // Scatter stores: vector base + scalar offset
  1676. //
  1677. def int_aarch64_sve_st1_scatter_scalar_offset : AdvSIMD_ScatterStore_VS_Intrinsic;
  1678. //
  1679. // Non-temporal scatter stores: scalar base + vector offsets
  1680. //
  1681. // 64 bit unscaled offsets
  1682. def int_aarch64_sve_stnt1_scatter : AdvSIMD_ScatterStore_SV_64b_Offsets_Intrinsic;
  1683. // 64 bit indices
  1684. def int_aarch64_sve_stnt1_scatter_index
  1685. : AdvSIMD_ScatterStore_SV_64b_Offsets_Intrinsic;
  1686. // 32 bit unscaled offsets, zero (zxtw) extended to 64 bits
  1687. def int_aarch64_sve_stnt1_scatter_uxtw : AdvSIMD_ScatterStore_SV_32b_Offsets_Intrinsic;
  1688. //
  1689. // Non-temporal scatter stores: vector base + scalar offset
  1690. //
  1691. def int_aarch64_sve_stnt1_scatter_scalar_offset : AdvSIMD_ScatterStore_VS_Intrinsic;
  1692. //
  1693. // SVE2 - Uniform DSP operations
  1694. //
  1695. def int_aarch64_sve_saba : AdvSIMD_3VectorArg_Intrinsic;
  1696. def int_aarch64_sve_shadd : AdvSIMD_Pred2VectorArg_Intrinsic;
  1697. def int_aarch64_sve_shsub : AdvSIMD_Pred2VectorArg_Intrinsic;
  1698. def int_aarch64_sve_shsubr : AdvSIMD_Pred2VectorArg_Intrinsic;
  1699. def int_aarch64_sve_sli : AdvSIMD_2VectorArgIndexed_Intrinsic;
  1700. def int_aarch64_sve_sqabs : AdvSIMD_Merged1VectorArg_Intrinsic;
  1701. def int_aarch64_sve_sqadd : AdvSIMD_Pred2VectorArg_Intrinsic;
  1702. def int_aarch64_sve_sqdmulh : AdvSIMD_2VectorArg_Intrinsic;
  1703. def int_aarch64_sve_sqdmulh_lane : AdvSIMD_2VectorArgIndexed_Intrinsic;
  1704. def int_aarch64_sve_sqneg : AdvSIMD_Merged1VectorArg_Intrinsic;
  1705. def int_aarch64_sve_sqrdmlah : AdvSIMD_3VectorArg_Intrinsic;
  1706. def int_aarch64_sve_sqrdmlah_lane : AdvSIMD_3VectorArgIndexed_Intrinsic;
  1707. def int_aarch64_sve_sqrdmlsh : AdvSIMD_3VectorArg_Intrinsic;
  1708. def int_aarch64_sve_sqrdmlsh_lane : AdvSIMD_3VectorArgIndexed_Intrinsic;
  1709. def int_aarch64_sve_sqrdmulh : AdvSIMD_2VectorArg_Intrinsic;
  1710. def int_aarch64_sve_sqrdmulh_lane : AdvSIMD_2VectorArgIndexed_Intrinsic;
  1711. def int_aarch64_sve_sqrshl : AdvSIMD_Pred2VectorArg_Intrinsic;
  1712. def int_aarch64_sve_sqshl : AdvSIMD_Pred2VectorArg_Intrinsic;
  1713. def int_aarch64_sve_sqshlu : AdvSIMD_SVE_ShiftByImm_Intrinsic;
  1714. def int_aarch64_sve_sqsub : AdvSIMD_Pred2VectorArg_Intrinsic;
  1715. def int_aarch64_sve_sqsubr : AdvSIMD_Pred2VectorArg_Intrinsic;
  1716. def int_aarch64_sve_srhadd : AdvSIMD_Pred2VectorArg_Intrinsic;
  1717. def int_aarch64_sve_sri : AdvSIMD_2VectorArgIndexed_Intrinsic;
  1718. def int_aarch64_sve_srshl : AdvSIMD_Pred2VectorArg_Intrinsic;
  1719. def int_aarch64_sve_srshr : AdvSIMD_SVE_ShiftByImm_Intrinsic;
  1720. def int_aarch64_sve_srsra : AdvSIMD_2VectorArgIndexed_Intrinsic;
  1721. def int_aarch64_sve_ssra : AdvSIMD_2VectorArgIndexed_Intrinsic;
  1722. def int_aarch64_sve_suqadd : AdvSIMD_Pred2VectorArg_Intrinsic;
  1723. def int_aarch64_sve_uaba : AdvSIMD_3VectorArg_Intrinsic;
  1724. def int_aarch64_sve_uhadd : AdvSIMD_Pred2VectorArg_Intrinsic;
  1725. def int_aarch64_sve_uhsub : AdvSIMD_Pred2VectorArg_Intrinsic;
  1726. def int_aarch64_sve_uhsubr : AdvSIMD_Pred2VectorArg_Intrinsic;
  1727. def int_aarch64_sve_uqadd : AdvSIMD_Pred2VectorArg_Intrinsic;
  1728. def int_aarch64_sve_uqrshl : AdvSIMD_Pred2VectorArg_Intrinsic;
  1729. def int_aarch64_sve_uqshl : AdvSIMD_Pred2VectorArg_Intrinsic;
  1730. def int_aarch64_sve_uqsub : AdvSIMD_Pred2VectorArg_Intrinsic;
  1731. def int_aarch64_sve_uqsubr : AdvSIMD_Pred2VectorArg_Intrinsic;
  1732. def int_aarch64_sve_urecpe : AdvSIMD_Merged1VectorArg_Intrinsic;
  1733. def int_aarch64_sve_urhadd : AdvSIMD_Pred2VectorArg_Intrinsic;
  1734. def int_aarch64_sve_urshl : AdvSIMD_Pred2VectorArg_Intrinsic;
  1735. def int_aarch64_sve_urshr : AdvSIMD_SVE_ShiftByImm_Intrinsic;
  1736. def int_aarch64_sve_ursqrte : AdvSIMD_Merged1VectorArg_Intrinsic;
  1737. def int_aarch64_sve_ursra : AdvSIMD_2VectorArgIndexed_Intrinsic;
  1738. def int_aarch64_sve_usqadd : AdvSIMD_Pred2VectorArg_Intrinsic;
  1739. def int_aarch64_sve_usra : AdvSIMD_2VectorArgIndexed_Intrinsic;
  1740. //
  1741. // SVE2 - Widening DSP operations
  1742. //
  1743. def int_aarch64_sve_sabalb : SVE2_3VectorArg_Long_Intrinsic;
  1744. def int_aarch64_sve_sabalt : SVE2_3VectorArg_Long_Intrinsic;
  1745. def int_aarch64_sve_sabdlb : SVE2_2VectorArg_Long_Intrinsic;
  1746. def int_aarch64_sve_sabdlt : SVE2_2VectorArg_Long_Intrinsic;
  1747. def int_aarch64_sve_saddlb : SVE2_2VectorArg_Long_Intrinsic;
  1748. def int_aarch64_sve_saddlt : SVE2_2VectorArg_Long_Intrinsic;
  1749. def int_aarch64_sve_saddwb : SVE2_2VectorArg_Wide_Intrinsic;
  1750. def int_aarch64_sve_saddwt : SVE2_2VectorArg_Wide_Intrinsic;
  1751. def int_aarch64_sve_sshllb : SVE2_1VectorArg_Long_Intrinsic;
  1752. def int_aarch64_sve_sshllt : SVE2_1VectorArg_Long_Intrinsic;
  1753. def int_aarch64_sve_ssublb : SVE2_2VectorArg_Long_Intrinsic;
  1754. def int_aarch64_sve_ssublt : SVE2_2VectorArg_Long_Intrinsic;
  1755. def int_aarch64_sve_ssubwb : SVE2_2VectorArg_Wide_Intrinsic;
  1756. def int_aarch64_sve_ssubwt : SVE2_2VectorArg_Wide_Intrinsic;
  1757. def int_aarch64_sve_uabalb : SVE2_3VectorArg_Long_Intrinsic;
  1758. def int_aarch64_sve_uabalt : SVE2_3VectorArg_Long_Intrinsic;
  1759. def int_aarch64_sve_uabdlb : SVE2_2VectorArg_Long_Intrinsic;
  1760. def int_aarch64_sve_uabdlt : SVE2_2VectorArg_Long_Intrinsic;
  1761. def int_aarch64_sve_uaddlb : SVE2_2VectorArg_Long_Intrinsic;
  1762. def int_aarch64_sve_uaddlt : SVE2_2VectorArg_Long_Intrinsic;
  1763. def int_aarch64_sve_uaddwb : SVE2_2VectorArg_Wide_Intrinsic;
  1764. def int_aarch64_sve_uaddwt : SVE2_2VectorArg_Wide_Intrinsic;
  1765. def int_aarch64_sve_ushllb : SVE2_1VectorArg_Long_Intrinsic;
  1766. def int_aarch64_sve_ushllt : SVE2_1VectorArg_Long_Intrinsic;
  1767. def int_aarch64_sve_usublb : SVE2_2VectorArg_Long_Intrinsic;
  1768. def int_aarch64_sve_usublt : SVE2_2VectorArg_Long_Intrinsic;
  1769. def int_aarch64_sve_usubwb : SVE2_2VectorArg_Wide_Intrinsic;
  1770. def int_aarch64_sve_usubwt : SVE2_2VectorArg_Wide_Intrinsic;
  1771. //
  1772. // SVE2 - Non-widening pairwise arithmetic
  1773. //
  1774. def int_aarch64_sve_addp : AdvSIMD_Pred2VectorArg_Intrinsic;
  1775. def int_aarch64_sve_faddp : AdvSIMD_Pred2VectorArg_Intrinsic;
  1776. def int_aarch64_sve_fmaxp : AdvSIMD_Pred2VectorArg_Intrinsic;
  1777. def int_aarch64_sve_fmaxnmp : AdvSIMD_Pred2VectorArg_Intrinsic;
  1778. def int_aarch64_sve_fminp : AdvSIMD_Pred2VectorArg_Intrinsic;
  1779. def int_aarch64_sve_fminnmp : AdvSIMD_Pred2VectorArg_Intrinsic;
  1780. def int_aarch64_sve_smaxp : AdvSIMD_Pred2VectorArg_Intrinsic;
  1781. def int_aarch64_sve_sminp : AdvSIMD_Pred2VectorArg_Intrinsic;
  1782. def int_aarch64_sve_umaxp : AdvSIMD_Pred2VectorArg_Intrinsic;
  1783. def int_aarch64_sve_uminp : AdvSIMD_Pred2VectorArg_Intrinsic;
  1784. //
  1785. // SVE2 - Widening pairwise arithmetic
  1786. //
  1787. def int_aarch64_sve_sadalp : SVE2_2VectorArg_Pred_Long_Intrinsic;
  1788. def int_aarch64_sve_uadalp : SVE2_2VectorArg_Pred_Long_Intrinsic;
  1789. //
  1790. // SVE2 - Uniform complex integer arithmetic
  1791. //
  1792. def int_aarch64_sve_cadd_x : AdvSIMD_SVE2_CADD_Intrinsic;
  1793. def int_aarch64_sve_sqcadd_x : AdvSIMD_SVE2_CADD_Intrinsic;
  1794. def int_aarch64_sve_cmla_x : AdvSIMD_SVE2_CMLA_Intrinsic;
  1795. def int_aarch64_sve_cmla_lane_x : AdvSIMD_SVE_CMLA_LANE_Intrinsic;
  1796. def int_aarch64_sve_sqrdcmlah_x : AdvSIMD_SVE2_CMLA_Intrinsic;
  1797. def int_aarch64_sve_sqrdcmlah_lane_x : AdvSIMD_SVE_CMLA_LANE_Intrinsic;
  1798. //
  1799. // SVE2 - Widening complex integer arithmetic
  1800. //
  1801. def int_aarch64_sve_saddlbt : SVE2_2VectorArg_Long_Intrinsic;
  1802. def int_aarch64_sve_ssublbt : SVE2_2VectorArg_Long_Intrinsic;
  1803. def int_aarch64_sve_ssubltb : SVE2_2VectorArg_Long_Intrinsic;
  1804. //
  1805. // SVE2 - Widening complex integer dot product
  1806. //
  1807. def int_aarch64_sve_cdot : AdvSIMD_SVE_DOT_Indexed_Intrinsic;
  1808. def int_aarch64_sve_cdot_lane : AdvSIMD_SVE_CDOT_LANE_Intrinsic;
  1809. //
  1810. // SVE2 - Floating-point widening multiply-accumulate
  1811. //
  1812. def int_aarch64_sve_fmlalb : SVE2_3VectorArg_Long_Intrinsic;
  1813. def int_aarch64_sve_fmlalb_lane : SVE2_3VectorArgIndexed_Long_Intrinsic;
  1814. def int_aarch64_sve_fmlalt : SVE2_3VectorArg_Long_Intrinsic;
  1815. def int_aarch64_sve_fmlalt_lane : SVE2_3VectorArgIndexed_Long_Intrinsic;
  1816. def int_aarch64_sve_fmlslb : SVE2_3VectorArg_Long_Intrinsic;
  1817. def int_aarch64_sve_fmlslb_lane : SVE2_3VectorArgIndexed_Long_Intrinsic;
  1818. def int_aarch64_sve_fmlslt : SVE2_3VectorArg_Long_Intrinsic;
  1819. def int_aarch64_sve_fmlslt_lane : SVE2_3VectorArgIndexed_Long_Intrinsic;
  1820. //
  1821. // SVE2 - Floating-point integer binary logarithm
  1822. //
  1823. def int_aarch64_sve_flogb : AdvSIMD_SVE_LOGB_Intrinsic;
  1824. //
  1825. // SVE2 - Vector histogram count
  1826. //
  1827. def int_aarch64_sve_histcnt : AdvSIMD_Pred2VectorArg_Intrinsic;
  1828. def int_aarch64_sve_histseg : AdvSIMD_2VectorArg_Intrinsic;
  1829. //
  1830. // SVE2 - Character match
  1831. //
  1832. def int_aarch64_sve_match : AdvSIMD_SVE_Compare_Intrinsic;
  1833. def int_aarch64_sve_nmatch : AdvSIMD_SVE_Compare_Intrinsic;
  1834. //
  1835. // SVE2 - Unary narrowing operations
  1836. //
  1837. def int_aarch64_sve_sqxtnb : SVE2_1VectorArg_Narrowing_Intrinsic;
  1838. def int_aarch64_sve_sqxtnt : SVE2_Merged1VectorArg_Narrowing_Intrinsic;
  1839. def int_aarch64_sve_sqxtunb : SVE2_1VectorArg_Narrowing_Intrinsic;
  1840. def int_aarch64_sve_sqxtunt : SVE2_Merged1VectorArg_Narrowing_Intrinsic;
  1841. def int_aarch64_sve_uqxtnb : SVE2_1VectorArg_Narrowing_Intrinsic;
  1842. def int_aarch64_sve_uqxtnt : SVE2_Merged1VectorArg_Narrowing_Intrinsic;
  1843. //
  1844. // SVE2 - Binary narrowing DSP operations
  1845. //
  1846. def int_aarch64_sve_addhnb : SVE2_2VectorArg_Narrowing_Intrinsic;
  1847. def int_aarch64_sve_addhnt : SVE2_Merged2VectorArg_Narrowing_Intrinsic;
  1848. def int_aarch64_sve_raddhnb : SVE2_2VectorArg_Narrowing_Intrinsic;
  1849. def int_aarch64_sve_raddhnt : SVE2_Merged2VectorArg_Narrowing_Intrinsic;
  1850. def int_aarch64_sve_subhnb : SVE2_2VectorArg_Narrowing_Intrinsic;
  1851. def int_aarch64_sve_subhnt : SVE2_Merged2VectorArg_Narrowing_Intrinsic;
  1852. def int_aarch64_sve_rsubhnb : SVE2_2VectorArg_Narrowing_Intrinsic;
  1853. def int_aarch64_sve_rsubhnt : SVE2_Merged2VectorArg_Narrowing_Intrinsic;
  1854. // Narrowing shift right
  1855. def int_aarch64_sve_shrnb : SVE2_1VectorArg_Imm_Narrowing_Intrinsic;
  1856. def int_aarch64_sve_shrnt : SVE2_2VectorArg_Imm_Narrowing_Intrinsic;
  1857. def int_aarch64_sve_rshrnb : SVE2_1VectorArg_Imm_Narrowing_Intrinsic;
  1858. def int_aarch64_sve_rshrnt : SVE2_2VectorArg_Imm_Narrowing_Intrinsic;
  1859. // Saturating shift right - signed input/output
  1860. def int_aarch64_sve_sqshrnb : SVE2_1VectorArg_Imm_Narrowing_Intrinsic;
  1861. def int_aarch64_sve_sqshrnt : SVE2_2VectorArg_Imm_Narrowing_Intrinsic;
  1862. def int_aarch64_sve_sqrshrnb : SVE2_1VectorArg_Imm_Narrowing_Intrinsic;
  1863. def int_aarch64_sve_sqrshrnt : SVE2_2VectorArg_Imm_Narrowing_Intrinsic;
  1864. // Saturating shift right - unsigned input/output
  1865. def int_aarch64_sve_uqshrnb : SVE2_1VectorArg_Imm_Narrowing_Intrinsic;
  1866. def int_aarch64_sve_uqshrnt : SVE2_2VectorArg_Imm_Narrowing_Intrinsic;
  1867. def int_aarch64_sve_uqrshrnb : SVE2_1VectorArg_Imm_Narrowing_Intrinsic;
  1868. def int_aarch64_sve_uqrshrnt : SVE2_2VectorArg_Imm_Narrowing_Intrinsic;
  1869. // Saturating shift right - signed input, unsigned output
  1870. def int_aarch64_sve_sqshrunb : SVE2_1VectorArg_Imm_Narrowing_Intrinsic;
  1871. def int_aarch64_sve_sqshrunt : SVE2_2VectorArg_Imm_Narrowing_Intrinsic;
  1872. def int_aarch64_sve_sqrshrunb : SVE2_1VectorArg_Imm_Narrowing_Intrinsic;
  1873. def int_aarch64_sve_sqrshrunt : SVE2_2VectorArg_Imm_Narrowing_Intrinsic;
  1874. // SVE2 MLA LANE.
  1875. def int_aarch64_sve_smlalb_lane : SVE2_3VectorArg_Indexed_Intrinsic;
  1876. def int_aarch64_sve_smlalt_lane : SVE2_3VectorArg_Indexed_Intrinsic;
  1877. def int_aarch64_sve_umlalb_lane : SVE2_3VectorArg_Indexed_Intrinsic;
  1878. def int_aarch64_sve_umlalt_lane : SVE2_3VectorArg_Indexed_Intrinsic;
  1879. def int_aarch64_sve_smlslb_lane : SVE2_3VectorArg_Indexed_Intrinsic;
  1880. def int_aarch64_sve_smlslt_lane : SVE2_3VectorArg_Indexed_Intrinsic;
  1881. def int_aarch64_sve_umlslb_lane : SVE2_3VectorArg_Indexed_Intrinsic;
  1882. def int_aarch64_sve_umlslt_lane : SVE2_3VectorArg_Indexed_Intrinsic;
  1883. def int_aarch64_sve_smullb_lane : SVE2_2VectorArgIndexed_Long_Intrinsic;
  1884. def int_aarch64_sve_smullt_lane : SVE2_2VectorArgIndexed_Long_Intrinsic;
  1885. def int_aarch64_sve_umullb_lane : SVE2_2VectorArgIndexed_Long_Intrinsic;
  1886. def int_aarch64_sve_umullt_lane : SVE2_2VectorArgIndexed_Long_Intrinsic;
  1887. def int_aarch64_sve_sqdmlalb_lane : SVE2_3VectorArg_Indexed_Intrinsic;
  1888. def int_aarch64_sve_sqdmlalt_lane : SVE2_3VectorArg_Indexed_Intrinsic;
  1889. def int_aarch64_sve_sqdmlslb_lane : SVE2_3VectorArg_Indexed_Intrinsic;
  1890. def int_aarch64_sve_sqdmlslt_lane : SVE2_3VectorArg_Indexed_Intrinsic;
  1891. def int_aarch64_sve_sqdmullb_lane : SVE2_2VectorArgIndexed_Long_Intrinsic;
  1892. def int_aarch64_sve_sqdmullt_lane : SVE2_2VectorArgIndexed_Long_Intrinsic;
  1893. // SVE2 MLA Unpredicated.
  1894. def int_aarch64_sve_smlalb : SVE2_3VectorArg_Long_Intrinsic;
  1895. def int_aarch64_sve_smlalt : SVE2_3VectorArg_Long_Intrinsic;
  1896. def int_aarch64_sve_umlalb : SVE2_3VectorArg_Long_Intrinsic;
  1897. def int_aarch64_sve_umlalt : SVE2_3VectorArg_Long_Intrinsic;
  1898. def int_aarch64_sve_smlslb : SVE2_3VectorArg_Long_Intrinsic;
  1899. def int_aarch64_sve_smlslt : SVE2_3VectorArg_Long_Intrinsic;
  1900. def int_aarch64_sve_umlslb : SVE2_3VectorArg_Long_Intrinsic;
  1901. def int_aarch64_sve_umlslt : SVE2_3VectorArg_Long_Intrinsic;
  1902. def int_aarch64_sve_smullb : SVE2_2VectorArg_Long_Intrinsic;
  1903. def int_aarch64_sve_smullt : SVE2_2VectorArg_Long_Intrinsic;
  1904. def int_aarch64_sve_umullb : SVE2_2VectorArg_Long_Intrinsic;
  1905. def int_aarch64_sve_umullt : SVE2_2VectorArg_Long_Intrinsic;
  1906. def int_aarch64_sve_sqdmlalb : SVE2_3VectorArg_Long_Intrinsic;
  1907. def int_aarch64_sve_sqdmlalt : SVE2_3VectorArg_Long_Intrinsic;
  1908. def int_aarch64_sve_sqdmlslb : SVE2_3VectorArg_Long_Intrinsic;
  1909. def int_aarch64_sve_sqdmlslt : SVE2_3VectorArg_Long_Intrinsic;
  1910. def int_aarch64_sve_sqdmullb : SVE2_2VectorArg_Long_Intrinsic;
  1911. def int_aarch64_sve_sqdmullt : SVE2_2VectorArg_Long_Intrinsic;
  1912. def int_aarch64_sve_sqdmlalbt : SVE2_3VectorArg_Long_Intrinsic;
  1913. def int_aarch64_sve_sqdmlslbt : SVE2_3VectorArg_Long_Intrinsic;
  1914. // SVE2 ADDSUB Long Unpredicated.
  1915. def int_aarch64_sve_adclb : AdvSIMD_3VectorArg_Intrinsic;
  1916. def int_aarch64_sve_adclt : AdvSIMD_3VectorArg_Intrinsic;
  1917. def int_aarch64_sve_sbclb : AdvSIMD_3VectorArg_Intrinsic;
  1918. def int_aarch64_sve_sbclt : AdvSIMD_3VectorArg_Intrinsic;
  1919. //
  1920. // SVE2 - Polynomial arithmetic
  1921. //
  1922. def int_aarch64_sve_eorbt : AdvSIMD_3VectorArg_Intrinsic;
  1923. def int_aarch64_sve_eortb : AdvSIMD_3VectorArg_Intrinsic;
  1924. def int_aarch64_sve_pmullb_pair : AdvSIMD_2VectorArg_Intrinsic;
  1925. def int_aarch64_sve_pmullt_pair : AdvSIMD_2VectorArg_Intrinsic;
  1926. //
  1927. // SVE2 bitwise ternary operations.
  1928. //
  1929. def int_aarch64_sve_eor3 : AdvSIMD_3VectorArg_Intrinsic;
  1930. def int_aarch64_sve_bcax : AdvSIMD_3VectorArg_Intrinsic;
  1931. def int_aarch64_sve_bsl : AdvSIMD_3VectorArg_Intrinsic;
  1932. def int_aarch64_sve_bsl1n : AdvSIMD_3VectorArg_Intrinsic;
  1933. def int_aarch64_sve_bsl2n : AdvSIMD_3VectorArg_Intrinsic;
  1934. def int_aarch64_sve_nbsl : AdvSIMD_3VectorArg_Intrinsic;
  1935. def int_aarch64_sve_xar : AdvSIMD_2VectorArgIndexed_Intrinsic;
  1936. //
  1937. // SVE2 - Optional AES, SHA-3 and SM4
  1938. //
  1939. def int_aarch64_sve_aesd : GCCBuiltin<"__builtin_sve_svaesd_u8">,
  1940. DefaultAttrsIntrinsic<[llvm_nxv16i8_ty],
  1941. [llvm_nxv16i8_ty, llvm_nxv16i8_ty],
  1942. [IntrNoMem]>;
  1943. def int_aarch64_sve_aesimc : GCCBuiltin<"__builtin_sve_svaesimc_u8">,
  1944. DefaultAttrsIntrinsic<[llvm_nxv16i8_ty],
  1945. [llvm_nxv16i8_ty],
  1946. [IntrNoMem]>;
  1947. def int_aarch64_sve_aese : GCCBuiltin<"__builtin_sve_svaese_u8">,
  1948. DefaultAttrsIntrinsic<[llvm_nxv16i8_ty],
  1949. [llvm_nxv16i8_ty, llvm_nxv16i8_ty],
  1950. [IntrNoMem]>;
  1951. def int_aarch64_sve_aesmc : GCCBuiltin<"__builtin_sve_svaesmc_u8">,
  1952. DefaultAttrsIntrinsic<[llvm_nxv16i8_ty],
  1953. [llvm_nxv16i8_ty],
  1954. [IntrNoMem]>;
  1955. def int_aarch64_sve_rax1 : GCCBuiltin<"__builtin_sve_svrax1_u64">,
  1956. DefaultAttrsIntrinsic<[llvm_nxv2i64_ty],
  1957. [llvm_nxv2i64_ty, llvm_nxv2i64_ty],
  1958. [IntrNoMem]>;
  1959. def int_aarch64_sve_sm4e : GCCBuiltin<"__builtin_sve_svsm4e_u32">,
  1960. DefaultAttrsIntrinsic<[llvm_nxv4i32_ty],
  1961. [llvm_nxv4i32_ty, llvm_nxv4i32_ty],
  1962. [IntrNoMem]>;
  1963. def int_aarch64_sve_sm4ekey : GCCBuiltin<"__builtin_sve_svsm4ekey_u32">,
  1964. DefaultAttrsIntrinsic<[llvm_nxv4i32_ty],
  1965. [llvm_nxv4i32_ty, llvm_nxv4i32_ty],
  1966. [IntrNoMem]>;
  1967. //
  1968. // SVE2 - Extended table lookup/permute
  1969. //
  1970. def int_aarch64_sve_tbl2 : AdvSIMD_SVE2_TBX_Intrinsic;
  1971. def int_aarch64_sve_tbx : AdvSIMD_SVE2_TBX_Intrinsic;
  1972. //
  1973. // SVE2 - Optional bit permutation
  1974. //
  1975. def int_aarch64_sve_bdep_x : AdvSIMD_2VectorArg_Intrinsic;
  1976. def int_aarch64_sve_bext_x : AdvSIMD_2VectorArg_Intrinsic;
  1977. def int_aarch64_sve_bgrp_x : AdvSIMD_2VectorArg_Intrinsic;
  1978. //
  1979. // SVE ACLE: 7.3. INT8 matrix multiply extensions
  1980. //
  1981. def int_aarch64_sve_ummla : SVE_MatMul_Intrinsic;
  1982. def int_aarch64_sve_smmla : SVE_MatMul_Intrinsic;
  1983. def int_aarch64_sve_usmmla : SVE_MatMul_Intrinsic;
  1984. def int_aarch64_sve_usdot : AdvSIMD_SVE_DOT_Intrinsic;
  1985. def int_aarch64_sve_usdot_lane : AdvSIMD_SVE_DOT_Indexed_Intrinsic;
  1986. def int_aarch64_sve_sudot_lane : AdvSIMD_SVE_DOT_Indexed_Intrinsic;
  1987. //
  1988. // SVE ACLE: 7.4/5. FP64/FP32 matrix multiply extensions
  1989. //
  1990. def int_aarch64_sve_fmmla : AdvSIMD_3VectorArg_Intrinsic;
  1991. //
  1992. // SVE ACLE: 7.2. BFloat16 extensions
  1993. //
  1994. def int_aarch64_sve_bfdot : SVE_4Vec_BF16;
  1995. def int_aarch64_sve_bfmlalb : SVE_4Vec_BF16;
  1996. def int_aarch64_sve_bfmlalt : SVE_4Vec_BF16;
  1997. def int_aarch64_sve_bfmmla : SVE_4Vec_BF16;
  1998. def int_aarch64_sve_bfdot_lane : SVE_4Vec_BF16_Indexed;
  1999. def int_aarch64_sve_bfmlalb_lane : SVE_4Vec_BF16_Indexed;
  2000. def int_aarch64_sve_bfmlalt_lane : SVE_4Vec_BF16_Indexed;
  2001. }
  2002. //
  2003. // SVE2 - Contiguous conflict detection
  2004. //
  2005. def int_aarch64_sve_whilerw_b : SVE2_CONFLICT_DETECT_Intrinsic;
  2006. def int_aarch64_sve_whilerw_h : SVE2_CONFLICT_DETECT_Intrinsic;
  2007. def int_aarch64_sve_whilerw_s : SVE2_CONFLICT_DETECT_Intrinsic;
  2008. def int_aarch64_sve_whilerw_d : SVE2_CONFLICT_DETECT_Intrinsic;
  2009. def int_aarch64_sve_whilewr_b : SVE2_CONFLICT_DETECT_Intrinsic;
  2010. def int_aarch64_sve_whilewr_h : SVE2_CONFLICT_DETECT_Intrinsic;
  2011. def int_aarch64_sve_whilewr_s : SVE2_CONFLICT_DETECT_Intrinsic;
  2012. def int_aarch64_sve_whilewr_d : SVE2_CONFLICT_DETECT_Intrinsic;