IntrinsicsPowerPC.td 77 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497
  1. //===- IntrinsicsPowerPC.td - Defines PowerPC 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 PowerPC-specific intrinsics.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. //===----------------------------------------------------------------------===//
  13. // Definitions for all PowerPC intrinsics.
  14. //
  15. // Non-altivec intrinsics.
  16. let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.".
  17. // dcba/dcbf/dcbi/dcbst/dcbt/dcbz/dcbzl(PPC970) instructions.
  18. def int_ppc_dcba : Intrinsic<[], [llvm_ptr_ty], []>;
  19. def int_ppc_dcbf : GCCBuiltin<"__builtin_dcbf">,
  20. Intrinsic<[], [llvm_ptr_ty], [IntrArgMemOnly]>;
  21. def int_ppc_dcbfl : Intrinsic<[], [llvm_ptr_ty], [IntrArgMemOnly]>;
  22. def int_ppc_dcbflp : Intrinsic<[], [llvm_ptr_ty], [IntrArgMemOnly]>;
  23. def int_ppc_dcbfps : Intrinsic<[], [llvm_ptr_ty], [IntrArgMemOnly]>;
  24. def int_ppc_dcbstps : Intrinsic<[], [llvm_ptr_ty], [IntrArgMemOnly]>;
  25. def int_ppc_dcbi : Intrinsic<[], [llvm_ptr_ty], []>;
  26. def int_ppc_dcbst : Intrinsic<[], [llvm_ptr_ty], []>;
  27. def int_ppc_dcbt : Intrinsic<[], [llvm_ptr_ty],
  28. [IntrArgMemOnly, NoCapture<ArgIndex<0>>]>;
  29. def int_ppc_dcbtst: Intrinsic<[], [llvm_ptr_ty],
  30. [IntrArgMemOnly, NoCapture<ArgIndex<0>>]>;
  31. def int_ppc_dcbt_with_hint: Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty],
  32. [IntrArgMemOnly, NoCapture<ArgIndex<0>>, ImmArg<ArgIndex<1>>]>;
  33. def int_ppc_dcbtst_with_hint: Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty],
  34. [IntrArgMemOnly, NoCapture<ArgIndex<0>>, ImmArg<ArgIndex<1>>]>;
  35. def int_ppc_dcbz : Intrinsic<[], [llvm_ptr_ty], []>;
  36. def int_ppc_dcbzl : Intrinsic<[], [llvm_ptr_ty], []>;
  37. // Population Count in each Byte.
  38. def int_ppc_popcntb : Intrinsic<[llvm_i64_ty], [llvm_i64_ty], [IntrNoMem]>;
  39. // sync instruction (i.e. sync 0, a.k.a hwsync)
  40. def int_ppc_sync : Intrinsic<[], [], []>;
  41. // isync instruction
  42. def int_ppc_isync : Intrinsic<[], [], []>;
  43. // lwsync is sync 1
  44. def int_ppc_lwsync : Intrinsic<[], [], []>;
  45. // eieio instruction
  46. def int_ppc_eieio : Intrinsic<[],[],[]>;
  47. // Get content from current FPSCR register
  48. def int_ppc_readflm : GCCBuiltin<"__builtin_readflm">,
  49. Intrinsic<[llvm_double_ty], [], [IntrNoMem]>;
  50. // Set FPSCR register, and return previous content
  51. def int_ppc_setflm : GCCBuiltin<"__builtin_setflm">,
  52. Intrinsic<[llvm_double_ty], [llvm_double_ty], []>;
  53. // Intrinsics for [double]word extended forms of divide instructions
  54. def int_ppc_divwe : GCCBuiltin<"__builtin_divwe">,
  55. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  56. [IntrNoMem]>;
  57. def int_ppc_divweu : GCCBuiltin<"__builtin_divweu">,
  58. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
  59. [IntrNoMem]>;
  60. def int_ppc_divde : GCCBuiltin<"__builtin_divde">,
  61. Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty],
  62. [IntrNoMem]>;
  63. def int_ppc_divdeu : GCCBuiltin<"__builtin_divdeu">,
  64. Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty],
  65. [IntrNoMem]>;
  66. // Generate a random number
  67. def int_ppc_darn : GCCBuiltin<"__builtin_darn">,
  68. Intrinsic<[llvm_i64_ty], [], [IntrNoMem]>;
  69. def int_ppc_darnraw : GCCBuiltin<"__builtin_darn_raw">,
  70. Intrinsic<[llvm_i64_ty], [], [IntrNoMem]>;
  71. def int_ppc_darn32 : GCCBuiltin<"__builtin_darn_32">,
  72. Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>;
  73. // Bit permute doubleword
  74. def int_ppc_bpermd : GCCBuiltin<"__builtin_bpermd">,
  75. Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty],
  76. [IntrNoMem]>;
  77. // Parallel Bits Deposit/Extract Doubleword Builtins.
  78. def int_ppc_pdepd
  79. : GCCBuiltin<"__builtin_pdepd">,
  80. Intrinsic <[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], [IntrNoMem]>;
  81. def int_ppc_pextd
  82. : GCCBuiltin<"__builtin_pextd">,
  83. Intrinsic <[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], [IntrNoMem]>;
  84. // Centrifuge Doubleword Builtin.
  85. def int_ppc_cfuged
  86. : GCCBuiltin<"__builtin_cfuged">,
  87. Intrinsic <[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], [IntrNoMem]>;
  88. // Count Leading / Trailing Zeroes under bit Mask Builtins.
  89. def int_ppc_cntlzdm
  90. : GCCBuiltin<"__builtin_cntlzdm">,
  91. Intrinsic <[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], [IntrNoMem]>;
  92. def int_ppc_cnttzdm
  93. : GCCBuiltin<"__builtin_cnttzdm">,
  94. Intrinsic <[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], [IntrNoMem]>;
  95. def int_ppc_truncf128_round_to_odd
  96. : GCCBuiltin<"__builtin_truncf128_round_to_odd">,
  97. Intrinsic <[llvm_double_ty], [llvm_f128_ty], [IntrNoMem]>;
  98. def int_ppc_sqrtf128_round_to_odd
  99. : GCCBuiltin<"__builtin_sqrtf128_round_to_odd">,
  100. Intrinsic <[llvm_f128_ty], [llvm_f128_ty], [IntrNoMem]>;
  101. def int_ppc_addf128_round_to_odd
  102. : GCCBuiltin<"__builtin_addf128_round_to_odd">,
  103. Intrinsic <[llvm_f128_ty], [llvm_f128_ty,llvm_f128_ty], [IntrNoMem]>;
  104. def int_ppc_subf128_round_to_odd
  105. : GCCBuiltin<"__builtin_subf128_round_to_odd">,
  106. Intrinsic <[llvm_f128_ty], [llvm_f128_ty,llvm_f128_ty], [IntrNoMem]>;
  107. def int_ppc_mulf128_round_to_odd
  108. : GCCBuiltin<"__builtin_mulf128_round_to_odd">,
  109. Intrinsic <[llvm_f128_ty], [llvm_f128_ty,llvm_f128_ty], [IntrNoMem]>;
  110. def int_ppc_divf128_round_to_odd
  111. : GCCBuiltin<"__builtin_divf128_round_to_odd">,
  112. Intrinsic <[llvm_f128_ty], [llvm_f128_ty,llvm_f128_ty], [IntrNoMem]>;
  113. def int_ppc_fmaf128_round_to_odd
  114. : GCCBuiltin<"__builtin_fmaf128_round_to_odd">,
  115. Intrinsic <[llvm_f128_ty], [llvm_f128_ty,llvm_f128_ty,llvm_f128_ty], [IntrNoMem]>;
  116. def int_ppc_scalar_extract_expq
  117. : GCCBuiltin<"__builtin_vsx_scalar_extract_expq">,
  118. Intrinsic <[llvm_i64_ty], [llvm_f128_ty], [IntrNoMem]>;
  119. def int_ppc_scalar_insert_exp_qp
  120. : GCCBuiltin<"__builtin_vsx_scalar_insert_exp_qp">,
  121. Intrinsic <[llvm_f128_ty], [llvm_f128_ty, llvm_i64_ty], [IntrNoMem]>;
  122. }
  123. let TargetPrefix = "ppc" in { // All PPC intrinsics start with "llvm.ppc.".
  124. /// PowerPC_Vec_Intrinsic - Base class for all altivec intrinsics.
  125. class PowerPC_Vec_Intrinsic<string GCCIntSuffix, list<LLVMType> ret_types,
  126. list<LLVMType> param_types,
  127. list<IntrinsicProperty> properties>
  128. : GCCBuiltin<!strconcat("__builtin_altivec_", GCCIntSuffix)>,
  129. Intrinsic<ret_types, param_types, properties>;
  130. /// PowerPC_VSX_Intrinsic - Base class for all VSX intrinsics.
  131. class PowerPC_VSX_Intrinsic<string GCCIntSuffix, list<LLVMType> ret_types,
  132. list<LLVMType> param_types,
  133. list<IntrinsicProperty> properties>
  134. : GCCBuiltin<!strconcat("__builtin_vsx_", GCCIntSuffix)>,
  135. Intrinsic<ret_types, param_types, properties>;
  136. }
  137. //===----------------------------------------------------------------------===//
  138. // PowerPC MMA Intrinsic Multi Class Definitions.
  139. //
  140. multiclass PowerPC_MMA_ACC_Intrinsic<list<LLVMType> args> {
  141. def NAME: Intrinsic<[llvm_v512i1_ty], args, [IntrNoMem]>;
  142. def pp : Intrinsic<[llvm_v512i1_ty], !listconcat([llvm_v512i1_ty], args),
  143. [IntrNoMem]>;
  144. def pn : Intrinsic<[llvm_v512i1_ty], !listconcat([llvm_v512i1_ty], args),
  145. [IntrNoMem]>;
  146. def np : Intrinsic<[llvm_v512i1_ty], !listconcat([llvm_v512i1_ty], args),
  147. [IntrNoMem]>;
  148. def nn : Intrinsic<[llvm_v512i1_ty], !listconcat([llvm_v512i1_ty], args),
  149. [IntrNoMem]>;
  150. }
  151. multiclass PowerPC_MMA_ACC_PP_Intrinsic<list<LLVMType> args> {
  152. def NAME: Intrinsic<[llvm_v512i1_ty], args, [IntrNoMem]>;
  153. def pp : Intrinsic<[llvm_v512i1_ty], !listconcat([llvm_v512i1_ty], args),
  154. [IntrNoMem]>;
  155. }
  156. //===----------------------------------------------------------------------===//
  157. // PowerPC Altivec Intrinsic Class Definitions.
  158. //
  159. /// PowerPC_Vec_FF_Intrinsic - A PowerPC intrinsic that takes one v4f32
  160. /// vector and returns one. These intrinsics have no side effects.
  161. class PowerPC_Vec_FF_Intrinsic<string GCCIntSuffix>
  162. : PowerPC_Vec_Intrinsic<GCCIntSuffix,
  163. [llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
  164. /// PowerPC_Vec_FFF_Intrinsic - A PowerPC intrinsic that takes two v4f32
  165. /// vectors and returns one. These intrinsics have no side effects.
  166. class PowerPC_Vec_FFF_Intrinsic<string GCCIntSuffix>
  167. : PowerPC_Vec_Intrinsic<GCCIntSuffix,
  168. [llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty],
  169. [IntrNoMem]>;
  170. /// PowerPC_Vec_BBB_Intrinsic - A PowerPC intrinsic that takes two v16i8
  171. /// vectors and returns one. These intrinsics have no side effects.
  172. class PowerPC_Vec_BBB_Intrinsic<string GCCIntSuffix>
  173. : PowerPC_Vec_Intrinsic<GCCIntSuffix,
  174. [llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
  175. [IntrNoMem]>;
  176. /// PowerPC_Vec_HHH_Intrinsic - A PowerPC intrinsic that takes two v8i16
  177. /// vectors and returns one. These intrinsics have no side effects.
  178. class PowerPC_Vec_HHH_Intrinsic<string GCCIntSuffix>
  179. : PowerPC_Vec_Intrinsic<GCCIntSuffix,
  180. [llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
  181. [IntrNoMem]>;
  182. /// PowerPC_Vec_WWW_Intrinsic - A PowerPC intrinsic that takes two v4i32
  183. /// vectors and returns one. These intrinsics have no side effects.
  184. class PowerPC_Vec_WWW_Intrinsic<string GCCIntSuffix>
  185. : PowerPC_Vec_Intrinsic<GCCIntSuffix,
  186. [llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
  187. [IntrNoMem]>;
  188. /// PowerPC_Vec_DDD_Intrinsic - A PowerPC intrinsic that takes two v2i64
  189. /// vectors and returns one. These intrinsics have no side effects.
  190. class PowerPC_Vec_DDD_Intrinsic<string GCCIntSuffix>
  191. : PowerPC_Vec_Intrinsic<GCCIntSuffix,
  192. [llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
  193. [IntrNoMem]>;
  194. /// PowerPC_Vec_QQQ_Intrinsic - A PowerPC intrinsic that takes two v1i128
  195. /// vectors and returns one. These intrinsics have no side effects.
  196. class PowerPC_Vec_QQQ_Intrinsic<string GCCIntSuffix>
  197. : PowerPC_Vec_Intrinsic<GCCIntSuffix,
  198. [llvm_v1i128_ty], [llvm_v1i128_ty, llvm_v1i128_ty],
  199. [IntrNoMem]>;
  200. /// PowerPC_Vec_QDD_Intrinsic - A PowerPC intrinsic that takes two v2i64
  201. /// vectors and returns one v1i128. These intrinsics have no side effects.
  202. class PowerPC_Vec_QDD_Intrinsic<string GCCIntSuffix>
  203. : PowerPC_Vec_Intrinsic<GCCIntSuffix,
  204. [llvm_v1i128_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
  205. [IntrNoMem]>;
  206. //===----------------------------------------------------------------------===//
  207. // PowerPC VSX Intrinsic Class Definitions.
  208. //
  209. /// PowerPC_VSX_Vec_DDD_Intrinsic - A PowerPC intrinsic that takes two v2f64
  210. /// vectors and returns one. These intrinsics have no side effects.
  211. class PowerPC_VSX_Vec_DDD_Intrinsic<string GCCIntSuffix>
  212. : PowerPC_VSX_Intrinsic<GCCIntSuffix,
  213. [llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty],
  214. [IntrNoMem]>;
  215. /// PowerPC_VSX_Vec_FFF_Intrinsic - A PowerPC intrinsic that takes two v4f32
  216. /// vectors and returns one. These intrinsics have no side effects.
  217. class PowerPC_VSX_Vec_FFF_Intrinsic<string GCCIntSuffix>
  218. : PowerPC_VSX_Intrinsic<GCCIntSuffix,
  219. [llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty],
  220. [IntrNoMem]>;
  221. /// PowerPC_VSX_Sca_DDD_Intrinsic - A PowerPC intrinsic that takes two f64
  222. /// scalars and returns one. These intrinsics have no side effects.
  223. class PowerPC_VSX_Sca_DDD_Intrinsic<string GCCIntSuffix>
  224. : PowerPC_VSX_Intrinsic<GCCIntSuffix,
  225. [llvm_double_ty], [llvm_double_ty, llvm_double_ty],
  226. [IntrNoMem]>;
  227. //===----------------------------------------------------------------------===//
  228. // PowerPC Altivec Intrinsic Definitions.
  229. let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.".
  230. // Data Stream Control.
  231. def int_ppc_altivec_dss : GCCBuiltin<"__builtin_altivec_dss">,
  232. Intrinsic<[], [llvm_i32_ty], []>;
  233. def int_ppc_altivec_dssall : GCCBuiltin<"__builtin_altivec_dssall">,
  234. Intrinsic<[], [], []>;
  235. def int_ppc_altivec_dst : GCCBuiltin<"__builtin_altivec_dst">,
  236. Intrinsic<[],
  237. [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty],
  238. []>;
  239. def int_ppc_altivec_dstt : GCCBuiltin<"__builtin_altivec_dstt">,
  240. Intrinsic<[],
  241. [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty],
  242. []>;
  243. def int_ppc_altivec_dstst : GCCBuiltin<"__builtin_altivec_dstst">,
  244. Intrinsic<[],
  245. [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty],
  246. []>;
  247. def int_ppc_altivec_dststt : GCCBuiltin<"__builtin_altivec_dststt">,
  248. Intrinsic<[],
  249. [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty],
  250. []>;
  251. // VSCR access.
  252. def int_ppc_altivec_mfvscr : GCCBuiltin<"__builtin_altivec_mfvscr">,
  253. Intrinsic<[llvm_v8i16_ty], [], [IntrNoMem, IntrHasSideEffects]>;
  254. def int_ppc_altivec_mtvscr : GCCBuiltin<"__builtin_altivec_mtvscr">,
  255. Intrinsic<[], [llvm_v4i32_ty], [IntrNoMem, IntrHasSideEffects]>;
  256. // Loads. These don't map directly to GCC builtins because they represent the
  257. // source address with a single pointer.
  258. def int_ppc_altivec_lvx :
  259. Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>;
  260. def int_ppc_altivec_lvxl :
  261. Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>;
  262. def int_ppc_altivec_lvebx :
  263. Intrinsic<[llvm_v16i8_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>;
  264. def int_ppc_altivec_lvehx :
  265. Intrinsic<[llvm_v8i16_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>;
  266. def int_ppc_altivec_lvewx :
  267. Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>;
  268. // Stores. These don't map directly to GCC builtins because they represent the
  269. // source address with a single pointer.
  270. def int_ppc_altivec_stvx :
  271. Intrinsic<[], [llvm_v4i32_ty, llvm_ptr_ty],
  272. [IntrWriteMem, IntrArgMemOnly]>;
  273. def int_ppc_altivec_stvxl :
  274. Intrinsic<[], [llvm_v4i32_ty, llvm_ptr_ty],
  275. [IntrWriteMem, IntrArgMemOnly]>;
  276. def int_ppc_altivec_stvebx :
  277. Intrinsic<[], [llvm_v16i8_ty, llvm_ptr_ty],
  278. [IntrWriteMem, IntrArgMemOnly]>;
  279. def int_ppc_altivec_stvehx :
  280. Intrinsic<[], [llvm_v8i16_ty, llvm_ptr_ty],
  281. [IntrWriteMem, IntrArgMemOnly]>;
  282. def int_ppc_altivec_stvewx :
  283. Intrinsic<[], [llvm_v4i32_ty, llvm_ptr_ty],
  284. [IntrWriteMem, IntrArgMemOnly]>;
  285. // Comparisons setting a vector.
  286. def int_ppc_altivec_vcmpbfp : GCCBuiltin<"__builtin_altivec_vcmpbfp">,
  287. Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty],
  288. [IntrNoMem]>;
  289. def int_ppc_altivec_vcmpeqfp : GCCBuiltin<"__builtin_altivec_vcmpeqfp">,
  290. Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty],
  291. [IntrNoMem]>;
  292. def int_ppc_altivec_vcmpgefp : GCCBuiltin<"__builtin_altivec_vcmpgefp">,
  293. Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty],
  294. [IntrNoMem]>;
  295. def int_ppc_altivec_vcmpgtfp : GCCBuiltin<"__builtin_altivec_vcmpgtfp">,
  296. Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty],
  297. [IntrNoMem]>;
  298. def int_ppc_altivec_vcmpequd : GCCBuiltin<"__builtin_altivec_vcmpequd">,
  299. Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
  300. [IntrNoMem]>;
  301. def int_ppc_altivec_vcmpgtsd : GCCBuiltin<"__builtin_altivec_vcmpgtsd">,
  302. Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
  303. [IntrNoMem]>;
  304. def int_ppc_altivec_vcmpgtud : GCCBuiltin<"__builtin_altivec_vcmpgtud">,
  305. Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
  306. [IntrNoMem]>;
  307. def int_ppc_altivec_vcmpequw : GCCBuiltin<"__builtin_altivec_vcmpequw">,
  308. Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
  309. [IntrNoMem]>;
  310. def int_ppc_altivec_vcmpgtsw : GCCBuiltin<"__builtin_altivec_vcmpgtsw">,
  311. Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
  312. [IntrNoMem]>;
  313. def int_ppc_altivec_vcmpgtuw : GCCBuiltin<"__builtin_altivec_vcmpgtuw">,
  314. Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
  315. [IntrNoMem]>;
  316. def int_ppc_altivec_vcmpnew : GCCBuiltin<"__builtin_altivec_vcmpnew">,
  317. Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
  318. [IntrNoMem]>;
  319. def int_ppc_altivec_vcmpnezw : GCCBuiltin<"__builtin_altivec_vcmpnezw">,
  320. Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
  321. [IntrNoMem]>;
  322. def int_ppc_altivec_vcmpequh : GCCBuiltin<"__builtin_altivec_vcmpequh">,
  323. Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
  324. [IntrNoMem]>;
  325. def int_ppc_altivec_vcmpgtsh : GCCBuiltin<"__builtin_altivec_vcmpgtsh">,
  326. Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
  327. [IntrNoMem]>;
  328. def int_ppc_altivec_vcmpgtuh : GCCBuiltin<"__builtin_altivec_vcmpgtuh">,
  329. Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
  330. [IntrNoMem]>;
  331. def int_ppc_altivec_vcmpneh : GCCBuiltin<"__builtin_altivec_vcmpneh">,
  332. Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
  333. [IntrNoMem]>;
  334. def int_ppc_altivec_vcmpnezh : GCCBuiltin<"__builtin_altivec_vcmpnezh">,
  335. Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
  336. [IntrNoMem]>;
  337. def int_ppc_altivec_vcmpequb : GCCBuiltin<"__builtin_altivec_vcmpequb">,
  338. Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
  339. [IntrNoMem]>;
  340. def int_ppc_altivec_vcmpgtsb : GCCBuiltin<"__builtin_altivec_vcmpgtsb">,
  341. Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
  342. [IntrNoMem]>;
  343. def int_ppc_altivec_vcmpgtub : GCCBuiltin<"__builtin_altivec_vcmpgtub">,
  344. Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
  345. [IntrNoMem]>;
  346. def int_ppc_altivec_vcmpneb : GCCBuiltin<"__builtin_altivec_vcmpneb">,
  347. Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
  348. [IntrNoMem]>;
  349. def int_ppc_altivec_vcmpnezb : GCCBuiltin<"__builtin_altivec_vcmpnezb">,
  350. Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
  351. [IntrNoMem]>;
  352. def int_ppc_altivec_vcmpequq : GCCBuiltin<"__builtin_altivec_vcmpequq">,
  353. Intrinsic<[llvm_v1i128_ty], [llvm_v1i128_ty, llvm_v1i128_ty],
  354. [IntrNoMem]>;
  355. def int_ppc_altivec_vcmpgtsq : GCCBuiltin<"__builtin_altivec_vcmpgtsq">,
  356. Intrinsic<[llvm_v1i128_ty], [llvm_v1i128_ty, llvm_v1i128_ty],
  357. [IntrNoMem]>;
  358. def int_ppc_altivec_vcmpgtuq : GCCBuiltin<"__builtin_altivec_vcmpgtuq">,
  359. Intrinsic<[llvm_v1i128_ty], [llvm_v1i128_ty, llvm_v1i128_ty],
  360. [IntrNoMem]>;
  361. def int_ppc_altivec_vcmpequq_p : GCCBuiltin<"__builtin_altivec_vcmpequq_p">,
  362. Intrinsic<[llvm_i32_ty],
  363. [llvm_i32_ty,llvm_v1i128_ty,llvm_v1i128_ty],
  364. [IntrNoMem]>;
  365. def int_ppc_altivec_vcmpgtsq_p : GCCBuiltin<"__builtin_altivec_vcmpgtsq_p">,
  366. Intrinsic<[llvm_i32_ty],
  367. [llvm_i32_ty,llvm_v1i128_ty,llvm_v1i128_ty],
  368. [IntrNoMem]>;
  369. def int_ppc_altivec_vcmpgtuq_p : GCCBuiltin<"__builtin_altivec_vcmpgtuq_p">,
  370. Intrinsic<[llvm_i32_ty],
  371. [llvm_i32_ty,llvm_v1i128_ty,llvm_v1i128_ty],
  372. [IntrNoMem]>;
  373. // Predicate Comparisons. The first operand specifies interpretation of CR6.
  374. def int_ppc_altivec_vcmpbfp_p : GCCBuiltin<"__builtin_altivec_vcmpbfp_p">,
  375. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4f32_ty,llvm_v4f32_ty],
  376. [IntrNoMem]>;
  377. def int_ppc_altivec_vcmpeqfp_p : GCCBuiltin<"__builtin_altivec_vcmpeqfp_p">,
  378. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4f32_ty,llvm_v4f32_ty],
  379. [IntrNoMem]>;
  380. def int_ppc_altivec_vcmpgefp_p : GCCBuiltin<"__builtin_altivec_vcmpgefp_p">,
  381. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4f32_ty,llvm_v4f32_ty],
  382. [IntrNoMem]>;
  383. def int_ppc_altivec_vcmpgtfp_p : GCCBuiltin<"__builtin_altivec_vcmpgtfp_p">,
  384. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4f32_ty,llvm_v4f32_ty],
  385. [IntrNoMem]>;
  386. def int_ppc_altivec_vcmpequd_p : GCCBuiltin<"__builtin_altivec_vcmpequd_p">,
  387. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v2i64_ty,llvm_v2i64_ty],
  388. [IntrNoMem]>;
  389. def int_ppc_altivec_vcmpgtsd_p : GCCBuiltin<"__builtin_altivec_vcmpgtsd_p">,
  390. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v2i64_ty,llvm_v2i64_ty],
  391. [IntrNoMem]>;
  392. def int_ppc_altivec_vcmpgtud_p : GCCBuiltin<"__builtin_altivec_vcmpgtud_p">,
  393. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v2i64_ty,llvm_v2i64_ty],
  394. [IntrNoMem]>;
  395. def int_ppc_altivec_vcmpequw_p : GCCBuiltin<"__builtin_altivec_vcmpequw_p">,
  396. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4i32_ty,llvm_v4i32_ty],
  397. [IntrNoMem]>;
  398. def int_ppc_altivec_vcmpgtsw_p : GCCBuiltin<"__builtin_altivec_vcmpgtsw_p">,
  399. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4i32_ty,llvm_v4i32_ty],
  400. [IntrNoMem]>;
  401. def int_ppc_altivec_vcmpgtuw_p : GCCBuiltin<"__builtin_altivec_vcmpgtuw_p">,
  402. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4i32_ty,llvm_v4i32_ty],
  403. [IntrNoMem]>;
  404. def int_ppc_altivec_vcmpnew_p : GCCBuiltin<"__builtin_altivec_vcmpnew_p">,
  405. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4i32_ty,llvm_v4i32_ty],
  406. [IntrNoMem]>;
  407. def int_ppc_altivec_vcmpnezw_p : GCCBuiltin<"__builtin_altivec_vcmpnezw_p">,
  408. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4i32_ty,llvm_v4i32_ty],
  409. [IntrNoMem]>;
  410. def int_ppc_altivec_vcmpequh_p : GCCBuiltin<"__builtin_altivec_vcmpequh_p">,
  411. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v8i16_ty,llvm_v8i16_ty],
  412. [IntrNoMem]>;
  413. def int_ppc_altivec_vcmpgtsh_p : GCCBuiltin<"__builtin_altivec_vcmpgtsh_p">,
  414. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v8i16_ty,llvm_v8i16_ty],
  415. [IntrNoMem]>;
  416. def int_ppc_altivec_vcmpgtuh_p : GCCBuiltin<"__builtin_altivec_vcmpgtuh_p">,
  417. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v8i16_ty,llvm_v8i16_ty],
  418. [IntrNoMem]>;
  419. def int_ppc_altivec_vcmpneh_p : GCCBuiltin<"__builtin_altivec_vcmpneh_p">,
  420. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v8i16_ty,llvm_v8i16_ty],
  421. [IntrNoMem]>;
  422. def int_ppc_altivec_vcmpnezh_p : GCCBuiltin<"__builtin_altivec_vcmpnezh_p">,
  423. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v8i16_ty,llvm_v8i16_ty],
  424. [IntrNoMem]>;
  425. def int_ppc_altivec_vcmpequb_p : GCCBuiltin<"__builtin_altivec_vcmpequb_p">,
  426. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v16i8_ty,llvm_v16i8_ty],
  427. [IntrNoMem]>;
  428. def int_ppc_altivec_vcmpgtsb_p : GCCBuiltin<"__builtin_altivec_vcmpgtsb_p">,
  429. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v16i8_ty,llvm_v16i8_ty],
  430. [IntrNoMem]>;
  431. def int_ppc_altivec_vcmpgtub_p : GCCBuiltin<"__builtin_altivec_vcmpgtub_p">,
  432. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v16i8_ty,llvm_v16i8_ty],
  433. [IntrNoMem]>;
  434. def int_ppc_altivec_vcmpneb_p : GCCBuiltin<"__builtin_altivec_vcmpneb_p">,
  435. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v16i8_ty,llvm_v16i8_ty],
  436. [IntrNoMem]>;
  437. def int_ppc_altivec_vcmpnezb_p : GCCBuiltin<"__builtin_altivec_vcmpnezb_p">,
  438. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v16i8_ty,llvm_v16i8_ty],
  439. [IntrNoMem]>;
  440. def int_ppc_altivec_vclzlsbb : GCCBuiltin<"__builtin_altivec_vclzlsbb">,
  441. Intrinsic<[llvm_i32_ty],[llvm_v16i8_ty],[IntrNoMem]>;
  442. def int_ppc_altivec_vctzlsbb : GCCBuiltin<"__builtin_altivec_vctzlsbb">,
  443. Intrinsic<[llvm_i32_ty],[llvm_v16i8_ty],[IntrNoMem]>;
  444. def int_ppc_altivec_vprtybw : GCCBuiltin<"__builtin_altivec_vprtybw">,
  445. Intrinsic<[llvm_v4i32_ty],[llvm_v4i32_ty],[IntrNoMem]>;
  446. def int_ppc_altivec_vprtybd : GCCBuiltin<"__builtin_altivec_vprtybd">,
  447. Intrinsic<[llvm_v2i64_ty],[llvm_v2i64_ty],[IntrNoMem]>;
  448. def int_ppc_altivec_vprtybq : GCCBuiltin<"__builtin_altivec_vprtybq">,
  449. Intrinsic<[llvm_v1i128_ty],[llvm_v1i128_ty],[IntrNoMem]>;
  450. // P10 Vector Extract with Mask
  451. def int_ppc_altivec_vextractbm : GCCBuiltin<"__builtin_altivec_vextractbm">,
  452. Intrinsic<[llvm_i32_ty], [llvm_v16i8_ty], [IntrNoMem]>;
  453. def int_ppc_altivec_vextracthm : GCCBuiltin<"__builtin_altivec_vextracthm">,
  454. Intrinsic<[llvm_i32_ty], [llvm_v8i16_ty], [IntrNoMem]>;
  455. def int_ppc_altivec_vextractwm : GCCBuiltin<"__builtin_altivec_vextractwm">,
  456. Intrinsic<[llvm_i32_ty], [llvm_v4i32_ty], [IntrNoMem]>;
  457. def int_ppc_altivec_vextractdm : GCCBuiltin<"__builtin_altivec_vextractdm">,
  458. Intrinsic<[llvm_i32_ty], [llvm_v2i64_ty], [IntrNoMem]>;
  459. def int_ppc_altivec_vextractqm : GCCBuiltin<"__builtin_altivec_vextractqm">,
  460. Intrinsic<[llvm_i32_ty], [llvm_v1i128_ty], [IntrNoMem]>;
  461. // P10 Vector Expand with Mask
  462. def int_ppc_altivec_vexpandbm : GCCBuiltin<"__builtin_altivec_vexpandbm">,
  463. Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty], [IntrNoMem]>;
  464. def int_ppc_altivec_vexpandhm : GCCBuiltin<"__builtin_altivec_vexpandhm">,
  465. Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty], [IntrNoMem]>;
  466. def int_ppc_altivec_vexpandwm : GCCBuiltin<"__builtin_altivec_vexpandwm">,
  467. Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty], [IntrNoMem]>;
  468. def int_ppc_altivec_vexpanddm : GCCBuiltin<"__builtin_altivec_vexpanddm">,
  469. Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty], [IntrNoMem]>;
  470. def int_ppc_altivec_vexpandqm : GCCBuiltin<"__builtin_altivec_vexpandqm">,
  471. Intrinsic<[llvm_v1i128_ty], [llvm_v1i128_ty], [IntrNoMem]>;
  472. // P10 Vector Count with Mask intrinsics.
  473. def int_ppc_altivec_vcntmbb : GCCBuiltin<"__builtin_altivec_vcntmbb">,
  474. Intrinsic<[llvm_i64_ty], [llvm_v16i8_ty, llvm_i32_ty],
  475. [IntrNoMem, ImmArg<ArgIndex<1>>]>;
  476. def int_ppc_altivec_vcntmbh : GCCBuiltin<"__builtin_altivec_vcntmbh">,
  477. Intrinsic<[llvm_i64_ty], [llvm_v8i16_ty, llvm_i32_ty],
  478. [IntrNoMem, ImmArg<ArgIndex<1>>]>;
  479. def int_ppc_altivec_vcntmbw : GCCBuiltin<"__builtin_altivec_vcntmbw">,
  480. Intrinsic<[llvm_i64_ty], [llvm_v4i32_ty, llvm_i32_ty],
  481. [IntrNoMem, ImmArg<ArgIndex<1>>]>;
  482. def int_ppc_altivec_vcntmbd : GCCBuiltin<"__builtin_altivec_vcntmbd">,
  483. Intrinsic<[llvm_i64_ty], [llvm_v2i64_ty, llvm_i32_ty],
  484. [IntrNoMem, ImmArg<ArgIndex<1>>]>;
  485. // P10 Move to VSR with Mask Intrinsics.
  486. def int_ppc_altivec_mtvsrbm : GCCBuiltin<"__builtin_altivec_mtvsrbm">,
  487. Intrinsic<[llvm_v16i8_ty], [llvm_i64_ty], [IntrNoMem]>;
  488. def int_ppc_altivec_mtvsrhm : GCCBuiltin<"__builtin_altivec_mtvsrhm">,
  489. Intrinsic<[llvm_v8i16_ty], [llvm_i64_ty], [IntrNoMem]>;
  490. def int_ppc_altivec_mtvsrwm : GCCBuiltin<"__builtin_altivec_mtvsrwm">,
  491. Intrinsic<[llvm_v4i32_ty], [llvm_i64_ty], [IntrNoMem]>;
  492. def int_ppc_altivec_mtvsrdm : GCCBuiltin<"__builtin_altivec_mtvsrdm">,
  493. Intrinsic<[llvm_v2i64_ty], [llvm_i64_ty], [IntrNoMem]>;
  494. def int_ppc_altivec_mtvsrqm : GCCBuiltin<"__builtin_altivec_mtvsrqm">,
  495. Intrinsic<[llvm_v1i128_ty], [llvm_i64_ty], [IntrNoMem]>;
  496. // P10 Vector Parallel Bits Deposit/Extract Doubleword Builtins.
  497. def int_ppc_altivec_vpdepd : GCCBuiltin<"__builtin_altivec_vpdepd">,
  498. Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
  499. [IntrNoMem]>;
  500. def int_ppc_altivec_vpextd : GCCBuiltin<"__builtin_altivec_vpextd">,
  501. Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
  502. [IntrNoMem]>;
  503. // P10 Vector String Isolate Intrinsics.
  504. def int_ppc_altivec_vstribr : GCCBuiltin<"__builtin_altivec_vstribr">,
  505. Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty], [IntrNoMem]>;
  506. def int_ppc_altivec_vstribl : GCCBuiltin<"__builtin_altivec_vstribl">,
  507. Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty], [IntrNoMem]>;
  508. def int_ppc_altivec_vstrihr : GCCBuiltin<"__builtin_altivec_vstrihr">,
  509. Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty], [IntrNoMem]>;
  510. def int_ppc_altivec_vstrihl : GCCBuiltin<"__builtin_altivec_vstrihl">,
  511. Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty], [IntrNoMem]>;
  512. // Predicate Intrinsics: The first operand specifies interpretation of CR6.
  513. def int_ppc_altivec_vstribr_p : GCCBuiltin<"__builtin_altivec_vstribr_p">,
  514. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_v16i8_ty], [IntrNoMem]>;
  515. def int_ppc_altivec_vstribl_p : GCCBuiltin<"__builtin_altivec_vstribl_p">,
  516. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_v16i8_ty], [IntrNoMem]>;
  517. def int_ppc_altivec_vstrihr_p : GCCBuiltin<"__builtin_altivec_vstrihr_p">,
  518. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_v8i16_ty], [IntrNoMem]>;
  519. def int_ppc_altivec_vstrihl_p : GCCBuiltin<"__builtin_altivec_vstrihl_p">,
  520. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_v8i16_ty], [IntrNoMem]>;
  521. // P10 Vector Centrifuge Builtin.
  522. def int_ppc_altivec_vcfuged : GCCBuiltin<"__builtin_altivec_vcfuged">,
  523. Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
  524. [IntrNoMem]>;
  525. // P10 Vector Gather Every Nth Bit Builtin.
  526. def int_ppc_altivec_vgnb : GCCBuiltin<"__builtin_altivec_vgnb">,
  527. Intrinsic<[llvm_i64_ty], [llvm_v1i128_ty, llvm_i32_ty],
  528. [IntrNoMem, ImmArg<ArgIndex<1>>]>;
  529. // P10 Vector Clear Bytes
  530. def int_ppc_altivec_vclrlb : GCCBuiltin<"__builtin_altivec_vclrlb">,
  531. Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty],
  532. [IntrNoMem]>;
  533. def int_ppc_altivec_vclrrb : GCCBuiltin<"__builtin_altivec_vclrrb">,
  534. Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty],
  535. [IntrNoMem]>;
  536. // P10 Vector Shift Double Bit Immediate.
  537. def int_ppc_altivec_vsldbi : GCCBuiltin<"__builtin_altivec_vsldbi">,
  538. Intrinsic<[llvm_v16i8_ty],
  539. [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty],
  540. [IntrNoMem, ImmArg<ArgIndex<2>>]>;
  541. def int_ppc_altivec_vsrdbi : GCCBuiltin<"__builtin_altivec_vsrdbi">,
  542. Intrinsic<[llvm_v16i8_ty],
  543. [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty],
  544. [IntrNoMem, ImmArg<ArgIndex<2>>]>;
  545. // P10 Vector Insert.
  546. def int_ppc_altivec_vinsblx : GCCBuiltin<"__builtin_altivec_vinsblx">,
  547. Intrinsic<[llvm_v16i8_ty],
  548. [llvm_v16i8_ty, llvm_i32_ty, llvm_i32_ty],
  549. [IntrNoMem]>;
  550. def int_ppc_altivec_vinsbrx : GCCBuiltin<"__builtin_altivec_vinsbrx">,
  551. Intrinsic<[llvm_v16i8_ty],
  552. [llvm_v16i8_ty, llvm_i32_ty, llvm_i32_ty],
  553. [IntrNoMem]>;
  554. def int_ppc_altivec_vinshlx : GCCBuiltin<"__builtin_altivec_vinshlx">,
  555. Intrinsic<[llvm_v8i16_ty],
  556. [llvm_v8i16_ty, llvm_i32_ty, llvm_i32_ty],
  557. [IntrNoMem]>;
  558. def int_ppc_altivec_vinshrx : GCCBuiltin<"__builtin_altivec_vinshrx">,
  559. Intrinsic<[llvm_v8i16_ty],
  560. [llvm_v8i16_ty, llvm_i32_ty, llvm_i32_ty],
  561. [IntrNoMem]>;
  562. def int_ppc_altivec_vinswlx : GCCBuiltin<"__builtin_altivec_vinswlx">,
  563. Intrinsic<[llvm_v4i32_ty],
  564. [llvm_v4i32_ty, llvm_i32_ty, llvm_i32_ty],
  565. [IntrNoMem]>;
  566. def int_ppc_altivec_vinswrx : GCCBuiltin<"__builtin_altivec_vinswrx">,
  567. Intrinsic<[llvm_v4i32_ty],
  568. [llvm_v4i32_ty, llvm_i32_ty, llvm_i32_ty],
  569. [IntrNoMem]>;
  570. def int_ppc_altivec_vinsdlx : GCCBuiltin<"__builtin_altivec_vinsdlx">,
  571. Intrinsic<[llvm_v2i64_ty],
  572. [llvm_v2i64_ty, llvm_i64_ty, llvm_i64_ty],
  573. [IntrNoMem]>;
  574. def int_ppc_altivec_vinsdrx : GCCBuiltin<"__builtin_altivec_vinsdrx">,
  575. Intrinsic<[llvm_v2i64_ty],
  576. [llvm_v2i64_ty, llvm_i64_ty, llvm_i64_ty],
  577. [IntrNoMem]>;
  578. def int_ppc_altivec_vinsbvlx : GCCBuiltin<"__builtin_altivec_vinsbvlx">,
  579. Intrinsic<[llvm_v16i8_ty],
  580. [llvm_v16i8_ty, llvm_i32_ty, llvm_v16i8_ty],
  581. [IntrNoMem]>;
  582. def int_ppc_altivec_vinsbvrx : GCCBuiltin<"__builtin_altivec_vinsbvrx">,
  583. Intrinsic<[llvm_v16i8_ty],
  584. [llvm_v16i8_ty, llvm_i32_ty, llvm_v16i8_ty],
  585. [IntrNoMem]>;
  586. def int_ppc_altivec_vinshvlx : GCCBuiltin<"__builtin_altivec_vinshvlx">,
  587. Intrinsic<[llvm_v8i16_ty],
  588. [llvm_v8i16_ty, llvm_i32_ty, llvm_v8i16_ty],
  589. [IntrNoMem]>;
  590. def int_ppc_altivec_vinshvrx : GCCBuiltin<"__builtin_altivec_vinshvrx">,
  591. Intrinsic<[llvm_v8i16_ty],
  592. [llvm_v8i16_ty, llvm_i32_ty, llvm_v8i16_ty],
  593. [IntrNoMem]>;
  594. def int_ppc_altivec_vinswvlx : GCCBuiltin<"__builtin_altivec_vinswvlx">,
  595. Intrinsic<[llvm_v4i32_ty],
  596. [llvm_v4i32_ty, llvm_i32_ty, llvm_v4i32_ty],
  597. [IntrNoMem]>;
  598. def int_ppc_altivec_vinswvrx : GCCBuiltin<"__builtin_altivec_vinswvrx">,
  599. Intrinsic<[llvm_v4i32_ty],
  600. [llvm_v4i32_ty, llvm_i32_ty, llvm_v4i32_ty],
  601. [IntrNoMem]>;
  602. // P10 Vector Insert with immediate.
  603. def int_ppc_altivec_vinsw :
  604. Intrinsic<[llvm_v4i32_ty],
  605. [llvm_v4i32_ty, llvm_i32_ty, llvm_i32_ty],
  606. [IntrNoMem, ImmArg<ArgIndex<2>>]>;
  607. def int_ppc_altivec_vinsd :
  608. Intrinsic<[llvm_v2i64_ty],
  609. [llvm_v2i64_ty, llvm_i64_ty, llvm_i32_ty],
  610. [IntrNoMem, ImmArg<ArgIndex<2>>]>;
  611. // P10 Vector Extract.
  612. def int_ppc_altivec_vextdubvlx : GCCBuiltin<"__builtin_altivec_vextdubvlx">,
  613. Intrinsic<[llvm_v2i64_ty],
  614. [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty],
  615. [IntrNoMem]>;
  616. def int_ppc_altivec_vextdubvrx : GCCBuiltin<"__builtin_altivec_vextdubvrx">,
  617. Intrinsic<[llvm_v2i64_ty],
  618. [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty],
  619. [IntrNoMem]>;
  620. def int_ppc_altivec_vextduhvlx : GCCBuiltin<"__builtin_altivec_vextduhvlx">,
  621. Intrinsic<[llvm_v2i64_ty],
  622. [llvm_v8i16_ty, llvm_v8i16_ty, llvm_i32_ty],
  623. [IntrNoMem]>;
  624. def int_ppc_altivec_vextduhvrx : GCCBuiltin<"__builtin_altivec_vextduhvrx">,
  625. Intrinsic<[llvm_v2i64_ty],
  626. [llvm_v8i16_ty, llvm_v8i16_ty, llvm_i32_ty],
  627. [IntrNoMem]>;
  628. def int_ppc_altivec_vextduwvlx : GCCBuiltin<"__builtin_altivec_vextduwvlx">,
  629. Intrinsic<[llvm_v2i64_ty],
  630. [llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty],
  631. [IntrNoMem]>;
  632. def int_ppc_altivec_vextduwvrx : GCCBuiltin<"__builtin_altivec_vextduwvrx">,
  633. Intrinsic<[llvm_v2i64_ty],
  634. [llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty],
  635. [IntrNoMem]>;
  636. def int_ppc_altivec_vextddvlx : GCCBuiltin<"__builtin_altivec_vextddvlx">,
  637. Intrinsic<[llvm_v2i64_ty],
  638. [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty],
  639. [IntrNoMem]>;
  640. def int_ppc_altivec_vextddvrx : GCCBuiltin<"__builtin_altivec_vextddvrx">,
  641. Intrinsic<[llvm_v2i64_ty],
  642. [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty],
  643. [IntrNoMem]>;
  644. }
  645. // Vector average.
  646. def int_ppc_altivec_vavgsb : PowerPC_Vec_BBB_Intrinsic<"vavgsb">;
  647. def int_ppc_altivec_vavgsh : PowerPC_Vec_HHH_Intrinsic<"vavgsh">;
  648. def int_ppc_altivec_vavgsw : PowerPC_Vec_WWW_Intrinsic<"vavgsw">;
  649. def int_ppc_altivec_vavgub : PowerPC_Vec_BBB_Intrinsic<"vavgub">;
  650. def int_ppc_altivec_vavguh : PowerPC_Vec_HHH_Intrinsic<"vavguh">;
  651. def int_ppc_altivec_vavguw : PowerPC_Vec_WWW_Intrinsic<"vavguw">;
  652. // Vector maximum.
  653. def int_ppc_altivec_vmaxfp : PowerPC_Vec_FFF_Intrinsic<"vmaxfp">;
  654. def int_ppc_altivec_vmaxsb : PowerPC_Vec_BBB_Intrinsic<"vmaxsb">;
  655. def int_ppc_altivec_vmaxsh : PowerPC_Vec_HHH_Intrinsic<"vmaxsh">;
  656. def int_ppc_altivec_vmaxsw : PowerPC_Vec_WWW_Intrinsic<"vmaxsw">;
  657. def int_ppc_altivec_vmaxsd : PowerPC_Vec_DDD_Intrinsic<"vmaxsd">;
  658. def int_ppc_altivec_vmaxub : PowerPC_Vec_BBB_Intrinsic<"vmaxub">;
  659. def int_ppc_altivec_vmaxuh : PowerPC_Vec_HHH_Intrinsic<"vmaxuh">;
  660. def int_ppc_altivec_vmaxuw : PowerPC_Vec_WWW_Intrinsic<"vmaxuw">;
  661. def int_ppc_altivec_vmaxud : PowerPC_Vec_DDD_Intrinsic<"vmaxud">;
  662. // Vector minimum.
  663. def int_ppc_altivec_vminfp : PowerPC_Vec_FFF_Intrinsic<"vminfp">;
  664. def int_ppc_altivec_vminsb : PowerPC_Vec_BBB_Intrinsic<"vminsb">;
  665. def int_ppc_altivec_vminsh : PowerPC_Vec_HHH_Intrinsic<"vminsh">;
  666. def int_ppc_altivec_vminsw : PowerPC_Vec_WWW_Intrinsic<"vminsw">;
  667. def int_ppc_altivec_vminsd : PowerPC_Vec_DDD_Intrinsic<"vminsd">;
  668. def int_ppc_altivec_vminub : PowerPC_Vec_BBB_Intrinsic<"vminub">;
  669. def int_ppc_altivec_vminuh : PowerPC_Vec_HHH_Intrinsic<"vminuh">;
  670. def int_ppc_altivec_vminuw : PowerPC_Vec_WWW_Intrinsic<"vminuw">;
  671. def int_ppc_altivec_vminud : PowerPC_Vec_DDD_Intrinsic<"vminud">;
  672. // Saturating adds.
  673. def int_ppc_altivec_vaddubs : PowerPC_Vec_BBB_Intrinsic<"vaddubs">;
  674. def int_ppc_altivec_vaddsbs : PowerPC_Vec_BBB_Intrinsic<"vaddsbs">;
  675. def int_ppc_altivec_vadduhs : PowerPC_Vec_HHH_Intrinsic<"vadduhs">;
  676. def int_ppc_altivec_vaddshs : PowerPC_Vec_HHH_Intrinsic<"vaddshs">;
  677. def int_ppc_altivec_vadduws : PowerPC_Vec_WWW_Intrinsic<"vadduws">;
  678. def int_ppc_altivec_vaddsws : PowerPC_Vec_WWW_Intrinsic<"vaddsws">;
  679. def int_ppc_altivec_vaddcuw : PowerPC_Vec_WWW_Intrinsic<"vaddcuw">;
  680. def int_ppc_altivec_vaddcuq : PowerPC_Vec_QQQ_Intrinsic<"vaddcuq">;
  681. // Saturating subs.
  682. def int_ppc_altivec_vsububs : PowerPC_Vec_BBB_Intrinsic<"vsububs">;
  683. def int_ppc_altivec_vsubsbs : PowerPC_Vec_BBB_Intrinsic<"vsubsbs">;
  684. def int_ppc_altivec_vsubuhs : PowerPC_Vec_HHH_Intrinsic<"vsubuhs">;
  685. def int_ppc_altivec_vsubshs : PowerPC_Vec_HHH_Intrinsic<"vsubshs">;
  686. def int_ppc_altivec_vsubuws : PowerPC_Vec_WWW_Intrinsic<"vsubuws">;
  687. def int_ppc_altivec_vsubsws : PowerPC_Vec_WWW_Intrinsic<"vsubsws">;
  688. def int_ppc_altivec_vsubcuw : PowerPC_Vec_WWW_Intrinsic<"vsubcuw">;
  689. def int_ppc_altivec_vsubcuq : PowerPC_Vec_QQQ_Intrinsic<"vsubcuq">;
  690. let TargetPrefix = "ppc" in { // All PPC intrinsics start with "llvm.ppc.".
  691. // Saturating multiply-adds.
  692. def int_ppc_altivec_vmhaddshs : GCCBuiltin<"__builtin_altivec_vmhaddshs">,
  693. Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty,
  694. llvm_v8i16_ty, llvm_v8i16_ty],
  695. [IntrNoMem, IntrHasSideEffects]>;
  696. def int_ppc_altivec_vmhraddshs : GCCBuiltin<"__builtin_altivec_vmhraddshs">,
  697. Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty,
  698. llvm_v8i16_ty, llvm_v8i16_ty],
  699. [IntrNoMem, IntrHasSideEffects]>;
  700. def int_ppc_altivec_vmaddfp : GCCBuiltin<"__builtin_altivec_vmaddfp">,
  701. Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty,
  702. llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
  703. def int_ppc_altivec_vnmsubfp : GCCBuiltin<"__builtin_altivec_vnmsubfp">,
  704. Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty,
  705. llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
  706. // Vector Multiply Sum Instructions.
  707. def int_ppc_altivec_vmsummbm : GCCBuiltin<"__builtin_altivec_vmsummbm">,
  708. Intrinsic<[llvm_v4i32_ty], [llvm_v16i8_ty, llvm_v16i8_ty,
  709. llvm_v4i32_ty], [IntrNoMem]>;
  710. def int_ppc_altivec_vmsumshm : GCCBuiltin<"__builtin_altivec_vmsumshm">,
  711. Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty,
  712. llvm_v4i32_ty], [IntrNoMem]>;
  713. def int_ppc_altivec_vmsumshs : GCCBuiltin<"__builtin_altivec_vmsumshs">,
  714. Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty,
  715. llvm_v4i32_ty], [IntrNoMem, IntrHasSideEffects]>;
  716. def int_ppc_altivec_vmsumubm : GCCBuiltin<"__builtin_altivec_vmsumubm">,
  717. Intrinsic<[llvm_v4i32_ty], [llvm_v16i8_ty, llvm_v16i8_ty,
  718. llvm_v4i32_ty], [IntrNoMem]>;
  719. def int_ppc_altivec_vmsumuhm : GCCBuiltin<"__builtin_altivec_vmsumuhm">,
  720. Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty,
  721. llvm_v4i32_ty], [IntrNoMem]>;
  722. def int_ppc_altivec_vmsumudm : GCCBuiltin<"__builtin_altivec_vmsumudm">,
  723. Intrinsic<[llvm_v1i128_ty], [llvm_v2i64_ty, llvm_v2i64_ty,
  724. llvm_v1i128_ty], [IntrNoMem]>;
  725. def int_ppc_altivec_vmsumuhs : GCCBuiltin<"__builtin_altivec_vmsumuhs">,
  726. Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty,
  727. llvm_v4i32_ty], [IntrNoMem, IntrHasSideEffects]>;
  728. def int_ppc_altivec_vmsumcud : GCCBuiltin<"__builtin_altivec_vmsumcud">,
  729. Intrinsic<[llvm_v1i128_ty],
  730. [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v1i128_ty], [IntrNoMem]>;
  731. // Vector Multiply Instructions.
  732. def int_ppc_altivec_vmulesb : GCCBuiltin<"__builtin_altivec_vmulesb">,
  733. Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
  734. [IntrNoMem]>;
  735. def int_ppc_altivec_vmulesh : GCCBuiltin<"__builtin_altivec_vmulesh">,
  736. Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
  737. [IntrNoMem]>;
  738. def int_ppc_altivec_vmulesw : GCCBuiltin<"__builtin_altivec_vmulesw">,
  739. Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
  740. [IntrNoMem]>;
  741. def int_ppc_altivec_vmulesd : PowerPC_Vec_QDD_Intrinsic<"vmulesd">;
  742. def int_ppc_altivec_vmuleub : GCCBuiltin<"__builtin_altivec_vmuleub">,
  743. Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
  744. [IntrNoMem]>;
  745. def int_ppc_altivec_vmuleuh : GCCBuiltin<"__builtin_altivec_vmuleuh">,
  746. Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
  747. [IntrNoMem]>;
  748. def int_ppc_altivec_vmuleuw : GCCBuiltin<"__builtin_altivec_vmuleuw">,
  749. Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
  750. [IntrNoMem]>;
  751. def int_ppc_altivec_vmuleud : PowerPC_Vec_QDD_Intrinsic<"vmuleud">;
  752. def int_ppc_altivec_vmulosb : GCCBuiltin<"__builtin_altivec_vmulosb">,
  753. Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
  754. [IntrNoMem]>;
  755. def int_ppc_altivec_vmulosh : GCCBuiltin<"__builtin_altivec_vmulosh">,
  756. Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
  757. [IntrNoMem]>;
  758. def int_ppc_altivec_vmulosw : GCCBuiltin<"__builtin_altivec_vmulosw">,
  759. Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
  760. [IntrNoMem]>;
  761. def int_ppc_altivec_vmulosd : PowerPC_Vec_QDD_Intrinsic<"vmulosd">;
  762. def int_ppc_altivec_vmuloub : GCCBuiltin<"__builtin_altivec_vmuloub">,
  763. Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
  764. [IntrNoMem]>;
  765. def int_ppc_altivec_vmulouh : GCCBuiltin<"__builtin_altivec_vmulouh">,
  766. Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
  767. [IntrNoMem]>;
  768. def int_ppc_altivec_vmulouw : GCCBuiltin<"__builtin_altivec_vmulouw">,
  769. Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
  770. [IntrNoMem]>;
  771. def int_ppc_altivec_vmuloud : PowerPC_Vec_QDD_Intrinsic<"vmuloud">;
  772. // Vector Sum Instructions.
  773. def int_ppc_altivec_vsumsws : GCCBuiltin<"__builtin_altivec_vsumsws">,
  774. Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
  775. [IntrNoMem, IntrHasSideEffects]>;
  776. def int_ppc_altivec_vsum2sws : GCCBuiltin<"__builtin_altivec_vsum2sws">,
  777. Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
  778. [IntrNoMem, IntrHasSideEffects]>;
  779. def int_ppc_altivec_vsum4sbs : GCCBuiltin<"__builtin_altivec_vsum4sbs">,
  780. Intrinsic<[llvm_v4i32_ty], [llvm_v16i8_ty, llvm_v4i32_ty],
  781. [IntrNoMem, IntrHasSideEffects]>;
  782. def int_ppc_altivec_vsum4shs : GCCBuiltin<"__builtin_altivec_vsum4shs">,
  783. Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v4i32_ty],
  784. [IntrNoMem, IntrHasSideEffects]>;
  785. def int_ppc_altivec_vsum4ubs : GCCBuiltin<"__builtin_altivec_vsum4ubs">,
  786. Intrinsic<[llvm_v4i32_ty], [llvm_v16i8_ty, llvm_v4i32_ty],
  787. [IntrNoMem, IntrHasSideEffects]>;
  788. // Vector Sign Extension Instructions
  789. def int_ppc_altivec_vextsb2w : GCCBuiltin<"__builtin_altivec_vextsb2w">,
  790. Intrinsic<[llvm_v4i32_ty], [llvm_v16i8_ty], [IntrNoMem]>;
  791. def int_ppc_altivec_vextsb2d : GCCBuiltin<"__builtin_altivec_vextsb2d">,
  792. Intrinsic<[llvm_v2i64_ty], [llvm_v16i8_ty], [IntrNoMem]>;
  793. def int_ppc_altivec_vextsh2w : GCCBuiltin<"__builtin_altivec_vextsh2w">,
  794. Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty], [IntrNoMem]>;
  795. def int_ppc_altivec_vextsh2d : GCCBuiltin<"__builtin_altivec_vextsh2d">,
  796. Intrinsic<[llvm_v2i64_ty], [llvm_v8i16_ty], [IntrNoMem]>;
  797. def int_ppc_altivec_vextsw2d : GCCBuiltin<"__builtin_altivec_vextsw2d">,
  798. Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty], [IntrNoMem]>;
  799. def int_ppc_altivec_vextsd2q : GCCBuiltin<"__builtin_altivec_vextsd2q">,
  800. Intrinsic<[llvm_v1i128_ty], [llvm_v2i64_ty], [IntrNoMem]>;
  801. // Other multiplies.
  802. def int_ppc_altivec_vmladduhm : GCCBuiltin<"__builtin_altivec_vmladduhm">,
  803. Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty,
  804. llvm_v8i16_ty], [IntrNoMem]>;
  805. // Packs.
  806. def int_ppc_altivec_vpkpx : GCCBuiltin<"__builtin_altivec_vpkpx">,
  807. Intrinsic<[llvm_v8i16_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
  808. [IntrNoMem]>;
  809. def int_ppc_altivec_vpkshss : GCCBuiltin<"__builtin_altivec_vpkshss">,
  810. Intrinsic<[llvm_v16i8_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
  811. [IntrNoMem, IntrHasSideEffects]>;
  812. def int_ppc_altivec_vpkshus : GCCBuiltin<"__builtin_altivec_vpkshus">,
  813. Intrinsic<[llvm_v16i8_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
  814. [IntrNoMem, IntrHasSideEffects]>;
  815. def int_ppc_altivec_vpkswss : GCCBuiltin<"__builtin_altivec_vpkswss">,
  816. Intrinsic<[llvm_v8i16_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
  817. [IntrNoMem, IntrHasSideEffects]>;
  818. def int_ppc_altivec_vpkswus : GCCBuiltin<"__builtin_altivec_vpkswus">,
  819. Intrinsic<[llvm_v8i16_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
  820. [IntrNoMem, IntrHasSideEffects]>;
  821. def int_ppc_altivec_vpksdss : GCCBuiltin<"__builtin_altivec_vpksdss">,
  822. Intrinsic<[llvm_v4i32_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
  823. [IntrNoMem, IntrHasSideEffects]>;
  824. def int_ppc_altivec_vpksdus : GCCBuiltin<"__builtin_altivec_vpksdus">,
  825. Intrinsic<[llvm_v4i32_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
  826. [IntrNoMem, IntrHasSideEffects]>;
  827. // vpkuhum is lowered to a shuffle.
  828. def int_ppc_altivec_vpkuhus : GCCBuiltin<"__builtin_altivec_vpkuhus">,
  829. Intrinsic<[llvm_v16i8_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
  830. [IntrNoMem, IntrHasSideEffects]>;
  831. // vpkuwum is lowered to a shuffle.
  832. def int_ppc_altivec_vpkuwus : GCCBuiltin<"__builtin_altivec_vpkuwus">,
  833. Intrinsic<[llvm_v8i16_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
  834. [IntrNoMem, IntrHasSideEffects]>;
  835. // vpkudum is lowered to a shuffle.
  836. def int_ppc_altivec_vpkudus : GCCBuiltin<"__builtin_altivec_vpkudus">,
  837. Intrinsic<[llvm_v4i32_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
  838. [IntrNoMem, IntrHasSideEffects]>;
  839. // Unpacks.
  840. def int_ppc_altivec_vupkhpx : GCCBuiltin<"__builtin_altivec_vupkhpx">,
  841. Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty], [IntrNoMem]>;
  842. def int_ppc_altivec_vupkhsb : GCCBuiltin<"__builtin_altivec_vupkhsb">,
  843. Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty], [IntrNoMem]>;
  844. def int_ppc_altivec_vupkhsh : GCCBuiltin<"__builtin_altivec_vupkhsh">,
  845. Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty], [IntrNoMem]>;
  846. def int_ppc_altivec_vupkhsw : GCCBuiltin<"__builtin_altivec_vupkhsw">,
  847. Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty], [IntrNoMem]>;
  848. def int_ppc_altivec_vupklpx : GCCBuiltin<"__builtin_altivec_vupklpx">,
  849. Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty], [IntrNoMem]>;
  850. def int_ppc_altivec_vupklsb : GCCBuiltin<"__builtin_altivec_vupklsb">,
  851. Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty], [IntrNoMem]>;
  852. def int_ppc_altivec_vupklsh : GCCBuiltin<"__builtin_altivec_vupklsh">,
  853. Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty], [IntrNoMem]>;
  854. def int_ppc_altivec_vupklsw : GCCBuiltin<"__builtin_altivec_vupklsw">,
  855. Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty], [IntrNoMem]>;
  856. // FP <-> integer conversion.
  857. def int_ppc_altivec_vcfsx : GCCBuiltin<"__builtin_altivec_vcfsx">,
  858. Intrinsic<[llvm_v4f32_ty], [llvm_v4i32_ty, llvm_i32_ty],
  859. [IntrNoMem, ImmArg<ArgIndex<1>>]>;
  860. def int_ppc_altivec_vcfux : GCCBuiltin<"__builtin_altivec_vcfux">,
  861. Intrinsic<[llvm_v4f32_ty], [llvm_v4i32_ty, llvm_i32_ty],
  862. [IntrNoMem, ImmArg<ArgIndex<1>>]>;
  863. def int_ppc_altivec_vctsxs : GCCBuiltin<"__builtin_altivec_vctsxs">,
  864. Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_i32_ty],
  865. [IntrNoMem, ImmArg<ArgIndex<1>>]>;
  866. def int_ppc_altivec_vctuxs : GCCBuiltin<"__builtin_altivec_vctuxs">,
  867. Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_i32_ty],
  868. [IntrNoMem, ImmArg<ArgIndex<1>>]>;
  869. def int_ppc_altivec_vrfim : GCCBuiltin<"__builtin_altivec_vrfim">,
  870. Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
  871. def int_ppc_altivec_vrfin : GCCBuiltin<"__builtin_altivec_vrfin">,
  872. Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
  873. def int_ppc_altivec_vrfip : GCCBuiltin<"__builtin_altivec_vrfip">,
  874. Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
  875. def int_ppc_altivec_vrfiz : GCCBuiltin<"__builtin_altivec_vrfiz">,
  876. Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
  877. // Add Extended Quadword
  878. def int_ppc_altivec_vaddeuqm : GCCBuiltin<"__builtin_altivec_vaddeuqm">,
  879. Intrinsic<[llvm_v1i128_ty],
  880. [llvm_v1i128_ty, llvm_v1i128_ty, llvm_v1i128_ty],
  881. [IntrNoMem]>;
  882. def int_ppc_altivec_vaddecuq : GCCBuiltin<"__builtin_altivec_vaddecuq">,
  883. Intrinsic<[llvm_v1i128_ty],
  884. [llvm_v1i128_ty, llvm_v1i128_ty, llvm_v1i128_ty],
  885. [IntrNoMem]>;
  886. // Sub Extended Quadword
  887. def int_ppc_altivec_vsubeuqm : GCCBuiltin<"__builtin_altivec_vsubeuqm">,
  888. Intrinsic<[llvm_v1i128_ty],
  889. [llvm_v1i128_ty, llvm_v1i128_ty, llvm_v1i128_ty],
  890. [IntrNoMem]>;
  891. def int_ppc_altivec_vsubecuq : GCCBuiltin<"__builtin_altivec_vsubecuq">,
  892. Intrinsic<[llvm_v1i128_ty],
  893. [llvm_v1i128_ty, llvm_v1i128_ty, llvm_v1i128_ty],
  894. [IntrNoMem]>;
  895. // P10 Vector Count Leading / Trailing Zeroes under bit Mask Builtins.
  896. def int_ppc_altivec_vclzdm : GCCBuiltin<"__builtin_altivec_vclzdm">,
  897. Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
  898. [IntrNoMem]>;
  899. def int_ppc_altivec_vctzdm : GCCBuiltin<"__builtin_altivec_vctzdm">,
  900. Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty],
  901. [IntrNoMem]>;
  902. }
  903. def int_ppc_altivec_vsl : PowerPC_Vec_WWW_Intrinsic<"vsl">;
  904. def int_ppc_altivec_vslo : PowerPC_Vec_WWW_Intrinsic<"vslo">;
  905. def int_ppc_altivec_vslb : PowerPC_Vec_BBB_Intrinsic<"vslb">;
  906. def int_ppc_altivec_vslv : PowerPC_Vec_BBB_Intrinsic<"vslv">;
  907. def int_ppc_altivec_vsrv : PowerPC_Vec_BBB_Intrinsic<"vsrv">;
  908. def int_ppc_altivec_vslh : PowerPC_Vec_HHH_Intrinsic<"vslh">;
  909. def int_ppc_altivec_vslw : PowerPC_Vec_WWW_Intrinsic<"vslw">;
  910. // Right Shifts.
  911. def int_ppc_altivec_vsr : PowerPC_Vec_WWW_Intrinsic<"vsr">;
  912. def int_ppc_altivec_vsro : PowerPC_Vec_WWW_Intrinsic<"vsro">;
  913. def int_ppc_altivec_vsrb : PowerPC_Vec_BBB_Intrinsic<"vsrb">;
  914. def int_ppc_altivec_vsrh : PowerPC_Vec_HHH_Intrinsic<"vsrh">;
  915. def int_ppc_altivec_vsrw : PowerPC_Vec_WWW_Intrinsic<"vsrw">;
  916. def int_ppc_altivec_vsrab : PowerPC_Vec_BBB_Intrinsic<"vsrab">;
  917. def int_ppc_altivec_vsrah : PowerPC_Vec_HHH_Intrinsic<"vsrah">;
  918. def int_ppc_altivec_vsraw : PowerPC_Vec_WWW_Intrinsic<"vsraw">;
  919. // Rotates.
  920. def int_ppc_altivec_vrlb : PowerPC_Vec_BBB_Intrinsic<"vrlb">;
  921. def int_ppc_altivec_vrlh : PowerPC_Vec_HHH_Intrinsic<"vrlh">;
  922. def int_ppc_altivec_vrlw : PowerPC_Vec_WWW_Intrinsic<"vrlw">;
  923. def int_ppc_altivec_vrld : PowerPC_Vec_DDD_Intrinsic<"vrld">;
  924. let TargetPrefix = "ppc" in { // All PPC intrinsics start with "llvm.ppc.".
  925. // Miscellaneous.
  926. def int_ppc_altivec_lvsl :
  927. Intrinsic<[llvm_v16i8_ty], [llvm_ptr_ty], [IntrNoMem]>;
  928. def int_ppc_altivec_lvsr :
  929. Intrinsic<[llvm_v16i8_ty], [llvm_ptr_ty], [IntrNoMem]>;
  930. def int_ppc_altivec_vperm : GCCBuiltin<"__builtin_altivec_vperm_4si">,
  931. Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty,
  932. llvm_v4i32_ty, llvm_v16i8_ty], [IntrNoMem]>;
  933. def int_ppc_altivec_vsel : GCCBuiltin<"__builtin_altivec_vsel_4si">,
  934. Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty,
  935. llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
  936. def int_ppc_altivec_vgbbd : GCCBuiltin<"__builtin_altivec_vgbbd">,
  937. Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty], [IntrNoMem]>;
  938. def int_ppc_altivec_vbpermq : GCCBuiltin<"__builtin_altivec_vbpermq">,
  939. Intrinsic<[llvm_v2i64_ty], [llvm_v16i8_ty, llvm_v16i8_ty],
  940. [IntrNoMem]>;
  941. }
  942. def int_ppc_altivec_vexptefp : PowerPC_Vec_FF_Intrinsic<"vexptefp">;
  943. def int_ppc_altivec_vlogefp : PowerPC_Vec_FF_Intrinsic<"vlogefp">;
  944. def int_ppc_altivec_vrefp : PowerPC_Vec_FF_Intrinsic<"vrefp">;
  945. def int_ppc_altivec_vrsqrtefp : PowerPC_Vec_FF_Intrinsic<"vrsqrtefp">;
  946. // Power8 Intrinsics
  947. // Crypto
  948. let TargetPrefix = "ppc" in { // All PPC intrinsics start with "llvm.ppc.".
  949. def int_ppc_altivec_crypto_vsbox :
  950. GCCBuiltin<"__builtin_altivec_crypto_vsbox">,
  951. Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty], [IntrNoMem]>;
  952. def int_ppc_altivec_crypto_vpermxor :
  953. GCCBuiltin<"__builtin_altivec_crypto_vpermxor">,
  954. Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty,
  955. llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
  956. def int_ppc_altivec_crypto_vshasigmad :
  957. GCCBuiltin<"__builtin_altivec_crypto_vshasigmad">,
  958. Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty,
  959. llvm_i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>, ImmArg<ArgIndex<2>>]>;
  960. def int_ppc_altivec_crypto_vshasigmaw :
  961. GCCBuiltin<"__builtin_altivec_crypto_vshasigmaw">,
  962. Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty,
  963. llvm_i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>, ImmArg<ArgIndex<2>>]>;
  964. }
  965. def int_ppc_altivec_crypto_vcipher :
  966. PowerPC_Vec_DDD_Intrinsic<"crypto_vcipher">;
  967. def int_ppc_altivec_crypto_vcipherlast :
  968. PowerPC_Vec_DDD_Intrinsic<"crypto_vcipherlast">;
  969. def int_ppc_altivec_crypto_vncipher :
  970. PowerPC_Vec_DDD_Intrinsic<"crypto_vncipher">;
  971. def int_ppc_altivec_crypto_vncipherlast :
  972. PowerPC_Vec_DDD_Intrinsic<"crypto_vncipherlast">;
  973. def int_ppc_altivec_crypto_vpmsumb :
  974. PowerPC_Vec_BBB_Intrinsic<"crypto_vpmsumb">;
  975. def int_ppc_altivec_crypto_vpmsumh :
  976. PowerPC_Vec_HHH_Intrinsic<"crypto_vpmsumh">;
  977. def int_ppc_altivec_crypto_vpmsumw :
  978. PowerPC_Vec_WWW_Intrinsic<"crypto_vpmsumw">;
  979. def int_ppc_altivec_crypto_vpmsumd :
  980. PowerPC_Vec_DDD_Intrinsic<"crypto_vpmsumd">;
  981. // Absolute Difference intrinsics
  982. def int_ppc_altivec_vabsdub : PowerPC_Vec_BBB_Intrinsic<"vabsdub">;
  983. def int_ppc_altivec_vabsduh : PowerPC_Vec_HHH_Intrinsic<"vabsduh">;
  984. def int_ppc_altivec_vabsduw : PowerPC_Vec_WWW_Intrinsic<"vabsduw">;
  985. // Vector rotates
  986. def int_ppc_altivec_vrlwnm :
  987. PowerPC_Vec_Intrinsic<"vrlwnm", [llvm_v4i32_ty],
  988. [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
  989. def int_ppc_altivec_vrlwmi :
  990. PowerPC_Vec_Intrinsic<"vrlwmi", [llvm_v4i32_ty],
  991. [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
  992. [IntrNoMem]>;
  993. def int_ppc_altivec_vrldnm :
  994. PowerPC_Vec_Intrinsic<"vrldnm", [llvm_v2i64_ty],
  995. [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
  996. def int_ppc_altivec_vrldmi :
  997. PowerPC_Vec_Intrinsic<"vrldmi", [llvm_v2i64_ty],
  998. [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v2i64_ty],
  999. [IntrNoMem]>;
  1000. def int_ppc_altivec_vrlqnm :
  1001. PowerPC_Vec_Intrinsic<"vrlqnm", [llvm_v1i128_ty],
  1002. [llvm_v1i128_ty, llvm_v1i128_ty],
  1003. [IntrNoMem]>;
  1004. def int_ppc_altivec_vrlqmi :
  1005. PowerPC_Vec_Intrinsic<"vrlqmi", [llvm_v1i128_ty],
  1006. [llvm_v1i128_ty, llvm_v1i128_ty, llvm_v1i128_ty],
  1007. [IntrNoMem]>;
  1008. // Vector Divide Extended Intrinsics.
  1009. def int_ppc_altivec_vdivesw : PowerPC_Vec_WWW_Intrinsic<"vdivesw">;
  1010. def int_ppc_altivec_vdiveuw : PowerPC_Vec_WWW_Intrinsic<"vdiveuw">;
  1011. def int_ppc_altivec_vdivesd : PowerPC_Vec_DDD_Intrinsic<"vdivesd">;
  1012. def int_ppc_altivec_vdiveud : PowerPC_Vec_DDD_Intrinsic<"vdiveud">;
  1013. def int_ppc_altivec_vdivesq : PowerPC_Vec_QQQ_Intrinsic<"vdivesq">;
  1014. def int_ppc_altivec_vdiveuq : PowerPC_Vec_QQQ_Intrinsic<"vdiveuq">;
  1015. // Vector Multiply High Intrinsics.
  1016. def int_ppc_altivec_vmulhsw : PowerPC_Vec_WWW_Intrinsic<"vmulhsw">;
  1017. def int_ppc_altivec_vmulhuw : PowerPC_Vec_WWW_Intrinsic<"vmulhuw">;
  1018. def int_ppc_altivec_vmulhsd : PowerPC_Vec_DDD_Intrinsic<"vmulhsd">;
  1019. def int_ppc_altivec_vmulhud : PowerPC_Vec_DDD_Intrinsic<"vmulhud">;
  1020. //===----------------------------------------------------------------------===//
  1021. // PowerPC VSX Intrinsic Definitions.
  1022. let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.".
  1023. // Vector load.
  1024. def int_ppc_vsx_lxvw4x :
  1025. Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>;
  1026. def int_ppc_vsx_lxvd2x :
  1027. Intrinsic<[llvm_v2f64_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>;
  1028. def int_ppc_vsx_lxvw4x_be :
  1029. Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>;
  1030. def int_ppc_vsx_lxvd2x_be :
  1031. Intrinsic<[llvm_v2f64_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>;
  1032. def int_ppc_vsx_lxvl :
  1033. Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty, llvm_i64_ty], [IntrReadMem,
  1034. IntrArgMemOnly]>;
  1035. def int_ppc_vsx_lxvll :
  1036. Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty, llvm_i64_ty], [IntrReadMem,
  1037. IntrArgMemOnly]>;
  1038. def int_ppc_vsx_lxvp :
  1039. Intrinsic<[llvm_v256i1_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>;
  1040. // Vector store.
  1041. def int_ppc_vsx_stxvw4x : Intrinsic<[], [llvm_v4i32_ty, llvm_ptr_ty],
  1042. [IntrWriteMem, IntrArgMemOnly]>;
  1043. def int_ppc_vsx_stxvd2x : Intrinsic<[], [llvm_v2f64_ty, llvm_ptr_ty],
  1044. [IntrWriteMem, IntrArgMemOnly]>;
  1045. def int_ppc_vsx_stxvw4x_be : Intrinsic<[], [llvm_v4i32_ty, llvm_ptr_ty],
  1046. [IntrWriteMem, IntrArgMemOnly]>;
  1047. def int_ppc_vsx_stxvd2x_be : Intrinsic<[], [llvm_v2f64_ty, llvm_ptr_ty],
  1048. [IntrWriteMem, IntrArgMemOnly]>;
  1049. def int_ppc_vsx_stxvl :
  1050. Intrinsic<[], [llvm_v4i32_ty, llvm_ptr_ty, llvm_i64_ty],
  1051. [IntrWriteMem, IntrArgMemOnly]>;
  1052. def int_ppc_vsx_stxvll :
  1053. Intrinsic<[], [llvm_v4i32_ty, llvm_ptr_ty, llvm_i64_ty],
  1054. [IntrWriteMem, IntrArgMemOnly]>;
  1055. def int_ppc_vsx_stxvp :
  1056. Intrinsic<[], [llvm_v256i1_ty, llvm_ptr_ty], [IntrWriteMem,
  1057. IntrArgMemOnly]>;
  1058. // Vector and scalar maximum.
  1059. def int_ppc_vsx_xvmaxdp : PowerPC_VSX_Vec_DDD_Intrinsic<"xvmaxdp">;
  1060. def int_ppc_vsx_xvmaxsp : PowerPC_VSX_Vec_FFF_Intrinsic<"xvmaxsp">;
  1061. def int_ppc_vsx_xsmaxdp : PowerPC_VSX_Sca_DDD_Intrinsic<"xsmaxdp">;
  1062. // Vector and scalar minimum.
  1063. def int_ppc_vsx_xvmindp : PowerPC_VSX_Vec_DDD_Intrinsic<"xvmindp">;
  1064. def int_ppc_vsx_xvminsp : PowerPC_VSX_Vec_FFF_Intrinsic<"xvminsp">;
  1065. def int_ppc_vsx_xsmindp : PowerPC_VSX_Sca_DDD_Intrinsic<"xsmindp">;
  1066. // Vector divide.
  1067. def int_ppc_vsx_xvdivdp : PowerPC_VSX_Vec_DDD_Intrinsic<"xvdivdp">;
  1068. def int_ppc_vsx_xvdivsp : PowerPC_VSX_Vec_FFF_Intrinsic<"xvdivsp">;
  1069. // Vector round-to-infinity (ceil)
  1070. def int_ppc_vsx_xvrspip :
  1071. Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
  1072. def int_ppc_vsx_xvrdpip :
  1073. Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], [IntrNoMem]>;
  1074. // Vector reciprocal estimate
  1075. def int_ppc_vsx_xvresp : GCCBuiltin<"__builtin_vsx_xvresp">,
  1076. Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
  1077. def int_ppc_vsx_xvredp : GCCBuiltin<"__builtin_vsx_xvredp">,
  1078. Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], [IntrNoMem]>;
  1079. // Vector rsqrte
  1080. def int_ppc_vsx_xvrsqrtesp : GCCBuiltin<"__builtin_vsx_xvrsqrtesp">,
  1081. Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
  1082. def int_ppc_vsx_xvrsqrtedp : GCCBuiltin<"__builtin_vsx_xvrsqrtedp">,
  1083. Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], [IntrNoMem]>;
  1084. // Vector compare
  1085. def int_ppc_vsx_xvcmpeqdp :
  1086. PowerPC_VSX_Intrinsic<"xvcmpeqdp", [llvm_v2i64_ty],
  1087. [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
  1088. def int_ppc_vsx_xvcmpeqdp_p : GCCBuiltin<"__builtin_vsx_xvcmpeqdp_p">,
  1089. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v2f64_ty,llvm_v2f64_ty],
  1090. [IntrNoMem]>;
  1091. def int_ppc_vsx_xvcmpeqsp :
  1092. PowerPC_VSX_Intrinsic<"xvcmpeqsp", [llvm_v4i32_ty],
  1093. [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
  1094. def int_ppc_vsx_xvcmpeqsp_p : GCCBuiltin<"__builtin_vsx_xvcmpeqsp_p">,
  1095. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4f32_ty,llvm_v4f32_ty],
  1096. [IntrNoMem]>;
  1097. def int_ppc_vsx_xvcmpgedp :
  1098. PowerPC_VSX_Intrinsic<"xvcmpgedp", [llvm_v2i64_ty],
  1099. [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
  1100. def int_ppc_vsx_xvcmpgedp_p : GCCBuiltin<"__builtin_vsx_xvcmpgedp_p">,
  1101. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v2f64_ty,llvm_v2f64_ty],
  1102. [IntrNoMem]>;
  1103. def int_ppc_vsx_xvcmpgesp :
  1104. PowerPC_VSX_Intrinsic<"xvcmpgesp", [llvm_v4i32_ty],
  1105. [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
  1106. def int_ppc_vsx_xvcmpgesp_p : GCCBuiltin<"__builtin_vsx_xvcmpgesp_p">,
  1107. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4f32_ty,llvm_v4f32_ty],
  1108. [IntrNoMem]>;
  1109. def int_ppc_vsx_xvcmpgtdp :
  1110. PowerPC_VSX_Intrinsic<"xvcmpgtdp", [llvm_v2i64_ty],
  1111. [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
  1112. def int_ppc_vsx_xvcmpgtdp_p : GCCBuiltin<"__builtin_vsx_xvcmpgtdp_p">,
  1113. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v2f64_ty,llvm_v2f64_ty],
  1114. [IntrNoMem]>;
  1115. def int_ppc_vsx_xvcmpgtsp :
  1116. PowerPC_VSX_Intrinsic<"xvcmpgtsp", [llvm_v4i32_ty],
  1117. [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
  1118. def int_ppc_vsx_xvcmpgtsp_p : GCCBuiltin<"__builtin_vsx_xvcmpgtsp_p">,
  1119. Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4f32_ty,llvm_v4f32_ty],
  1120. [IntrNoMem]>;
  1121. def int_ppc_vsx_xxleqv :
  1122. PowerPC_VSX_Intrinsic<"xxleqv", [llvm_v4i32_ty],
  1123. [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>;
  1124. def int_ppc_vsx_xviexpdp :
  1125. PowerPC_VSX_Intrinsic<"xviexpdp",[llvm_v2f64_ty],
  1126. [llvm_v2i64_ty, llvm_v2i64_ty],[IntrNoMem]>;
  1127. def int_ppc_vsx_xviexpsp :
  1128. PowerPC_VSX_Intrinsic<"xviexpsp",[llvm_v4f32_ty],
  1129. [llvm_v4i32_ty, llvm_v4i32_ty],[IntrNoMem]>;
  1130. def int_ppc_vsx_xvcvdpsxws :
  1131. PowerPC_VSX_Intrinsic<"xvcvdpsxws", [llvm_v4i32_ty],
  1132. [llvm_v2f64_ty], [IntrNoMem]>;
  1133. def int_ppc_vsx_xvcvdpuxws :
  1134. PowerPC_VSX_Intrinsic<"xvcvdpuxws", [llvm_v4i32_ty],
  1135. [llvm_v2f64_ty], [IntrNoMem]>;
  1136. def int_ppc_vsx_xvcvsxwdp :
  1137. PowerPC_VSX_Intrinsic<"xvcvsxwdp", [llvm_v2f64_ty],
  1138. [llvm_v4i32_ty], [IntrNoMem]>;
  1139. def int_ppc_vsx_xvcvuxwdp :
  1140. PowerPC_VSX_Intrinsic<"xvcvuxwdp", [llvm_v2f64_ty],
  1141. [llvm_v4i32_ty], [IntrNoMem]>;
  1142. def int_ppc_vsx_xvcvspdp :
  1143. PowerPC_VSX_Intrinsic<"xvcvspdp", [llvm_v2f64_ty],
  1144. [llvm_v4f32_ty], [IntrNoMem]>;
  1145. def int_ppc_vsx_xvcvsxdsp :
  1146. PowerPC_VSX_Intrinsic<"xvcvsxdsp", [llvm_v4f32_ty],
  1147. [llvm_v2i64_ty], [IntrNoMem]>;
  1148. def int_ppc_vsx_xvcvuxdsp :
  1149. PowerPC_VSX_Intrinsic<"xvcvuxdsp", [llvm_v4f32_ty],
  1150. [llvm_v2i64_ty], [IntrNoMem]>;
  1151. def int_ppc_vsx_xvcvdpsp :
  1152. PowerPC_VSX_Intrinsic<"xvcvdpsp", [llvm_v4f32_ty],
  1153. [llvm_v2f64_ty], [IntrNoMem]>;
  1154. def int_ppc_vsx_xvcvsphp :
  1155. PowerPC_VSX_Intrinsic<"xvcvsphp", [llvm_v4f32_ty],
  1156. [llvm_v4f32_ty], [IntrNoMem]>;
  1157. def int_ppc_vsx_xvxexpdp :
  1158. PowerPC_VSX_Intrinsic<"xvxexpdp", [llvm_v2i64_ty],
  1159. [llvm_v2f64_ty], [IntrNoMem]>;
  1160. def int_ppc_vsx_xvxexpsp :
  1161. PowerPC_VSX_Intrinsic<"xvxexpsp", [llvm_v4i32_ty],
  1162. [llvm_v4f32_ty], [IntrNoMem]>;
  1163. def int_ppc_vsx_xvxsigdp :
  1164. PowerPC_VSX_Intrinsic<"xvxsigdp", [llvm_v2i64_ty],
  1165. [llvm_v2f64_ty], [IntrNoMem]>;
  1166. def int_ppc_vsx_xvxsigsp :
  1167. PowerPC_VSX_Intrinsic<"xvxsigsp", [llvm_v4i32_ty],
  1168. [llvm_v4f32_ty], [IntrNoMem]>;
  1169. def int_ppc_vsx_xvtstdcdp :
  1170. PowerPC_VSX_Intrinsic<"xvtstdcdp", [llvm_v2i64_ty],
  1171. [llvm_v2f64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
  1172. def int_ppc_vsx_xvtstdcsp :
  1173. PowerPC_VSX_Intrinsic<"xvtstdcsp", [llvm_v4i32_ty],
  1174. [llvm_v4f32_ty,llvm_i32_ty], [IntrNoMem, ImmArg<ArgIndex<1>>]>;
  1175. def int_ppc_vsx_xvcvhpsp :
  1176. PowerPC_VSX_Intrinsic<"xvcvhpsp", [llvm_v4f32_ty],
  1177. [llvm_v8i16_ty],[IntrNoMem]>;
  1178. def int_ppc_vsx_xvcvspbf16 :
  1179. PowerPC_VSX_Intrinsic<"xvcvspbf16", [llvm_v16i8_ty],
  1180. [llvm_v16i8_ty], [IntrNoMem]>;
  1181. def int_ppc_vsx_xvcvbf16spn :
  1182. PowerPC_VSX_Intrinsic<"xvcvbf16spn", [llvm_v16i8_ty],
  1183. [llvm_v16i8_ty], [IntrNoMem]>;
  1184. def int_ppc_vsx_xxextractuw :
  1185. PowerPC_VSX_Intrinsic<"xxextractuw",[llvm_v2i64_ty],
  1186. [llvm_v2i64_ty,llvm_i32_ty], [IntrNoMem]>;
  1187. def int_ppc_vsx_xxinsertw :
  1188. PowerPC_VSX_Intrinsic<"xxinsertw",[llvm_v4i32_ty],
  1189. [llvm_v4i32_ty,llvm_v2i64_ty,llvm_i32_ty],
  1190. [IntrNoMem]>;
  1191. def int_ppc_vsx_xvtlsbb :
  1192. PowerPC_VSX_Intrinsic<"xvtlsbb", [llvm_i32_ty],
  1193. [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>;
  1194. def int_ppc_vsx_xvtdivdp :
  1195. PowerPC_VSX_Intrinsic<"xvtdivdp", [llvm_i32_ty],
  1196. [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>;
  1197. def int_ppc_vsx_xvtdivsp :
  1198. PowerPC_VSX_Intrinsic<"xvtdivsp", [llvm_i32_ty],
  1199. [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>;
  1200. def int_ppc_vsx_xvtsqrtdp :
  1201. PowerPC_VSX_Intrinsic<"xvtsqrtdp", [llvm_i32_ty], [llvm_v2f64_ty], [IntrNoMem]>;
  1202. def int_ppc_vsx_xvtsqrtsp :
  1203. PowerPC_VSX_Intrinsic<"xvtsqrtsp", [llvm_i32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
  1204. def int_ppc_vsx_xxeval :
  1205. PowerPC_VSX_Intrinsic<"xxeval", [llvm_v2i64_ty],
  1206. [llvm_v2i64_ty, llvm_v2i64_ty,
  1207. llvm_v2i64_ty, llvm_i32_ty],
  1208. [IntrNoMem, ImmArg<ArgIndex<3>>]>;
  1209. def int_ppc_vsx_xxgenpcvbm :
  1210. PowerPC_VSX_Intrinsic<"xxgenpcvbm", [llvm_v16i8_ty],
  1211. [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>;
  1212. def int_ppc_vsx_xxgenpcvhm :
  1213. PowerPC_VSX_Intrinsic<"xxgenpcvhm", [llvm_v8i16_ty],
  1214. [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>;
  1215. def int_ppc_vsx_xxgenpcvwm :
  1216. PowerPC_VSX_Intrinsic<"xxgenpcvwm", [llvm_v4i32_ty],
  1217. [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>;
  1218. def int_ppc_vsx_xxgenpcvdm :
  1219. PowerPC_VSX_Intrinsic<"xxgenpcvdm", [llvm_v2i64_ty],
  1220. [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>;
  1221. // P10 VSX Vector permute extended.
  1222. def int_ppc_vsx_xxpermx :
  1223. GCCBuiltin<"__builtin_vsx_xxpermx">,
  1224. Intrinsic<[llvm_v16i8_ty],
  1225. [llvm_v16i8_ty,llvm_v16i8_ty,llvm_v16i8_ty,llvm_i32_ty],
  1226. [IntrNoMem, ImmArg<ArgIndex<3>>]>;
  1227. // P10 VSX Vector Blend Variable.
  1228. def int_ppc_vsx_xxblendvb: GCCBuiltin<"__builtin_vsx_xxblendvb">,
  1229. Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty],
  1230. [IntrNoMem]>;
  1231. def int_ppc_vsx_xxblendvh: GCCBuiltin<"__builtin_vsx_xxblendvh">,
  1232. Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty,llvm_v8i16_ty],
  1233. [IntrNoMem]>;
  1234. def int_ppc_vsx_xxblendvw: GCCBuiltin<"__builtin_vsx_xxblendvw">,
  1235. Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
  1236. [IntrNoMem]>;
  1237. def int_ppc_vsx_xxblendvd: GCCBuiltin<"__builtin_vsx_xxblendvd">,
  1238. Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v2i64_ty],
  1239. [IntrNoMem]>;
  1240. }
  1241. //===----------------------------------------------------------------------===//
  1242. // PowerPC HTM Intrinsic Definitions.
  1243. let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.".
  1244. def int_ppc_tbegin : GCCBuiltin<"__builtin_tbegin">,
  1245. Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [ImmArg<ArgIndex<0>>]>;
  1246. def int_ppc_tend : GCCBuiltin<"__builtin_tend">,
  1247. Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [ImmArg<ArgIndex<0>>]>;
  1248. def int_ppc_tabort : GCCBuiltin<"__builtin_tabort">,
  1249. Intrinsic<[llvm_i32_ty], [llvm_i32_ty], []>;
  1250. def int_ppc_tabortwc : GCCBuiltin<"__builtin_tabortwc">,
  1251. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], []>;
  1252. def int_ppc_tabortwci : GCCBuiltin<"__builtin_tabortwci">,
  1253. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], []>;
  1254. def int_ppc_tabortdc : GCCBuiltin<"__builtin_tabortdc">,
  1255. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], []>;
  1256. def int_ppc_tabortdci : GCCBuiltin<"__builtin_tabortdci">,
  1257. Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], []>;
  1258. def int_ppc_tcheck : GCCBuiltin<"__builtin_tcheck">,
  1259. Intrinsic<[llvm_i32_ty], [], []>;
  1260. def int_ppc_treclaim : GCCBuiltin<"__builtin_treclaim">,
  1261. Intrinsic<[llvm_i32_ty], [llvm_i32_ty], []>;
  1262. def int_ppc_trechkpt : GCCBuiltin<"__builtin_trechkpt">,
  1263. Intrinsic<[llvm_i32_ty], [], []>;
  1264. def int_ppc_tsr : GCCBuiltin<"__builtin_tsr">,
  1265. Intrinsic<[llvm_i32_ty], [llvm_i32_ty], []>;
  1266. def int_ppc_get_texasr : GCCBuiltin<"__builtin_get_texasr">,
  1267. Intrinsic<[llvm_i64_ty], [], []>;
  1268. def int_ppc_get_texasru : GCCBuiltin<"__builtin_get_texasru">,
  1269. Intrinsic<[llvm_i64_ty], [], []>;
  1270. def int_ppc_get_tfhar : GCCBuiltin<"__builtin_get_tfhar">,
  1271. Intrinsic<[llvm_i64_ty], [], []>;
  1272. def int_ppc_get_tfiar : GCCBuiltin<"__builtin_get_tfiar">,
  1273. Intrinsic<[llvm_i64_ty], [], []>;
  1274. def int_ppc_set_texasr : GCCBuiltin<"__builtin_set_texasr">,
  1275. Intrinsic<[], [llvm_i64_ty], []>;
  1276. def int_ppc_set_texasru : GCCBuiltin<"__builtin_set_texasru">,
  1277. Intrinsic<[], [llvm_i64_ty], []>;
  1278. def int_ppc_set_tfhar : GCCBuiltin<"__builtin_set_tfhar">,
  1279. Intrinsic<[], [llvm_i64_ty], []>;
  1280. def int_ppc_set_tfiar : GCCBuiltin<"__builtin_set_tfiar">,
  1281. Intrinsic<[], [llvm_i64_ty], []>;
  1282. // Extended mnemonics
  1283. def int_ppc_tendall : GCCBuiltin<"__builtin_tendall">,
  1284. Intrinsic<[llvm_i32_ty], [], []>;
  1285. def int_ppc_tresume : GCCBuiltin<"__builtin_tresume">,
  1286. Intrinsic<[llvm_i32_ty], [], []>;
  1287. def int_ppc_tsuspend : GCCBuiltin<"__builtin_tsuspend">,
  1288. Intrinsic<[llvm_i32_ty], [], []>;
  1289. def int_ppc_ttest : GCCBuiltin<"__builtin_ttest">,
  1290. Intrinsic<[llvm_i64_ty], [], []>;
  1291. def int_ppc_cfence : Intrinsic<[], [llvm_anyint_ty], []>;
  1292. // PowerPC set FPSCR Intrinsic Definitions.
  1293. def int_ppc_setrnd : GCCBuiltin<"__builtin_setrnd">,
  1294. Intrinsic<[llvm_double_ty], [llvm_i32_ty], []>;
  1295. }
  1296. let TargetPrefix = "ppc" in {
  1297. def int_ppc_vsx_assemble_pair :
  1298. Intrinsic<[llvm_v256i1_ty],
  1299. [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
  1300. def int_ppc_vsx_disassemble_pair :
  1301. Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty],
  1302. [llvm_v256i1_ty], [IntrNoMem]>;
  1303. def int_ppc_mma_assemble_acc :
  1304. Intrinsic<[llvm_v512i1_ty],
  1305. [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty],
  1306. [IntrNoMem]>;
  1307. def int_ppc_mma_disassemble_acc :
  1308. Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty],
  1309. [llvm_v512i1_ty], [IntrNoMem]>;
  1310. def int_ppc_mma_xxmtacc :
  1311. Intrinsic<[llvm_v512i1_ty], [llvm_v512i1_ty], [IntrNoMem]>;
  1312. def int_ppc_mma_xxmfacc :
  1313. Intrinsic<[llvm_v512i1_ty], [llvm_v512i1_ty], [IntrNoMem]>;
  1314. def int_ppc_mma_xxsetaccz :
  1315. Intrinsic<[llvm_v512i1_ty], [], [IntrNoMem]>;
  1316. // MMA Reduced-Precision: Outer Product Intrinsic Definitions.
  1317. defm int_ppc_mma_xvi4ger8 :
  1318. PowerPC_MMA_ACC_PP_Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty]>;
  1319. defm int_ppc_mma_pmxvi4ger8 :
  1320. PowerPC_MMA_ACC_PP_Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty,
  1321. llvm_i32_ty, llvm_i32_ty]>;
  1322. defm int_ppc_mma_xvi8ger4 :
  1323. PowerPC_MMA_ACC_PP_Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty]>;
  1324. defm int_ppc_mma_pmxvi8ger4 :
  1325. PowerPC_MMA_ACC_PP_Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty,
  1326. llvm_i32_ty, llvm_i32_ty]>;
  1327. defm int_ppc_mma_xvi16ger2s :
  1328. PowerPC_MMA_ACC_PP_Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty]>;
  1329. defm int_ppc_mma_pmxvi16ger2s :
  1330. PowerPC_MMA_ACC_PP_Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty,
  1331. llvm_i32_ty, llvm_i32_ty]>;
  1332. defm int_ppc_mma_xvf16ger2 :
  1333. PowerPC_MMA_ACC_Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty]>;
  1334. defm int_ppc_mma_pmxvf16ger2 :
  1335. PowerPC_MMA_ACC_Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty,
  1336. llvm_i32_ty, llvm_i32_ty]>;
  1337. defm int_ppc_mma_xvf32ger :
  1338. PowerPC_MMA_ACC_Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty]>;
  1339. defm int_ppc_mma_pmxvf32ger :
  1340. PowerPC_MMA_ACC_Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty,
  1341. llvm_i32_ty]>;
  1342. defm int_ppc_mma_xvf64ger :
  1343. PowerPC_MMA_ACC_Intrinsic<[llvm_v256i1_ty, llvm_v16i8_ty]>;
  1344. defm int_ppc_mma_pmxvf64ger :
  1345. PowerPC_MMA_ACC_Intrinsic<[llvm_v256i1_ty, llvm_v16i8_ty, llvm_i32_ty,
  1346. llvm_i32_ty]>;
  1347. // MMA Reduced-Precision: bfloat16 Outer Product Intrinsic Definitions.
  1348. defm int_ppc_mma_xvbf16ger2 :
  1349. PowerPC_MMA_ACC_Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty]>;
  1350. defm int_ppc_mma_pmxvbf16ger2 :
  1351. PowerPC_MMA_ACC_Intrinsic<
  1352. [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty]>;
  1353. // MMA Reduced-Precision: Missing Integer-based Outer Product Operations.
  1354. defm int_ppc_mma_xvi16ger2 :
  1355. PowerPC_MMA_ACC_PP_Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty]>;
  1356. defm int_ppc_mma_pmxvi16ger2 :
  1357. PowerPC_MMA_ACC_PP_Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty,
  1358. llvm_i32_ty, llvm_i32_ty]>;
  1359. def int_ppc_mma_xvi8ger4spp :
  1360. Intrinsic<[llvm_v512i1_ty],
  1361. [llvm_v512i1_ty, llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>;
  1362. def int_ppc_mma_pmxvi8ger4spp :
  1363. Intrinsic<[llvm_v512i1_ty],
  1364. [llvm_v512i1_ty, llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty,
  1365. llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
  1366. }