RISCVScheduleV.td 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925
  1. //===-- RISCVScheduleV.td - RISCV Scheduling Definitions V -*- 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. /// Define scheduler resources associated with def operands.
  10. defvar UpperBoundLMUL = "UpperBound";
  11. defvar SchedMxList = ["UpperBound", "M1", "M2", "M4", "M8", "MF2", "MF4", "MF8"];
  12. // Used for widening and narrowing instructions as it doesn't contain M8.
  13. defvar SchedMxListW = ["UpperBound", "MF8", "MF4", "MF2", "M1", "M2", "M4"];
  14. defvar SchedMxListFW = ["UpperBound", "MF4", "MF2", "M1", "M2", "M4"];
  15. // Creates SchedWrite for each (name, LMUL) pair for LMUL in SchedMxList
  16. multiclass LMULSchedWrites<string name> {
  17. foreach mx = SchedMxList in {
  18. def name # "_" # mx : SchedWrite;
  19. }
  20. }
  21. // Creates SchedWrite for each (name, LMUL) pair for LMUL in SchedMxListW
  22. multiclass LMULSchedWritesW<string name> {
  23. foreach mx = SchedMxListW in {
  24. def name # "_" # mx : SchedWrite;
  25. }
  26. }
  27. // Creates SchedWrite for each (name, LMUL) pair for LMUL in SchedMxListFW
  28. multiclass LMULSchedWritesFW<string name> {
  29. foreach mx = SchedMxListFW in {
  30. def name # "_" # mx : SchedWrite;
  31. }
  32. }
  33. // Creates SchedRead for each (name, LMUL) pair for LMUL in SchedMxList
  34. multiclass LMULSchedReads<string name> {
  35. foreach mx = SchedMxList in {
  36. def name # "_" # mx : SchedRead;
  37. }
  38. }
  39. // Creates SchedRead for each (name, LMUL) pair for LMUL in SchedMxListW
  40. multiclass LMULSchedReadsW<string name> {
  41. foreach mx = SchedMxListW in {
  42. def name # "_" # mx : SchedRead;
  43. }
  44. }
  45. // Creates SchedRead for each (name, LMUL) pair for LMUL in SchedMxListFW
  46. multiclass LMULSchedReadsFW<string name> {
  47. foreach mx = SchedMxListFW in {
  48. def name # "_" # mx : SchedRead;
  49. }
  50. }
  51. // Creates WriteRes for each (name, LMUL, resources) tuple for LMUL
  52. // in SchedMxList
  53. multiclass LMULWriteRes<string name, list<ProcResourceKind> resources> {
  54. foreach mx = SchedMxList in {
  55. def : WriteRes<!cast<SchedWrite>(name # "_" # mx), resources>;
  56. }
  57. }
  58. // Creates WriteRes for each (name, LMUL, resources) tuple for LMUL
  59. // in SchedMxListW
  60. multiclass LMULWriteResW<string name, list<ProcResourceKind> resources> {
  61. foreach mx = SchedMxListW in {
  62. def : WriteRes<!cast<SchedWrite>(name # "_" # mx), resources>;
  63. }
  64. }
  65. // Creates WriteRes for each (name, LMUL, resources) tuple for LMUL
  66. // in SchedMxListFW
  67. multiclass LMULWriteResFW<string name, list<ProcResourceKind> resources> {
  68. foreach mx = SchedMxListFW in {
  69. def : WriteRes<!cast<SchedWrite>(name # "_" # mx), resources>;
  70. }
  71. }
  72. // Creates ReadAdvance for each (name, LMUL, val) tuple for LMUL
  73. // in SchedMxList
  74. multiclass LMULReadAdvance<string name, int val, list<SchedWrite> writes = []> {
  75. foreach mx = SchedMxList in {
  76. def : ReadAdvance<!cast<SchedRead>(name # "_" # mx), val, writes>;
  77. }
  78. }
  79. // Creates ReadAdvance for each (name, LMUL, val) tuple for LMUL
  80. // in SchedMxListW
  81. multiclass LMULReadAdvanceW<string name, int val, list<SchedWrite> writes = []> {
  82. foreach mx = SchedMxListW in {
  83. def : ReadAdvance<!cast<SchedRead>(name # "_" # mx), val, writes>;
  84. }
  85. }
  86. // Creates ReadAdvance for each (name, LMUL, val) tuple for LMUL
  87. // in SchedMxListFW
  88. multiclass LMULReadAdvanceFW<string name, int val, list<SchedWrite> writes = []> {
  89. foreach mx = SchedMxListFW in {
  90. def : ReadAdvance<!cast<SchedRead>(name # "_" # mx), val, writes>;
  91. }
  92. }
  93. // 3.6 Vector Byte Length vlenb
  94. def WriteRdVLENB : SchedWrite;
  95. // 6. Configuration-Setting Instructions
  96. def WriteVSETVLI : SchedWrite;
  97. def WriteVSETIVLI : SchedWrite;
  98. def WriteVSETVL : SchedWrite;
  99. // 7. Vector Loads and Stores
  100. // 7.4. Vector Unit-Stride Instructions
  101. defm "" : LMULSchedWrites<"WriteVLDE">;
  102. defm "" : LMULSchedWrites<"WriteVSTE">;
  103. // 7.4.1. Vector Unit-Strided Mask
  104. defm "" : LMULSchedWrites<"WriteVLDM">;
  105. defm "" : LMULSchedWrites<"WriteVSTM">;
  106. // 7.5. Vector Strided Instructions
  107. defm "" : LMULSchedWrites<"WriteVLDS8">;
  108. defm "" : LMULSchedWrites<"WriteVLDS16">;
  109. defm "" : LMULSchedWrites<"WriteVLDS32">;
  110. defm "" : LMULSchedWrites<"WriteVLDS64">;
  111. defm "" : LMULSchedWrites<"WriteVSTS8">;
  112. defm "" : LMULSchedWrites<"WriteVSTS16">;
  113. defm "" : LMULSchedWrites<"WriteVSTS32">;
  114. defm "" : LMULSchedWrites<"WriteVSTS64">;
  115. // 7.6. Vector Indexed Instructions
  116. defm "" : LMULSchedWrites<"WriteVLDUX8">;
  117. defm "" : LMULSchedWrites<"WriteVLDUX16">;
  118. defm "" : LMULSchedWrites<"WriteVLDUX32">;
  119. defm "" : LMULSchedWrites<"WriteVLDUX64">;
  120. defm "" : LMULSchedWrites<"WriteVLDOX8">;
  121. defm "" : LMULSchedWrites<"WriteVLDOX16">;
  122. defm "" : LMULSchedWrites<"WriteVLDOX32">;
  123. defm "" : LMULSchedWrites<"WriteVLDOX64">;
  124. defm "" : LMULSchedWrites<"WriteVSTUX8">;
  125. defm "" : LMULSchedWrites<"WriteVSTUX16">;
  126. defm "" : LMULSchedWrites<"WriteVSTUX32">;
  127. defm "" : LMULSchedWrites<"WriteVSTUX64">;
  128. defm "" : LMULSchedWrites<"WriteVSTOX8">;
  129. defm "" : LMULSchedWrites<"WriteVSTOX16">;
  130. defm "" : LMULSchedWrites<"WriteVSTOX32">;
  131. defm "" : LMULSchedWrites<"WriteVSTOX64">;
  132. // 7.7. Vector Unit-stride Fault-Only-First Loads
  133. defm "" : LMULSchedWrites<"WriteVLDFF">;
  134. // 7.8. Vector Segment Instructions
  135. foreach nf=2-8 in {
  136. foreach eew = [8, 16, 32, 64] in {
  137. defm "" : LMULSchedWrites<"WriteVLSEG" # nf # e # eew>;
  138. defm "" : LMULSchedWrites<"WriteVSSEG" # nf # e # eew>;
  139. defm "" : LMULSchedWrites<"WriteVLSEGFF" # nf # e # eew>;
  140. defm "" : LMULSchedWrites<"WriteVLSSEG" # nf # e # eew>;
  141. defm "" : LMULSchedWrites<"WriteVSSSEG" # nf # e # eew>;
  142. defm "" : LMULSchedWrites<"WriteVLUXSEG" # nf # e # eew>;
  143. defm "" : LMULSchedWrites<"WriteVLOXSEG" # nf # e # eew>;
  144. defm "" : LMULSchedWrites<"WriteVSUXSEG" # nf # e # eew>;
  145. defm "" : LMULSchedWrites<"WriteVSOXSEG" # nf # e # eew>;
  146. }
  147. }
  148. // 7.9. Vector Whole Register Instructions
  149. def WriteVLD1R : SchedWrite;
  150. def WriteVLD2R : SchedWrite;
  151. def WriteVLD4R : SchedWrite;
  152. def WriteVLD8R : SchedWrite;
  153. def WriteVST1R : SchedWrite;
  154. def WriteVST2R : SchedWrite;
  155. def WriteVST4R : SchedWrite;
  156. def WriteVST8R : SchedWrite;
  157. // 11. Vector Integer Arithmetic Instructions
  158. // 11.1. Vector Single-Width Integer Add and Subtract
  159. // 11.5. Vector Bitwise Logical Instructions
  160. defm "" : LMULSchedWrites<"WriteVIALUV">;
  161. defm "" : LMULSchedWrites<"WriteVIALUX">;
  162. defm "" : LMULSchedWrites<"WriteVIALUI">;
  163. // 11.2. Vector Widening Integer Add/Subtract
  164. defm "" : LMULSchedWritesW<"WriteVIWALUV">;
  165. defm "" : LMULSchedWritesW<"WriteVIWALUX">;
  166. defm "" : LMULSchedWritesW<"WriteVIWALUI">;
  167. // 11.3. Vector Integer Extension
  168. defm "" : LMULSchedWrites<"WriteVExtV">;
  169. // 11.4. Vector Integer Arithmetic with Carry or Borrow Instructions
  170. defm "" : LMULSchedWrites<"WriteVICALUV">;
  171. defm "" : LMULSchedWrites<"WriteVICALUX">;
  172. defm "" : LMULSchedWrites<"WriteVICALUI">;
  173. // 11.6. Vector Single-Width Bit Shift Instructions
  174. defm "" : LMULSchedWrites<"WriteVShiftV">;
  175. defm "" : LMULSchedWrites<"WriteVShiftX">;
  176. defm "" : LMULSchedWrites<"WriteVShiftI">;
  177. // 11.7. Vector Narrowing Integer Right Shift Instructions
  178. defm "" : LMULSchedWritesW<"WriteVNShiftV">;
  179. defm "" : LMULSchedWritesW<"WriteVNShiftX">;
  180. defm "" : LMULSchedWritesW<"WriteVNShiftI">;
  181. // 11.8. Vector Integer Comparison Instructions
  182. // 11.9. Vector Integer Min/Max Instructions
  183. defm "" : LMULSchedWrites<"WriteVICmpV">;
  184. defm "" : LMULSchedWrites<"WriteVICmpX">;
  185. defm "" : LMULSchedWrites<"WriteVICmpI">;
  186. // 11.10. Vector Single-Width Integer Multiply Instructions
  187. defm "" : LMULSchedWrites<"WriteVIMulV">;
  188. defm "" : LMULSchedWrites<"WriteVIMulX">;
  189. // 11.11. Vector Integer Divide Instructions
  190. defm "" : LMULSchedWrites<"WriteVIDivV">;
  191. defm "" : LMULSchedWrites<"WriteVIDivX">;
  192. // 11.12. Vector Widening Integer Multiply Instructions
  193. defm "" : LMULSchedWritesW<"WriteVIWMulV">;
  194. defm "" : LMULSchedWritesW<"WriteVIWMulX">;
  195. // 11.13. Vector Single-Width Integer Multiply-Add Instructions
  196. defm "" : LMULSchedWrites<"WriteVIMulAddV">;
  197. defm "" : LMULSchedWrites<"WriteVIMulAddX">;
  198. // 11.14. Vector Widening Integer Multiply-Add Instructions
  199. defm "" : LMULSchedWritesW<"WriteVIWMulAddV">;
  200. defm "" : LMULSchedWritesW<"WriteVIWMulAddX">;
  201. // 11.15. Vector Integer Merge Instructions
  202. defm "" : LMULSchedWrites<"WriteVIMergeV">;
  203. defm "" : LMULSchedWrites<"WriteVIMergeX">;
  204. defm "" : LMULSchedWrites<"WriteVIMergeI">;
  205. // 11.16. Vector Integer Move Instructions
  206. defm "" : LMULSchedWrites<"WriteVIMovV">;
  207. defm "" : LMULSchedWrites<"WriteVIMovX">;
  208. defm "" : LMULSchedWrites<"WriteVIMovI">;
  209. // 12. Vector Fixed-Point Arithmetic Instructions
  210. // 12.1. Vector Single-Width Saturating Add and Subtract
  211. defm "" : LMULSchedWrites<"WriteVSALUV">;
  212. defm "" : LMULSchedWrites<"WriteVSALUX">;
  213. defm "" : LMULSchedWrites<"WriteVSALUI">;
  214. // 12.2. Vector Single-Width Averaging Add and Subtract
  215. defm "" : LMULSchedWrites<"WriteVAALUV">;
  216. defm "" : LMULSchedWrites<"WriteVAALUX">;
  217. // 12.3. Vector Single-Width Fractional Multiply with Rounding and Saturation
  218. defm "" : LMULSchedWrites<"WriteVSMulV">;
  219. defm "" : LMULSchedWrites<"WriteVSMulX">;
  220. // 12.4. Vector Single-Width Scaling Shift Instructions
  221. defm "" : LMULSchedWrites<"WriteVSShiftV">;
  222. defm "" : LMULSchedWrites<"WriteVSShiftX">;
  223. defm "" : LMULSchedWrites<"WriteVSShiftI">;
  224. // 12.5. Vector Narrowing Fixed-Point Clip Instructions
  225. defm "" : LMULSchedWritesW<"WriteVNClipV">;
  226. defm "" : LMULSchedWritesW<"WriteVNClipX">;
  227. defm "" : LMULSchedWritesW<"WriteVNClipI">;
  228. // 13. Vector Floating-Point Instructions
  229. // 13.2. Vector Single-Width Floating-Point Add/Subtract Instructions
  230. defm "" : LMULSchedWrites<"WriteVFALUV">;
  231. defm "" : LMULSchedWrites<"WriteVFALUF">;
  232. // 13.3. Vector Widening Floating-Point Add/Subtract Instructions
  233. defm "" : LMULSchedWritesFW<"WriteVFWALUV">;
  234. defm "" : LMULSchedWritesFW<"WriteVFWALUF">;
  235. // 13.4. Vector Single-Width Floating-Point Multiply/Divide Instructions
  236. defm "" : LMULSchedWrites<"WriteVFMulV">;
  237. defm "" : LMULSchedWrites<"WriteVFMulF">;
  238. defm "" : LMULSchedWrites<"WriteVFDivV">;
  239. defm "" : LMULSchedWrites<"WriteVFDivF">;
  240. // 13.5. Vector Widening Floating-Point Multiply
  241. defm "" : LMULSchedWritesFW<"WriteVFWMulV">;
  242. defm "" : LMULSchedWritesFW<"WriteVFWMulF">;
  243. // 13.6. Vector Single-Width Floating-Point Fused Multiply-Add Instructions
  244. defm "" : LMULSchedWrites<"WriteVFMulAddV">;
  245. defm "" : LMULSchedWrites<"WriteVFMulAddF">;
  246. // 13.7. Vector Widening Floating-Point Fused Multiply-Add Instructions
  247. defm "" : LMULSchedWritesFW<"WriteVFWMulAddV">;
  248. defm "" : LMULSchedWritesFW<"WriteVFWMulAddF">;
  249. // 13.8. Vector Floating-Point Square-Root Instruction
  250. defm "" : LMULSchedWrites<"WriteVFSqrtV">;
  251. // 13.9. Vector Floating-Point Reciprocal Square-Root Estimate Instruction
  252. // 13.10. Vector Floating-Point Reciprocal Estimate Instruction
  253. defm "" : LMULSchedWrites<"WriteVFRecpV">;
  254. // 13.11. Vector Floating-Point MIN/MAX Instructions
  255. // 13.13. Vector Floating-Point Compare Instructions
  256. defm "" : LMULSchedWrites<"WriteVFCmpV">;
  257. defm "" : LMULSchedWrites<"WriteVFCmpF">;
  258. // 13.12. Vector Floating-Point Sign-Injection Instructions
  259. defm "" : LMULSchedWrites<"WriteVFSgnjV">;
  260. defm "" : LMULSchedWrites<"WriteVFSgnjF">;
  261. // 13.14. Vector Floating-Point Classify Instruction
  262. defm "" : LMULSchedWrites<"WriteVFClassV">;
  263. // 13.15. Vector Floating-Point Merge Instruction
  264. defm "" : LMULSchedWrites<"WriteVFMergeV">;
  265. // 13.16. Vector Floating-Point Move Instruction
  266. defm "" : LMULSchedWrites<"WriteVFMovV">;
  267. // 13.17. Single-Width Floating-Point/Integer Type-Convert Instructions
  268. defm "" : LMULSchedWrites<"WriteVFCvtIToFV">;
  269. defm "" : LMULSchedWrites<"WriteVFCvtFToIV">;
  270. // 13.18. Widening Floating-Point/Integer Type-Convert Instructions
  271. defm "" : LMULSchedWritesW<"WriteVFWCvtIToFV">;
  272. defm "" : LMULSchedWritesFW<"WriteVFWCvtFToIV">;
  273. defm "" : LMULSchedWritesFW<"WriteVFWCvtFToFV">;
  274. // 13.19. Narrowing Floating-Point/Integer Type-Convert Instructions
  275. defm "" : LMULSchedWritesFW<"WriteVFNCvtIToFV">;
  276. defm "" : LMULSchedWritesW<"WriteVFNCvtFToIV">;
  277. defm "" : LMULSchedWritesFW<"WriteVFNCvtFToFV">;
  278. // 14. Vector Reduction Operations
  279. // 14.1. Vector Single-Width Integer Reduction Instructions
  280. def WriteVIRedV : SchedWrite;
  281. // 14.2. Vector Widening Integer Reduction Instructions
  282. def WriteVIWRedV : SchedWrite;
  283. // 14.3. Vector Single-Width Floating-Point Reduction Instructions
  284. def WriteVFRedV : SchedWrite;
  285. def WriteVFRedOV : SchedWrite;
  286. // 14.4. Vector Widening Floating-Point Reduction Instructions
  287. def WriteVFWRedV : SchedWrite;
  288. def WriteVFWRedOV : SchedWrite;
  289. // 15. Vector Mask Instructions
  290. // 15.1. Vector Mask-Register Logical Instructions
  291. defm "" : LMULSchedWrites<"WriteVMALUV">;
  292. // 15.2. Vector Mask Population Count
  293. defm "" : LMULSchedWrites<"WriteVMPopV">;
  294. // 15.3. Vector Find-First-Set Mask Bit
  295. defm "" : LMULSchedWrites<"WriteVMFFSV">;
  296. // 15.4. Vector Set-Before-First Mask Bit
  297. // 15.5. Vector Set-Including-First Mask Bit
  298. // 15.6. Vector Set-only-First Mask Bit
  299. defm "" : LMULSchedWrites<"WriteVMSFSV">;
  300. // 15.8. Vector Iota Instruction
  301. defm "" : LMULSchedWrites<"WriteVMIotV">;
  302. // 15.9. Vector Element Index Instruction
  303. defm "" : LMULSchedWrites<"WriteVMIdxV">;
  304. // 16. Vector Permutation Instructions
  305. // 16.1. Integer Scalar Move Instructions
  306. defm "" : LMULSchedWrites<"WriteVIMovVX">;
  307. defm "" : LMULSchedWrites<"WriteVIMovXV">;
  308. // 16.2. Floating-Point Scalar Move Instructions
  309. defm "" : LMULSchedWrites<"WriteVFMovVF">;
  310. defm "" : LMULSchedWrites<"WriteVFMovFV">;
  311. // 16.3. Vector Slide Instructions
  312. defm "" : LMULSchedWrites<"WriteVISlideX">;
  313. defm "" : LMULSchedWrites<"WriteVISlideI">;
  314. defm "" : LMULSchedWrites<"WriteVISlide1X">;
  315. defm "" : LMULSchedWrites<"WriteVFSlide1F">;
  316. // 16.4. Vector Register Gather Instructions
  317. defm "" : LMULSchedWrites<"WriteVGatherV">;
  318. defm "" : LMULSchedWrites<"WriteVGatherX">;
  319. defm "" : LMULSchedWrites<"WriteVGatherI">;
  320. // 16.5. Vector Compress Instruction
  321. defm "" : LMULSchedWrites<"WriteVCompressV">;
  322. // 16.6. Whole Vector Register Move
  323. // These are already LMUL aware
  324. def WriteVMov1V : SchedWrite;
  325. def WriteVMov2V : SchedWrite;
  326. def WriteVMov4V : SchedWrite;
  327. def WriteVMov8V : SchedWrite;
  328. //===----------------------------------------------------------------------===//
  329. /// Define scheduler resources associated with use operands.
  330. // 6. Configuration-Setting Instructions
  331. def ReadVSETVLI : SchedRead;
  332. def ReadVSETVL : SchedRead;
  333. // 7. Vector Loads and Stores
  334. defm "" : LMULSchedReads<"ReadVLDX">;
  335. defm "" : LMULSchedReads<"ReadVSTX">;
  336. // 7.4. Vector Unit-Stride Instructions
  337. defm "" : LMULSchedReads<"ReadVSTEV">;
  338. // 7.4.1. Vector Unit-Strided Mask
  339. defm "" : LMULSchedReads<"ReadVSTM">;
  340. // 7.5. Vector Strided Instructions
  341. defm "" : LMULSchedReads<"ReadVLDSX">;
  342. defm "" : LMULSchedReads<"ReadVSTSX">;
  343. defm "" : LMULSchedReads<"ReadVSTS8V">;
  344. defm "" : LMULSchedReads<"ReadVSTS16V">;
  345. defm "" : LMULSchedReads<"ReadVSTS32V">;
  346. defm "" : LMULSchedReads<"ReadVSTS64V">;
  347. // 7.6. Vector Indexed Instructions
  348. defm "" : LMULSchedReads<"ReadVLDUXV">;
  349. defm "" : LMULSchedReads<"ReadVLDOXV">;
  350. defm "" : LMULSchedReads<"ReadVSTUX8">;
  351. defm "" : LMULSchedReads<"ReadVSTUX16">;
  352. defm "" : LMULSchedReads<"ReadVSTUX32">;
  353. defm "" : LMULSchedReads<"ReadVSTUX64">;
  354. defm "" : LMULSchedReads<"ReadVSTUXV">;
  355. defm "" : LMULSchedReads<"ReadVSTUX8V">;
  356. defm "" : LMULSchedReads<"ReadVSTUX16V">;
  357. defm "" : LMULSchedReads<"ReadVSTUX32V">;
  358. defm "" : LMULSchedReads<"ReadVSTUX64V">;
  359. defm "" : LMULSchedReads<"ReadVSTOX8">;
  360. defm "" : LMULSchedReads<"ReadVSTOX16">;
  361. defm "" : LMULSchedReads<"ReadVSTOX32">;
  362. defm "" : LMULSchedReads<"ReadVSTOX64">;
  363. defm "" : LMULSchedReads<"ReadVSTOXV">;
  364. defm "" : LMULSchedReads<"ReadVSTOX8V">;
  365. defm "" : LMULSchedReads<"ReadVSTOX16V">;
  366. defm "" : LMULSchedReads<"ReadVSTOX32V">;
  367. defm "" : LMULSchedReads<"ReadVSTOX64V">;
  368. // 7.9. Vector Whole Register Instructions
  369. // These are already LMUL aware
  370. def ReadVST1R : SchedRead;
  371. def ReadVST2R : SchedRead;
  372. def ReadVST4R : SchedRead;
  373. def ReadVST8R : SchedRead;
  374. // 11. Vector Integer Arithmetic Instructions
  375. // 11.1. Vector Single-Width Integer Add and Subtract
  376. // 11.5. Vector Bitwise Logical Instructions
  377. defm "" : LMULSchedReads<"ReadVIALUV">;
  378. defm "" : LMULSchedReads<"ReadVIALUX">;
  379. // 11.2. Vector Widening Integer Add/Subtract
  380. defm "" : LMULSchedReadsW<"ReadVIWALUV">;
  381. defm "" : LMULSchedReadsW<"ReadVIWALUX">;
  382. // 11.3. Vector Integer Extension
  383. defm "" : LMULSchedReads<"ReadVExtV">;
  384. // 11.4. Vector Integer Arithmetic with Carry or Borrow Instructions
  385. defm "" : LMULSchedReads<"ReadVICALUV">;
  386. defm "" : LMULSchedReads<"ReadVICALUX">;
  387. // 11.6. Vector Single-Width Bit Shift Instructions
  388. defm "" : LMULSchedReads<"ReadVShiftV">;
  389. defm "" : LMULSchedReads<"ReadVShiftX">;
  390. // 11.7. Vector Narrowing Integer Right Shift Instructions
  391. defm "" : LMULSchedReadsW<"ReadVNShiftV">;
  392. defm "" : LMULSchedReadsW<"ReadVNShiftX">;
  393. // 11.8. Vector Integer Comparison Instructions
  394. // 11.9. Vector Integer Min/Max Instructions
  395. defm "" : LMULSchedReads<"ReadVICmpV">;
  396. defm "" : LMULSchedReads<"ReadVICmpX">;
  397. // 11.10. Vector Single-Width Integer Multiply Instructions
  398. defm "" : LMULSchedReads<"ReadVIMulV">;
  399. defm "" : LMULSchedReads<"ReadVIMulX">;
  400. // 11.11. Vector Integer Divide Instructions
  401. defm "" : LMULSchedReads<"ReadVIDivV">;
  402. defm "" : LMULSchedReads<"ReadVIDivX">;
  403. // 11.12. Vector Widening Integer Multiply Instructions
  404. defm "" : LMULSchedReadsW<"ReadVIWMulV">;
  405. defm "" : LMULSchedReadsW<"ReadVIWMulX">;
  406. // 11.13. Vector Single-Width Integer Multiply-Add Instructions
  407. defm "" : LMULSchedReads<"ReadVIMulAddV">;
  408. defm "" : LMULSchedReads<"ReadVIMulAddX">;
  409. // 11.14. Vector Widening Integer Multiply-Add Instructions
  410. defm "" : LMULSchedReadsW<"ReadVIWMulAddV">;
  411. defm "" : LMULSchedReadsW<"ReadVIWMulAddX">;
  412. // 11.15. Vector Integer Merge Instructions
  413. defm "" : LMULSchedReads<"ReadVIMergeV">;
  414. defm "" : LMULSchedReads<"ReadVIMergeX">;
  415. // 11.16. Vector Integer Move Instructions
  416. defm "" : LMULSchedReads<"ReadVIMovV">;
  417. defm "" : LMULSchedReads<"ReadVIMovX">;
  418. // 12. Vector Fixed-Point Arithmetic Instructions
  419. // 12.1. Vector Single-Width Saturating Add and Subtract
  420. defm "" : LMULSchedReads<"ReadVSALUV">;
  421. defm "" : LMULSchedReads<"ReadVSALUX">;
  422. // 12.2. Vector Single-Width Averaging Add and Subtract
  423. defm "" : LMULSchedReads<"ReadVAALUV">;
  424. defm "" : LMULSchedReads<"ReadVAALUX">;
  425. // 12.3. Vector Single-Width Fractional Multiply with Rounding and Saturation
  426. defm "" : LMULSchedReads<"ReadVSMulV">;
  427. defm "" : LMULSchedReads<"ReadVSMulX">;
  428. // 12.4. Vector Single-Width Scaling Shift Instructions
  429. defm "" : LMULSchedReads<"ReadVSShiftV">;
  430. defm "" : LMULSchedReads<"ReadVSShiftX">;
  431. // 12.5. Vector Narrowing Fixed-Point Clip Instructions
  432. defm "" : LMULSchedReadsW<"ReadVNClipV">;
  433. defm "" : LMULSchedReadsW<"ReadVNClipX">;
  434. // 13. Vector Floating-Point Instructions
  435. // 13.2. Vector Single-Width Floating-Point Add/Subtract Instructions
  436. defm "" : LMULSchedReads<"ReadVFALUV">;
  437. defm "" : LMULSchedReads<"ReadVFALUF">;
  438. // 13.3. Vector Widening Floating-Point Add/Subtract Instructions
  439. defm "" : LMULSchedReadsFW<"ReadVFWALUV">;
  440. defm "" : LMULSchedReadsFW<"ReadVFWALUF">;
  441. // 13.4. Vector Single-Width Floating-Point Multiply/Divide Instructions
  442. defm "" : LMULSchedReads<"ReadVFMulV">;
  443. defm "" : LMULSchedReads<"ReadVFMulF">;
  444. defm "" : LMULSchedReads<"ReadVFDivV">;
  445. defm "" : LMULSchedReads<"ReadVFDivF">;
  446. // 13.5. Vector Widening Floating-Point Multiply
  447. defm "" : LMULSchedReadsFW<"ReadVFWMulV">;
  448. defm "" : LMULSchedReadsFW<"ReadVFWMulF">;
  449. // 13.6. Vector Single-Width Floating-Point Fused Multiply-Add Instructions
  450. defm "" : LMULSchedReads<"ReadVFMulAddV">;
  451. defm "" : LMULSchedReads<"ReadVFMulAddF">;
  452. // 13.7. Vector Widening Floating-Point Fused Multiply-Add Instructions
  453. defm "" : LMULSchedReadsFW<"ReadVFWMulAddV">;
  454. defm "" : LMULSchedReadsFW<"ReadVFWMulAddF">;
  455. // 13.8. Vector Floating-Point Square-Root Instruction
  456. defm "" : LMULSchedReads<"ReadVFSqrtV">;
  457. // 13.9. Vector Floating-Point Reciprocal Square-Root Estimate Instruction
  458. // 13.10. Vector Floating-Point Reciprocal Estimate Instruction
  459. defm "" : LMULSchedReads<"ReadVFRecpV">;
  460. // 13.11. Vector Floating-Point MIN/MAX Instructions
  461. // 13.13. Vector Floating-Point Compare Instructions
  462. defm "" : LMULSchedReads<"ReadVFCmpV">;
  463. defm "" : LMULSchedReads<"ReadVFCmpF">;
  464. // 13.12. Vector Floating-Point Sign-Injection Instructions
  465. defm "" : LMULSchedReads<"ReadVFSgnjV">;
  466. defm "" : LMULSchedReads<"ReadVFSgnjF">;
  467. // 13.14. Vector Floating-Point Classify Instruction
  468. defm "" : LMULSchedReads<"ReadVFClassV">;
  469. // 13.15. Vector Floating-Point Merge Instruction
  470. defm "" : LMULSchedReads<"ReadVFMergeV">;
  471. defm "" : LMULSchedReads<"ReadVFMergeF">;
  472. // 13.16. Vector Floating-Point Move Instruction
  473. defm "" : LMULSchedReads<"ReadVFMovF">;
  474. // 13.17. Single-Width Floating-Point/Integer Type-Convert Instructions
  475. defm "" : LMULSchedReads<"ReadVFCvtIToFV">;
  476. defm "" : LMULSchedReads<"ReadVFCvtFToIV">;
  477. // 13.18. Widening Floating-Point/Integer Type-Convert Instructions
  478. defm "" : LMULSchedReadsW<"ReadVFWCvtIToFV">;
  479. defm "" : LMULSchedReadsFW<"ReadVFWCvtFToIV">;
  480. defm "" : LMULSchedReadsFW<"ReadVFWCvtFToFV">;
  481. // 13.19. Narrowing Floating-Point/Integer Type-Convert Instructions
  482. defm "" : LMULSchedReadsFW<"ReadVFNCvtIToFV">;
  483. defm "" : LMULSchedReadsW<"ReadVFNCvtFToIV">;
  484. defm "" : LMULSchedReadsFW<"ReadVFNCvtFToFV">;
  485. // 14. Vector Reduction Operations
  486. // 14.1. Vector Single-Width Integer Reduction Instructions
  487. def ReadVIRedV : SchedRead;
  488. def ReadVIRedV0 : SchedRead;
  489. // 14.2. Vector Widening Integer Reduction Instructions
  490. def ReadVIWRedV : SchedRead;
  491. def ReadVIWRedV0 : SchedRead;
  492. // 14.3. Vector Single-Width Floating-Point Reduction Instructions
  493. def ReadVFRedV : SchedRead;
  494. def ReadVFRedV0 : SchedRead;
  495. def ReadVFRedOV : SchedRead;
  496. def ReadVFRedOV0 : SchedRead;
  497. // 14.4. Vector Widening Floating-Point Reduction Instructions
  498. def ReadVFWRedV : SchedRead;
  499. def ReadVFWRedV0 : SchedRead;
  500. def ReadVFWRedOV : SchedRead;
  501. def ReadVFWRedOV0 : SchedRead;
  502. // 15. Vector Mask Instructions
  503. // 15.1. Vector Mask-Register Logical Instructions
  504. defm "" : LMULSchedReads<"ReadVMALUV">;
  505. // 15.2. Vector Mask Population Count
  506. defm "" : LMULSchedReads<"ReadVMPopV">;
  507. // 15.3. Vector Find-First-Set Mask Bit
  508. defm "" : LMULSchedReads<"ReadVMFFSV">;
  509. // 15.4. Vector Set-Before-First Mask Bit
  510. // 15.5. Vector Set-Including-First Mask Bit
  511. // 15.6. Vector Set-only-First Mask Bit
  512. defm "" : LMULSchedReads<"ReadVMSFSV">;
  513. // 15.8. Vector Iota Instruction
  514. defm "" : LMULSchedReads<"ReadVMIotV">;
  515. // 16. Vector Permutation Instructions
  516. // 16.1. Integer Scalar Move Instructions
  517. defm "" : LMULSchedReads<"ReadVIMovVX">;
  518. defm "" : LMULSchedReads<"ReadVIMovXV">;
  519. defm "" : LMULSchedReads<"ReadVIMovXX">;
  520. // 16.2. Floating-Point Scalar Move Instructions
  521. defm "" : LMULSchedReads<"ReadVFMovVF">;
  522. defm "" : LMULSchedReads<"ReadVFMovFV">;
  523. defm "" : LMULSchedReads<"ReadVFMovFX">;
  524. // 16.3. Vector Slide Instructions
  525. defm "" : LMULSchedReads<"ReadVISlideV">;
  526. defm "" : LMULSchedReads<"ReadVISlideX">;
  527. defm "" : LMULSchedReads<"ReadVFSlideV">;
  528. defm "" : LMULSchedReads<"ReadVFSlideF">;
  529. // 16.4. Vector Register Gather Instructions
  530. defm "" : LMULSchedReads<"ReadVGatherV">;
  531. defm "" : LMULSchedReads<"ReadVGatherX">;
  532. // 16.5. Vector Compress Instruction
  533. defm "" : LMULSchedReads<"ReadVCompressV">;
  534. // 16.6. Whole Vector Register Move
  535. // These are already LMUL aware
  536. def ReadVMov1V : SchedRead;
  537. def ReadVMov2V : SchedRead;
  538. def ReadVMov4V : SchedRead;
  539. def ReadVMov8V : SchedRead;
  540. // Others
  541. def ReadVMask : SchedRead;
  542. //===----------------------------------------------------------------------===//
  543. /// Define default scheduler resources for V.
  544. multiclass UnsupportedSchedV {
  545. let Unsupported = true in {
  546. // 3.6 Vector Byte Length vlenb
  547. def : WriteRes<WriteRdVLENB, []>;
  548. // 6. Configuration-Setting Instructions
  549. def : WriteRes<WriteVSETVLI, []>;
  550. def : WriteRes<WriteVSETIVLI, []>;
  551. def : WriteRes<WriteVSETVL, []>;
  552. // 7. Vector Loads and Stores
  553. defm "" : LMULWriteRes<"WriteVLDE", []>;
  554. defm "" : LMULWriteRes<"WriteVSTE", []>;
  555. defm "" : LMULWriteRes<"WriteVLDM", []>;
  556. defm "" : LMULWriteRes<"WriteVSTM", []>;
  557. defm "" : LMULWriteRes<"WriteVLDS8", []>;
  558. defm "" : LMULWriteRes<"WriteVLDS16", []>;
  559. defm "" : LMULWriteRes<"WriteVLDS32", []>;
  560. defm "" : LMULWriteRes<"WriteVLDS64", []>;
  561. defm "" : LMULWriteRes<"WriteVSTS8", []>;
  562. defm "" : LMULWriteRes<"WriteVSTS16", []>;
  563. defm "" : LMULWriteRes<"WriteVSTS32", []>;
  564. defm "" : LMULWriteRes<"WriteVSTS64", []>;
  565. defm "" : LMULWriteRes<"WriteVLDUX8", []>;
  566. defm "" : LMULWriteRes<"WriteVLDUX16", []>;
  567. defm "" : LMULWriteRes<"WriteVLDUX32", []>;
  568. defm "" : LMULWriteRes<"WriteVLDUX64", []>;
  569. defm "" : LMULWriteRes<"WriteVLDOX8", []>;
  570. defm "" : LMULWriteRes<"WriteVLDOX16", []>;
  571. defm "" : LMULWriteRes<"WriteVLDOX32", []>;
  572. defm "" : LMULWriteRes<"WriteVLDOX64", []>;
  573. defm "" : LMULWriteRes<"WriteVSTUX8", []>;
  574. defm "" : LMULWriteRes<"WriteVSTUX16", []>;
  575. defm "" : LMULWriteRes<"WriteVSTUX32", []>;
  576. defm "" : LMULWriteRes<"WriteVSTUX64", []>;
  577. defm "" : LMULWriteRes<"WriteVSTOX8", []>;
  578. defm "" : LMULWriteRes<"WriteVSTOX16", []>;
  579. defm "" : LMULWriteRes<"WriteVSTOX32", []>;
  580. defm "" : LMULWriteRes<"WriteVSTOX64", []>;
  581. defm "" : LMULWriteRes<"WriteVLDFF", []>;
  582. // These are already LMUL aware
  583. def : WriteRes<WriteVLD1R, []>;
  584. def : WriteRes<WriteVLD2R, []>;
  585. def : WriteRes<WriteVLD4R, []>;
  586. def : WriteRes<WriteVLD8R, []>;
  587. def : WriteRes<WriteVST1R, []>;
  588. def : WriteRes<WriteVST2R, []>;
  589. def : WriteRes<WriteVST4R, []>;
  590. def : WriteRes<WriteVST8R, []>;
  591. // Vector Segment Loads and Stores
  592. foreach nf=2-8 in {
  593. foreach eew = [8, 16, 32, 64] in {
  594. defm "" : LMULWriteRes <"WriteVLSEG" # nf # "e" # eew, []>;
  595. defm "" : LMULWriteRes <"WriteVLSEGFF" # nf # "e" # eew, []>;
  596. defm "" : LMULWriteRes <"WriteVSSEG" # nf # "e" # eew, []>;
  597. defm "" : LMULWriteRes <"WriteVLSSEG" # nf # "e" # eew, []>;
  598. defm "" : LMULWriteRes <"WriteVSSSEG" # nf # "e" # eew, []>;
  599. defm "" : LMULWriteRes <"WriteVLUXSEG" # nf # "e" # eew, []>;
  600. defm "" : LMULWriteRes <"WriteVLOXSEG" # nf # "e" # eew, []>;
  601. defm "" : LMULWriteRes <"WriteVSUXSEG" # nf # "e" # eew, []>;
  602. defm "" : LMULWriteRes <"WriteVSOXSEG" # nf # "e" # eew, []>;
  603. }
  604. }
  605. // 11. Vector Integer Arithmetic Instructions
  606. defm "" : LMULWriteRes<"WriteVIALUV", []>;
  607. defm "" : LMULWriteRes<"WriteVIALUX", []>;
  608. defm "" : LMULWriteRes<"WriteVIALUI", []>;
  609. defm "" : LMULWriteResW<"WriteVIWALUV", []>;
  610. defm "" : LMULWriteResW<"WriteVIWALUX", []>;
  611. defm "" : LMULWriteResW<"WriteVIWALUI", []>;
  612. defm "" : LMULWriteRes<"WriteVExtV", []>;
  613. defm "" : LMULWriteRes<"WriteVICALUV", []>;
  614. defm "" : LMULWriteRes<"WriteVICALUX", []>;
  615. defm "" : LMULWriteRes<"WriteVICALUI", []>;
  616. defm "" : LMULWriteRes<"WriteVShiftV", []>;
  617. defm "" : LMULWriteRes<"WriteVShiftX", []>;
  618. defm "" : LMULWriteRes<"WriteVShiftI", []>;
  619. defm "" : LMULWriteResW<"WriteVNShiftV", []>;
  620. defm "" : LMULWriteResW<"WriteVNShiftX", []>;
  621. defm "" : LMULWriteResW<"WriteVNShiftI", []>;
  622. defm "" : LMULWriteRes<"WriteVICmpV", []>;
  623. defm "" : LMULWriteRes<"WriteVICmpX", []>;
  624. defm "" : LMULWriteRes<"WriteVICmpI", []>;
  625. defm "" : LMULWriteRes<"WriteVIMulV", []>;
  626. defm "" : LMULWriteRes<"WriteVIMulX", []>;
  627. defm "" : LMULWriteRes<"WriteVIDivV", []>;
  628. defm "" : LMULWriteRes<"WriteVIDivX", []>;
  629. defm "" : LMULWriteResW<"WriteVIWMulV", []>;
  630. defm "" : LMULWriteResW<"WriteVIWMulX", []>;
  631. defm "" : LMULWriteRes<"WriteVIMulAddV", []>;
  632. defm "" : LMULWriteRes<"WriteVIMulAddX", []>;
  633. defm "" : LMULWriteResW<"WriteVIWMulAddV", []>;
  634. defm "" : LMULWriteResW<"WriteVIWMulAddX", []>;
  635. defm "" : LMULWriteRes<"WriteVIMergeV", []>;
  636. defm "" : LMULWriteRes<"WriteVIMergeX", []>;
  637. defm "" : LMULWriteRes<"WriteVIMergeI", []>;
  638. defm "" : LMULWriteRes<"WriteVIMovV", []>;
  639. defm "" : LMULWriteRes<"WriteVIMovX", []>;
  640. defm "" : LMULWriteRes<"WriteVIMovI", []>;
  641. // 12. Vector Fixed-Point Arithmetic Instructions
  642. defm "" : LMULWriteRes<"WriteVSALUV", []>;
  643. defm "" : LMULWriteRes<"WriteVSALUX", []>;
  644. defm "" : LMULWriteRes<"WriteVSALUI", []>;
  645. defm "" : LMULWriteRes<"WriteVAALUV", []>;
  646. defm "" : LMULWriteRes<"WriteVAALUX", []>;
  647. defm "" : LMULWriteRes<"WriteVSMulV", []>;
  648. defm "" : LMULWriteRes<"WriteVSMulX", []>;
  649. defm "" : LMULWriteRes<"WriteVSShiftV", []>;
  650. defm "" : LMULWriteRes<"WriteVSShiftX", []>;
  651. defm "" : LMULWriteRes<"WriteVSShiftI", []>;
  652. defm "" : LMULWriteResW<"WriteVNClipV", []>;
  653. defm "" : LMULWriteResW<"WriteVNClipX", []>;
  654. defm "" : LMULWriteResW<"WriteVNClipI", []>;
  655. // 13. Vector Floating-Point Instructions
  656. defm "" : LMULWriteRes<"WriteVFALUV", []>;
  657. defm "" : LMULWriteRes<"WriteVFALUF", []>;
  658. defm "" : LMULWriteResFW<"WriteVFWALUV", []>;
  659. defm "" : LMULWriteResFW<"WriteVFWALUF", []>;
  660. defm "" : LMULWriteRes<"WriteVFMulV", []>;
  661. defm "" : LMULWriteRes<"WriteVFMulF", []>;
  662. defm "" : LMULWriteRes<"WriteVFDivV", []>;
  663. defm "" : LMULWriteRes<"WriteVFDivF", []>;
  664. defm "" : LMULWriteResFW<"WriteVFWMulV", []>;
  665. defm "" : LMULWriteResFW<"WriteVFWMulF", []>;
  666. defm "" : LMULWriteRes<"WriteVFMulAddV", []>;
  667. defm "" : LMULWriteRes<"WriteVFMulAddF", []>;
  668. defm "" : LMULWriteResFW<"WriteVFWMulAddV", []>;
  669. defm "" : LMULWriteResFW<"WriteVFWMulAddF", []>;
  670. defm "" : LMULWriteRes<"WriteVFSqrtV", []>;
  671. defm "" : LMULWriteRes<"WriteVFRecpV", []>;
  672. defm "" : LMULWriteRes<"WriteVFCmpV", []>;
  673. defm "" : LMULWriteRes<"WriteVFCmpF", []>;
  674. defm "" : LMULWriteRes<"WriteVFSgnjV", []>;
  675. defm "" : LMULWriteRes<"WriteVFSgnjF", []>;
  676. defm "" : LMULWriteRes<"WriteVFClassV", []>;
  677. defm "" : LMULWriteRes<"WriteVFMergeV", []>;
  678. defm "" : LMULWriteRes<"WriteVFMovV", []>;
  679. defm "" : LMULWriteRes<"WriteVFCvtIToFV", []>;
  680. defm "" : LMULWriteRes<"WriteVFCvtFToIV", []>;
  681. defm "" : LMULWriteResW<"WriteVFWCvtIToFV", []>;
  682. defm "" : LMULWriteResFW<"WriteVFWCvtFToIV", []>;
  683. defm "" : LMULWriteResFW<"WriteVFWCvtFToFV", []>;
  684. defm "" : LMULWriteResFW<"WriteVFNCvtIToFV", []>;
  685. defm "" : LMULWriteResW<"WriteVFNCvtFToIV", []>;
  686. defm "" : LMULWriteResFW<"WriteVFNCvtFToFV", []>;
  687. // 14. Vector Reduction Operations
  688. def : WriteRes<WriteVIRedV, []>;
  689. def : WriteRes<WriteVIWRedV, []>;
  690. def : WriteRes<WriteVFRedV, []>;
  691. def : WriteRes<WriteVFRedOV, []>;
  692. def : WriteRes<WriteVFWRedV, []>;
  693. def : WriteRes<WriteVFWRedOV, []>;
  694. // 15. Vector Mask Instructions
  695. defm "" : LMULWriteRes<"WriteVMALUV", []>;
  696. defm "" : LMULWriteRes<"WriteVMPopV", []>;
  697. defm "" : LMULWriteRes<"WriteVMFFSV", []>;
  698. defm "" : LMULWriteRes<"WriteVMSFSV", []>;
  699. defm "" : LMULWriteRes<"WriteVMIotV", []>;
  700. defm "" : LMULWriteRes<"WriteVMIdxV", []>;
  701. // 16. Vector Permutation Instructions
  702. defm "" : LMULWriteRes<"WriteVIMovVX", []>;
  703. defm "" : LMULWriteRes<"WriteVIMovXV", []>;
  704. defm "" : LMULWriteRes<"WriteVFMovVF", []>;
  705. defm "" : LMULWriteRes<"WriteVFMovFV", []>;
  706. defm "" : LMULWriteRes<"WriteVISlideX", []>;
  707. defm "" : LMULWriteRes<"WriteVISlideI", []>;
  708. defm "" : LMULWriteRes<"WriteVISlide1X", []>;
  709. defm "" : LMULWriteRes<"WriteVFSlide1F", []>;
  710. defm "" : LMULWriteRes<"WriteVGatherV", []>;
  711. defm "" : LMULWriteRes<"WriteVGatherX", []>;
  712. defm "" : LMULWriteRes<"WriteVGatherI", []>;
  713. defm "" : LMULWriteRes<"WriteVCompressV", []>;
  714. // These are already LMUL aware
  715. def : WriteRes<WriteVMov1V, []>;
  716. def : WriteRes<WriteVMov2V, []>;
  717. def : WriteRes<WriteVMov4V, []>;
  718. def : WriteRes<WriteVMov8V, []>;
  719. // 6. Configuration-Setting Instructions
  720. def : ReadAdvance<ReadVSETVLI, 0>;
  721. def : ReadAdvance<ReadVSETVL, 0>;
  722. // 7. Vector Loads and Stores
  723. defm "" : LMULReadAdvance<"ReadVLDX", 0>;
  724. defm "" : LMULReadAdvance<"ReadVSTX", 0>;
  725. defm "" : LMULReadAdvance<"ReadVSTEV", 0>;
  726. defm "" : LMULReadAdvance<"ReadVSTM", 0>;
  727. defm "" : LMULReadAdvance<"ReadVLDSX", 0>;
  728. defm "" : LMULReadAdvance<"ReadVSTSX", 0>;
  729. defm "" : LMULReadAdvance<"ReadVSTS8V", 0>;
  730. defm "" : LMULReadAdvance<"ReadVSTS16V", 0>;
  731. defm "" : LMULReadAdvance<"ReadVSTS32V", 0>;
  732. defm "" : LMULReadAdvance<"ReadVSTS64V", 0>;
  733. defm "" : LMULReadAdvance<"ReadVLDUXV", 0>;
  734. defm "" : LMULReadAdvance<"ReadVLDOXV", 0>;
  735. defm "" : LMULReadAdvance<"ReadVSTUXV", 0>;
  736. defm "" : LMULReadAdvance<"ReadVSTUX8", 0>;
  737. defm "" : LMULReadAdvance<"ReadVSTUX16", 0>;
  738. defm "" : LMULReadAdvance<"ReadVSTUX32", 0>;
  739. defm "" : LMULReadAdvance<"ReadVSTUX64", 0>;
  740. defm "" : LMULReadAdvance<"ReadVSTUX8V", 0>;
  741. defm "" : LMULReadAdvance<"ReadVSTUX16V", 0>;
  742. defm "" : LMULReadAdvance<"ReadVSTUX32V", 0>;
  743. defm "" : LMULReadAdvance<"ReadVSTUX64V", 0>;
  744. defm "" : LMULReadAdvance<"ReadVSTOX8", 0>;
  745. defm "" : LMULReadAdvance<"ReadVSTOX16", 0>;
  746. defm "" : LMULReadAdvance<"ReadVSTOX32", 0>;
  747. defm "" : LMULReadAdvance<"ReadVSTOX64", 0>;
  748. defm "" : LMULReadAdvance<"ReadVSTOXV", 0>;
  749. defm "" : LMULReadAdvance<"ReadVSTOX8V", 0>;
  750. defm "" : LMULReadAdvance<"ReadVSTOX16V", 0>;
  751. defm "" : LMULReadAdvance<"ReadVSTOX32V", 0>;
  752. defm "" : LMULReadAdvance<"ReadVSTOX64V", 0>;
  753. // These are already LMUL aware
  754. def : ReadAdvance<ReadVST1R, 0>;
  755. def : ReadAdvance<ReadVST2R, 0>;
  756. def : ReadAdvance<ReadVST4R, 0>;
  757. def : ReadAdvance<ReadVST8R, 0>;
  758. // 11. Vector Integer Arithmetic Instructions
  759. defm "" : LMULReadAdvance<"ReadVIALUV", 0>;
  760. defm "" : LMULReadAdvance<"ReadVIALUX", 0>;
  761. defm "" : LMULReadAdvanceW<"ReadVIWALUV", 0>;
  762. defm "" : LMULReadAdvanceW<"ReadVIWALUX", 0>;
  763. defm "" : LMULReadAdvance<"ReadVExtV", 0>;
  764. defm "" : LMULReadAdvance<"ReadVICALUV", 0>;
  765. defm "" : LMULReadAdvance<"ReadVICALUX", 0>;
  766. defm "" : LMULReadAdvance<"ReadVShiftV", 0>;
  767. defm "" : LMULReadAdvance<"ReadVShiftX", 0>;
  768. defm "" : LMULReadAdvanceW<"ReadVNShiftV", 0>;
  769. defm "" : LMULReadAdvanceW<"ReadVNShiftX", 0>;
  770. defm "" : LMULReadAdvance<"ReadVICmpV", 0>;
  771. defm "" : LMULReadAdvance<"ReadVICmpX", 0>;
  772. defm "" : LMULReadAdvance<"ReadVIMulV", 0>;
  773. defm "" : LMULReadAdvance<"ReadVIMulX", 0>;
  774. defm "" : LMULReadAdvance<"ReadVIDivV", 0>;
  775. defm "" : LMULReadAdvance<"ReadVIDivX", 0>;
  776. defm "" : LMULReadAdvanceW<"ReadVIWMulV", 0>;
  777. defm "" : LMULReadAdvanceW<"ReadVIWMulX", 0>;
  778. defm "" : LMULReadAdvance<"ReadVIMulAddV", 0>;
  779. defm "" : LMULReadAdvance<"ReadVIMulAddX", 0>;
  780. defm "" : LMULReadAdvanceW<"ReadVIWMulAddV", 0>;
  781. defm "" : LMULReadAdvanceW<"ReadVIWMulAddX", 0>;
  782. defm "" : LMULReadAdvance<"ReadVIMergeV", 0>;
  783. defm "" : LMULReadAdvance<"ReadVIMergeX", 0>;
  784. defm "" : LMULReadAdvance<"ReadVIMovV", 0>;
  785. defm "" : LMULReadAdvance<"ReadVIMovX", 0>;
  786. // 12. Vector Fixed-Point Arithmetic Instructions
  787. defm "" : LMULReadAdvance<"ReadVSALUV", 0>;
  788. defm "" : LMULReadAdvance<"ReadVSALUX", 0>;
  789. defm "" : LMULReadAdvance<"ReadVAALUV", 0>;
  790. defm "" : LMULReadAdvance<"ReadVAALUX", 0>;
  791. defm "" : LMULReadAdvance<"ReadVSMulV", 0>;
  792. defm "" : LMULReadAdvance<"ReadVSMulX", 0>;
  793. defm "" : LMULReadAdvance<"ReadVSShiftV", 0>;
  794. defm "" : LMULReadAdvance<"ReadVSShiftX", 0>;
  795. defm "" : LMULReadAdvanceW<"ReadVNClipV", 0>;
  796. defm "" : LMULReadAdvanceW<"ReadVNClipX", 0>;
  797. // 13. Vector Floating-Point Instructions
  798. defm "" : LMULReadAdvance<"ReadVFALUV", 0>;
  799. defm "" : LMULReadAdvance<"ReadVFALUF", 0>;
  800. defm "" : LMULReadAdvanceFW<"ReadVFWALUV", 0>;
  801. defm "" : LMULReadAdvanceFW<"ReadVFWALUF", 0>;
  802. defm "" : LMULReadAdvance<"ReadVFMulV", 0>;
  803. defm "" : LMULReadAdvance<"ReadVFMulF", 0>;
  804. defm "" : LMULReadAdvance<"ReadVFDivV", 0>;
  805. defm "" : LMULReadAdvance<"ReadVFDivF", 0>;
  806. defm "" : LMULReadAdvanceFW<"ReadVFWMulV", 0>;
  807. defm "" : LMULReadAdvanceFW<"ReadVFWMulF", 0>;
  808. defm "" : LMULReadAdvance<"ReadVFMulAddV", 0>;
  809. defm "" : LMULReadAdvance<"ReadVFMulAddF", 0>;
  810. defm "" : LMULReadAdvanceFW<"ReadVFWMulAddV", 0>;
  811. defm "" : LMULReadAdvanceFW<"ReadVFWMulAddF", 0>;
  812. defm "" : LMULReadAdvance<"ReadVFSqrtV", 0>;
  813. defm "" : LMULReadAdvance<"ReadVFRecpV", 0>;
  814. defm "" : LMULReadAdvance<"ReadVFCmpV", 0>;
  815. defm "" : LMULReadAdvance<"ReadVFCmpF", 0>;
  816. defm "" : LMULReadAdvance<"ReadVFSgnjV", 0>;
  817. defm "" : LMULReadAdvance<"ReadVFSgnjF", 0>;
  818. defm "" : LMULReadAdvance<"ReadVFClassV", 0>;
  819. defm "" : LMULReadAdvance<"ReadVFMergeV", 0>;
  820. defm "" : LMULReadAdvance<"ReadVFMergeF", 0>;
  821. defm "" : LMULReadAdvance<"ReadVFMovF", 0>;
  822. defm "" : LMULReadAdvance<"ReadVFCvtIToFV", 0>;
  823. defm "" : LMULReadAdvance<"ReadVFCvtFToIV", 0>;
  824. defm "" : LMULReadAdvanceW<"ReadVFWCvtIToFV", 0>;
  825. defm "" : LMULReadAdvanceFW<"ReadVFWCvtFToIV", 0>;
  826. defm "" : LMULReadAdvanceFW<"ReadVFWCvtFToFV", 0>;
  827. defm "" : LMULReadAdvanceFW<"ReadVFNCvtIToFV", 0>;
  828. defm "" : LMULReadAdvanceW<"ReadVFNCvtFToIV", 0>;
  829. defm "" : LMULReadAdvanceFW<"ReadVFNCvtFToFV", 0>;
  830. // 14. Vector Reduction Operations
  831. def : ReadAdvance<ReadVIRedV, 0>;
  832. def : ReadAdvance<ReadVIRedV0, 0>;
  833. def : ReadAdvance<ReadVIWRedV, 0>;
  834. def : ReadAdvance<ReadVIWRedV0, 0>;
  835. def : ReadAdvance<ReadVFRedV, 0>;
  836. def : ReadAdvance<ReadVFRedV0, 0>;
  837. def : ReadAdvance<ReadVFRedOV, 0>;
  838. def : ReadAdvance<ReadVFRedOV0, 0>;
  839. def : ReadAdvance<ReadVFWRedV, 0>;
  840. def : ReadAdvance<ReadVFWRedV0, 0>;
  841. def : ReadAdvance<ReadVFWRedOV, 0>;
  842. def : ReadAdvance<ReadVFWRedOV0, 0>;
  843. // 15. Vector Mask Instructions
  844. defm "" : LMULReadAdvance<"ReadVMALUV", 0>;
  845. defm "" : LMULReadAdvance<"ReadVMPopV", 0>;
  846. defm "" : LMULReadAdvance<"ReadVMFFSV", 0>;
  847. defm "" : LMULReadAdvance<"ReadVMSFSV", 0>;
  848. defm "" : LMULReadAdvance<"ReadVMIotV", 0>;
  849. // 16. Vector Permutation Instructions
  850. defm "" : LMULReadAdvance<"ReadVIMovVX", 0>;
  851. defm "" : LMULReadAdvance<"ReadVIMovXV", 0>;
  852. defm "" : LMULReadAdvance<"ReadVIMovXX", 0>;
  853. defm "" : LMULReadAdvance<"ReadVFMovVF", 0>;
  854. defm "" : LMULReadAdvance<"ReadVFMovFV", 0>;
  855. defm "" : LMULReadAdvance<"ReadVFMovFX", 0>;
  856. defm "" : LMULReadAdvance<"ReadVISlideV", 0>;
  857. defm "" : LMULReadAdvance<"ReadVISlideX", 0>;
  858. defm "" : LMULReadAdvance<"ReadVFSlideV", 0>;
  859. defm "" : LMULReadAdvance<"ReadVFSlideF", 0>;
  860. defm "" : LMULReadAdvance<"ReadVGatherV", 0>;
  861. defm "" : LMULReadAdvance<"ReadVGatherX", 0>;
  862. defm "" : LMULReadAdvance<"ReadVCompressV", 0>;
  863. // These are already LMUL aware
  864. def : ReadAdvance<ReadVMov1V, 0>;
  865. def : ReadAdvance<ReadVMov2V, 0>;
  866. def : ReadAdvance<ReadVMov4V, 0>;
  867. def : ReadAdvance<ReadVMov8V, 0>;
  868. // Others
  869. def : ReadAdvance<ReadVMask, 0>;
  870. } // Unsupported
  871. } // UnsupportedSchedV