AArch64SchedTSV110.td 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773
  1. //==- AArch64SchedTSV110.td - Huawei TSV110 Scheduling Definitions -*- 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 the machine model for Huawei TSV110 to support
  10. // instruction scheduling and other instruction cost heuristics.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. // ===---------------------------------------------------------------------===//
  14. // The following definitions describe the simpler per-operand machine model.
  15. // This works with MachineScheduler. See llvm/MC/MCSchedule.h for details.
  16. // Huawei TSV110 scheduling machine model.
  17. def TSV110Model : SchedMachineModel {
  18. let IssueWidth = 4; // 4 micro-ops dispatched per cycle.
  19. let MicroOpBufferSize = 128; // 128 micro-op re-order buffer
  20. let LoopMicroOpBufferSize = 16;
  21. let LoadLatency = 4; // Optimistic load latency.
  22. let MispredictPenalty = 14; // Fetch + Decode/Rename/Dispatch + Branch
  23. let CompleteModel = 1;
  24. list<Predicate> UnsupportedFeatures = !listconcat(SVEUnsupported.F,
  25. PAUnsupported.F,
  26. SMEUnsupported.F,
  27. [HasMTE]);
  28. }
  29. // Define each kind of processor resource and number available on the TSV110,
  30. // which has 8 pipelines, each with its own queue where micro-ops wait for
  31. // their operands and issue out-of-order to one of eight execution pipelines.
  32. let SchedModel = TSV110Model in {
  33. def TSV110UnitALU : ProcResource<1>; // Int ALU
  34. def TSV110UnitAB : ProcResource<2>; // Int ALU/BRU
  35. def TSV110UnitMDU : ProcResource<1>; // Multi-Cycle
  36. def TSV110UnitFSU1 : ProcResource<1>; // FP/ASIMD
  37. def TSV110UnitFSU2 : ProcResource<1>; // FP/ASIMD
  38. def TSV110UnitLd0St : ProcResource<1>; // Load/Store
  39. def TSV110UnitLd1 : ProcResource<1>; // Load
  40. def TSV110UnitLd : ProcResGroup<[TSV110UnitLd0St, TSV110UnitLd1]>; // Any load
  41. def TSV110UnitF : ProcResGroup<[TSV110UnitFSU1, TSV110UnitFSU2]>;
  42. def TSV110UnitALUAB : ProcResGroup<[TSV110UnitALU, TSV110UnitAB]>;
  43. }
  44. let SchedModel = TSV110Model in {
  45. //===----------------------------------------------------------------------===//
  46. // Map the target-defined scheduler read/write resources and latency for TSV110
  47. // Integer ALU
  48. // TODO: Use SchedVariant to select BRU for ALU ops that sets NZCV flags
  49. // (including ops that shift and/or extend):
  50. // 1cyc_1BRU: ADDS, ADCS, ANDS, BICS, SUBS, SBCS, CCMN, CCMP
  51. // 2cyc_1BRU: ADDSshfr, SUBSshfr, ANDSshfr, ADDSextr, SUBSextr
  52. def : WriteRes<WriteImm, [TSV110UnitALUAB]> { let Latency = 1; }
  53. def : WriteRes<WriteI, [TSV110UnitALUAB]> { let Latency = 1; }
  54. def : WriteRes<WriteISReg, [TSV110UnitMDU]> { let Latency = 2; }
  55. def : WriteRes<WriteIEReg, [TSV110UnitMDU]> { let Latency = 2; }
  56. def : WriteRes<WriteExtr, [TSV110UnitALUAB]> { let Latency = 1; }
  57. def : WriteRes<WriteIS, [TSV110UnitALUAB]> { let Latency = 1; }
  58. // Integer Mul/MAC/Div
  59. def : WriteRes<WriteID32, [TSV110UnitMDU]> { let Latency = 12;
  60. let ResourceCycles = [12]; }
  61. def : WriteRes<WriteID64, [TSV110UnitMDU]> { let Latency = 20;
  62. let ResourceCycles = [20]; }
  63. def : WriteRes<WriteIM32, [TSV110UnitMDU]> { let Latency = 3; }
  64. def : WriteRes<WriteIM64, [TSV110UnitMDU]> { let Latency = 4; }
  65. // Load
  66. def : WriteRes<WriteLD, [TSV110UnitLd]> { let Latency = 4; }
  67. def : WriteRes<WriteLDIdx, [TSV110UnitLd]> { let Latency = 4; }
  68. def : WriteRes<WriteLDHi, []> { let Latency = 4; }
  69. // Pre/Post Indexing
  70. def : WriteRes<WriteAdr, [TSV110UnitALUAB]> { let Latency = 1; }
  71. // Store
  72. def : WriteRes<WriteST, [TSV110UnitLd0St]> { let Latency = 1; }
  73. def : WriteRes<WriteSTP, [TSV110UnitLd0St]> { let Latency = 1; }
  74. def : WriteRes<WriteSTIdx, [TSV110UnitLd0St]> { let Latency = 1; }
  75. // FP
  76. def : WriteRes<WriteF, [TSV110UnitF]> { let Latency = 2; }
  77. def : WriteRes<WriteFCmp, [TSV110UnitF]> { let Latency = 3; }
  78. def : WriteRes<WriteFCvt, [TSV110UnitF]> { let Latency = 3; }
  79. def : WriteRes<WriteFCopy, [TSV110UnitF]> { let Latency = 2; }
  80. def : WriteRes<WriteFImm, [TSV110UnitF]> { let Latency = 2; }
  81. def : WriteRes<WriteFMul, [TSV110UnitF]> { let Latency = 5; }
  82. // FP Div, Sqrt
  83. def : WriteRes<WriteFDiv, [TSV110UnitFSU1]> { let Latency = 18; let ResourceCycles = [18]; }
  84. def : WriteRes<WriteVd, [TSV110UnitF]> { let Latency = 4; }
  85. def : WriteRes<WriteVq, [TSV110UnitF]> { let Latency = 4; }
  86. def : WriteRes<WriteVST, [TSV110UnitF]> { let Latency = 1; }
  87. // Branch
  88. def : WriteRes<WriteBr, [TSV110UnitAB]> { let Latency = 1; }
  89. def : WriteRes<WriteBrReg, [TSV110UnitAB]> { let Latency = 1; }
  90. def : WriteRes<WriteSys, []> { let Latency = 1; }
  91. def : WriteRes<WriteBarrier, []> { let Latency = 1; }
  92. def : WriteRes<WriteHint, []> { let Latency = 1; }
  93. def : WriteRes<WriteAtomic, []> { let Unsupported = 1; }
  94. // Forwarding logic is modeled only for multiply and accumulate.
  95. def : ReadAdvance<ReadI, 0>;
  96. def : ReadAdvance<ReadISReg, 0>;
  97. def : ReadAdvance<ReadIEReg, 0>;
  98. def : ReadAdvance<ReadIM, 0>;
  99. def : ReadAdvance<ReadIMA, 2, [WriteIM32, WriteIM64]>;
  100. def : ReadAdvance<ReadID, 0>;
  101. def : ReadAdvance<ReadExtrHi, 0>;
  102. def : ReadAdvance<ReadAdrBase, 0>;
  103. def : ReadAdvance<ReadVLD, 0>;
  104. def : ReadAdvance<ReadST, 0>;
  105. def : InstRW<[WriteI], (instrs COPY)>;
  106. // Detailed Refinements
  107. //===----------------------------------------------------------------------===//
  108. // Contains all of the TSV110 specific SchedWriteRes types. The approach
  109. // below is to define a generic SchedWriteRes for every combination of
  110. // latency and microOps. The naming conventions is to use a prefix, one field
  111. // for latency, and one or more microOp count/type designators.
  112. // Prefix: TSV110Wr
  113. // Latency: #cyc
  114. // MicroOp Count/Types: #(ALU|AB|MDU|FSU1|FSU2|LdSt|ALUAB|F|FLdSt)
  115. //
  116. // e.g. TSV110Wr_6cyc_1ALU_6MDU_4LdSt means the total latency is 6 and there are
  117. // 1 micro-ops to be issued down one ALU pipe, six MDU pipes and four LdSt pipes.
  118. //
  119. //===----------------------------------------------------------------------===//
  120. // Define Generic 1 micro-op types
  121. def TSV110Wr_1cyc_1AB : SchedWriteRes<[TSV110UnitAB]> { let Latency = 1; }
  122. def TSV110Wr_1cyc_1ALU : SchedWriteRes<[TSV110UnitALU]> { let Latency = 1; }
  123. def TSV110Wr_1cyc_1ALUAB : SchedWriteRes<[TSV110UnitALUAB]> { let Latency = 1; }
  124. def TSV110Wr_1cyc_1LdSt : SchedWriteRes<[TSV110UnitLd0St]> { let Latency = 1; }
  125. def TSV110Wr_2cyc_1AB : SchedWriteRes<[TSV110UnitAB]> { let Latency = 2; let ResourceCycles = [2]; }
  126. def TSV110Wr_2cyc_1ALU : SchedWriteRes<[TSV110UnitALU]> { let Latency = 2; }
  127. def TSV110Wr_2cyc_1MDU : SchedWriteRes<[TSV110UnitMDU]> { let Latency = 2; }
  128. def TSV110Wr_2cyc_1FSU1 : SchedWriteRes<[TSV110UnitFSU1]> { let Latency = 2; }
  129. def TSV110Wr_2cyc_1F : SchedWriteRes<[TSV110UnitF]> { let Latency = 2; }
  130. def TSV110Wr_3cyc_1F : SchedWriteRes<[TSV110UnitF]> { let Latency = 3; }
  131. def TSV110Wr_3cyc_1FSU1 : SchedWriteRes<[TSV110UnitFSU1]> { let Latency = 3; }
  132. def TSV110Wr_3cyc_1MDU : SchedWriteRes<[TSV110UnitMDU]> { let Latency = 3; }
  133. def TSV110Wr_4cyc_1FSU1 : SchedWriteRes<[TSV110UnitFSU1]> { let Latency = 4; }
  134. def TSV110Wr_4cyc_1F : SchedWriteRes<[TSV110UnitF]> { let Latency = 4; }
  135. def TSV110Wr_4cyc_1LdSt : SchedWriteRes<[TSV110UnitLd]> { let Latency = 4; }
  136. def TSV110Wr_4cyc_1MDU : SchedWriteRes<[TSV110UnitMDU]> { let Latency = 4; }
  137. def TSV110Wr_5cyc_1F : SchedWriteRes<[TSV110UnitF]> { let Latency = 5; }
  138. def TSV110Wr_5cyc_1FSU1 : SchedWriteRes<[TSV110UnitFSU1]> { let Latency = 5; }
  139. def TSV110Wr_5cyc_1FSU2 : SchedWriteRes<[TSV110UnitFSU2]> { let Latency = 5; }
  140. def TSV110Wr_5cyc_1LdSt : SchedWriteRes<[TSV110UnitLd]> { let Latency = 5; }
  141. def TSV110Wr_6cyc_1F : SchedWriteRes<[TSV110UnitF]> { let Latency = 6; }
  142. def TSV110Wr_7cyc_1F : SchedWriteRes<[TSV110UnitF]> { let Latency = 7; }
  143. def TSV110Wr_8cyc_1F : SchedWriteRes<[TSV110UnitF]> { let Latency = 8; }
  144. def TSV110Wr_11cyc_1FSU1 : SchedWriteRes<[TSV110UnitFSU1]> { let Latency = 11; let ResourceCycles = [11]; }
  145. def TSV110Wr_12cyc_1MDU : SchedWriteRes<[TSV110UnitMDU]> { let Latency = 12; let ResourceCycles = [12]; }
  146. def TSV110Wr_17cyc_1FSU2 : SchedWriteRes<[TSV110UnitFSU2]> { let Latency = 17; let ResourceCycles = [17]; }
  147. def TSV110Wr_18cyc_1FSU1 : SchedWriteRes<[TSV110UnitFSU1]> { let Latency = 18; let ResourceCycles = [18]; }
  148. def TSV110Wr_20cyc_1MDU : SchedWriteRes<[TSV110UnitMDU]> { let Latency = 20; let ResourceCycles = [20]; }
  149. def TSV110Wr_24cyc_1FSU1 : SchedWriteRes<[TSV110UnitFSU1]> { let Latency = 24; let ResourceCycles = [24]; }
  150. def TSV110Wr_31cyc_1FSU2 : SchedWriteRes<[TSV110UnitFSU2]> { let Latency = 31; let ResourceCycles = [31]; }
  151. def TSV110Wr_36cyc_1FSU2 : SchedWriteRes<[TSV110UnitFSU2]> { let Latency = 36; let ResourceCycles = [36]; }
  152. def TSV110Wr_38cyc_1FSU1 : SchedWriteRes<[TSV110UnitFSU1]> { let Latency = 38; let ResourceCycles = [38]; }
  153. def TSV110Wr_64cyc_1FSU2 : SchedWriteRes<[TSV110UnitFSU2]> { let Latency = 64; let ResourceCycles = [64]; }
  154. //===----------------------------------------------------------------------===//
  155. // Define Generic 2 micro-op types
  156. def TSV110Wr_1cyc_1LdSt_1ALUAB : SchedWriteRes<[TSV110UnitLd0St,
  157. TSV110UnitALUAB]> {
  158. let Latency = 1;
  159. let NumMicroOps = 2;
  160. }
  161. def TSV110Wr_2cyc_1LdSt_1ALUAB : SchedWriteRes<[TSV110UnitLd0St,
  162. TSV110UnitALUAB]> {
  163. let Latency = 2;
  164. let NumMicroOps = 2;
  165. }
  166. def TSV110Wr_2cyc_2LdSt : SchedWriteRes<[TSV110UnitLd0St,
  167. TSV110UnitLd0St]> {
  168. let Latency = 2;
  169. let NumMicroOps = 2;
  170. }
  171. def TSV110Wr_2cyc_2F : SchedWriteRes<[TSV110UnitF,
  172. TSV110UnitF]> {
  173. let Latency = 2;
  174. let NumMicroOps = 2;
  175. }
  176. def TSV110Wr_2cyc_1FSU1_1FSU2 : SchedWriteRes<[TSV110UnitFSU1,
  177. TSV110UnitFSU2]> {
  178. let Latency = 2;
  179. let NumMicroOps = 2;
  180. }
  181. def TSV110Wr_4cyc_2F : SchedWriteRes<[TSV110UnitF,
  182. TSV110UnitF]> {
  183. let Latency = 4;
  184. let NumMicroOps = 2;
  185. }
  186. def TSV110Wr_4cyc_1FSU1_1FSU2 : SchedWriteRes<[TSV110UnitFSU1,
  187. TSV110UnitFSU2]> {
  188. let Latency = 4;
  189. let NumMicroOps = 2;
  190. }
  191. def TSV110Wr_4cyc_1LdSt_1ALUAB : SchedWriteRes<[TSV110UnitLd,
  192. TSV110UnitALUAB]> {
  193. let Latency = 4;
  194. let NumMicroOps = 2;
  195. }
  196. def TSV110Wr_5cyc_1ALU_1F : SchedWriteRes<[TSV110UnitALU,
  197. TSV110UnitF]> {
  198. let Latency = 5;
  199. let NumMicroOps = 2;
  200. }
  201. def TSV110Wr_6cyc_2LdSt : SchedWriteRes<[TSV110UnitLd,
  202. TSV110UnitLd]> {
  203. let Latency = 6;
  204. let NumMicroOps = 2;
  205. }
  206. def TSV110Wr_6cyc_1LdSt_1ALUAB : SchedWriteRes<[TSV110UnitLd,
  207. TSV110UnitALUAB]> {
  208. let Latency = 6;
  209. let NumMicroOps = 2;
  210. }
  211. def TSV110Wr_7cyc_1F_1LdSt : SchedWriteRes<[TSV110UnitF,
  212. TSV110UnitLd]> {
  213. let Latency = 7;
  214. let NumMicroOps = 2;
  215. }
  216. def TSV110Wr_8cyc_2FSU1 : SchedWriteRes<[TSV110UnitFSU1,
  217. TSV110UnitFSU1]> {
  218. let Latency = 8;
  219. let NumMicroOps = 2;
  220. }
  221. def TSV110Wr_8cyc_1FSU1_1FSU2 : SchedWriteRes<[TSV110UnitFSU1,
  222. TSV110UnitFSU2]> {
  223. let Latency = 8;
  224. let NumMicroOps = 2;
  225. }
  226. //===----------------------------------------------------------------------===//
  227. // Define Generic 3 micro-op types
  228. def TSV110Wr_6cyc_3F : SchedWriteRes<[TSV110UnitF, TSV110UnitF,
  229. TSV110UnitF]> {
  230. let Latency = 6;
  231. let NumMicroOps = 3;
  232. }
  233. def TSV110Wr_6cyc_3LdSt : SchedWriteRes<[TSV110UnitLd, TSV110UnitLd,
  234. TSV110UnitLd]> {
  235. let Latency = 6;
  236. let NumMicroOps = 3;
  237. }
  238. def TSV110Wr_7cyc_2F_1LdSt : SchedWriteRes<[TSV110UnitF, TSV110UnitF,
  239. TSV110UnitLd]> {
  240. let Latency = 7;
  241. let NumMicroOps = 3;
  242. }
  243. //===----------------------------------------------------------------------===//
  244. // Define Generic 4 micro-op types
  245. def TSV110Wr_8cyc_4F : SchedWriteRes<[TSV110UnitF, TSV110UnitF,
  246. TSV110UnitF, TSV110UnitF]> {
  247. let Latency = 8;
  248. let NumMicroOps = 4;
  249. }
  250. def TSV110Wr_8cyc_3F_1LdSt : SchedWriteRes<[TSV110UnitF, TSV110UnitF,
  251. TSV110UnitF, TSV110UnitLd]> {
  252. let Latency = 8;
  253. let NumMicroOps = 4;
  254. }
  255. //===----------------------------------------------------------------------===//
  256. // Define Generic 5 micro-op types
  257. def TSV110Wr_8cyc_3F_2LdSt : SchedWriteRes<[TSV110UnitF, TSV110UnitF, TSV110UnitF,
  258. TSV110UnitLd, TSV110UnitLd]> {
  259. let Latency = 8;
  260. let NumMicroOps = 5;
  261. }
  262. //===----------------------------------------------------------------------===//
  263. // Define Generic 8 micro-op types
  264. def TSV110Wr_10cyc_4F_4LdSt : SchedWriteRes<[TSV110UnitF, TSV110UnitF,
  265. TSV110UnitF, TSV110UnitF,
  266. TSV110UnitLd, TSV110UnitLd,
  267. TSV110UnitLd, TSV110UnitLd]> {
  268. let Latency = 10;
  269. let NumMicroOps = 8;
  270. }
  271. // Branch Instructions
  272. // -----------------------------------------------------------------------------
  273. def : InstRW<[TSV110Wr_1cyc_1AB], (instrs B)>;
  274. def : InstRW<[TSV110Wr_1cyc_1AB], (instrs BL)>;
  275. def : InstRW<[TSV110Wr_1cyc_1AB], (instrs BLR)>;
  276. def : InstRW<[TSV110Wr_1cyc_1AB], (instregex "^(BR|RET|(CBZ|CBNZ|TBZ|TBNZ))$")>;
  277. // Cryptography Extensions
  278. // -----------------------------------------------------------------------------
  279. def : InstRW<[TSV110Wr_3cyc_1FSU1], (instregex "^AES[DE]")>;
  280. def : InstRW<[TSV110Wr_3cyc_1FSU1], (instregex "^AESI?MC")>;
  281. def : InstRW<[TSV110Wr_2cyc_1FSU1], (instregex "^SHA1SU1")>;
  282. def : InstRW<[TSV110Wr_2cyc_2F], (instregex "^SHA1(H|SU0)")>;
  283. def : InstRW<[TSV110Wr_5cyc_1FSU1], (instregex "^SHA1[CMP]")>;
  284. def : InstRW<[TSV110Wr_2cyc_1FSU1], (instregex "^SHA256SU0")>;
  285. def : InstRW<[TSV110Wr_3cyc_1FSU1], (instregex "^SHA256SU1")>;
  286. def : InstRW<[TSV110Wr_5cyc_1FSU1], (instregex "^SHA256(H|H2)")>;
  287. def TSV110ReadCRC: SchedReadAdvance<1, [TSV110Wr_2cyc_1MDU]>;
  288. def : InstRW<[TSV110Wr_2cyc_1MDU, TSV110ReadCRC], (instregex "^CRC32.*$")>;
  289. // Arithmetic and Logical Instructions
  290. // -----------------------------------------------------------------------------
  291. def : InstRW<[TSV110Wr_1cyc_1ALUAB], (instregex "(BIC|EON|ORN)[WX]rr")>;
  292. def : InstRW<[TSV110Wr_1cyc_1AB], (instregex "(BIC)S[WX]rr")>;
  293. def : InstRW<[TSV110Wr_1cyc_1ALUAB], (instregex "(ADD|AND|EOR|ORR|SUB)[WX]r(r|i)")>;
  294. def : InstRW<[TSV110Wr_1cyc_1AB], (instregex "(ADD|AND|EOR|ORR|SUB)S[WX]r(r|i)")>;
  295. def : InstRW<[TSV110Wr_1cyc_1ALUAB], (instregex "^(ADC|SBC|BIC)[WX]r$")>;
  296. def : InstRW<[TSV110Wr_1cyc_1AB], (instregex "^(ADC|SBC)S[WX]r$")>;
  297. // Shifted Register with Shift == 0
  298. // ----------------------------------------------------------------------------
  299. def TSV110WrISReg : SchedWriteVariant<[
  300. SchedVar<RegShiftedPred, [WriteISReg]>,
  301. SchedVar<NoSchedPred, [WriteI]>]>;
  302. def : InstRW<[TSV110WrISReg], (instregex "^(ADD|AND|BIC|EON|EOR|ORN|ORR|SUB)[WX]rs$")>;
  303. def TSV110WrISRegBr : SchedWriteVariant<[
  304. SchedVar<RegShiftedPred, [TSV110Wr_2cyc_1AB]>,
  305. SchedVar<NoSchedPred, [WriteBr]>]>;
  306. def : InstRW<[TSV110WrISRegBr], (instregex "^(ADD|AND|BIC|EON|EOR|ORN|ORR|SUB)S[WX]rs$")>;
  307. // Extended Register with Extend == 0
  308. // ----------------------------------------------------------------------------
  309. def TSV110WrIEReg : SchedWriteVariant<[
  310. SchedVar<RegExtendedPred, [WriteISReg]>,
  311. SchedVar<NoSchedPred, [WriteI]>]>;
  312. def : InstRW<[TSV110WrIEReg], (instregex "^(ADD|SUB)[WX]r(x|x64)$")>;
  313. def TSV110WrIERegBr : SchedWriteVariant<[
  314. SchedVar<RegExtendedPred, [TSV110Wr_2cyc_1AB]>,
  315. SchedVar<NoSchedPred, [WriteBr]>]>;
  316. def : InstRW<[TSV110WrIERegBr], (instregex "^(ADD|SUB)S[WX]r(x|x64)$")>;
  317. def : InstRW<[TSV110Wr_1cyc_1AB], (instregex "^(CCMN|CCMP)(W|X)(r|i)$")>;
  318. def : InstRW<[TSV110Wr_1cyc_1ALUAB], (instregex "^(CSEL|CSINC|CSINV|CSNEG)(W|X)r$")>;
  319. // Move and Shift Instructions
  320. // -----------------------------------------------------------------------------
  321. def : InstRW<[TSV110Wr_1cyc_1ALUAB], (instrs ADR, ADRP)>;
  322. def : InstRW<[TSV110Wr_1cyc_1ALUAB], (instregex "^MOV[NZK][WX]i")>;
  323. def : InstRW<[TSV110Wr_1cyc_1ALUAB], (instregex "(LSLV|LSRV|ASRV|RORV)(W|X)r")>;
  324. // Divide and Multiply Instructions
  325. // -----------------------------------------------------------------------------
  326. def : InstRW<[TSV110Wr_12cyc_1MDU], (instregex "^(S|U)DIVWr$")>;
  327. def : InstRW<[TSV110Wr_20cyc_1MDU], (instregex "^(S|U)DIVXr$")>;
  328. def TSV110ReadMAW : SchedReadAdvance<2, [TSV110Wr_3cyc_1MDU]>;
  329. def : InstRW<[TSV110Wr_3cyc_1MDU, TSV110ReadMAW], (instrs MADDWrrr, MSUBWrrr)>;
  330. def TSV110ReadMAQ : SchedReadAdvance<3, [TSV110Wr_4cyc_1MDU]>;
  331. def : InstRW<[TSV110Wr_4cyc_1MDU, TSV110ReadMAQ], (instrs MADDXrrr, MSUBXrrr)>;
  332. def : InstRW<[TSV110Wr_3cyc_1MDU, TSV110ReadMAW], (instregex "(S|U)(MADDL|MSUBL)rrr")>;
  333. def : InstRW<[TSV110Wr_4cyc_1MDU], (instregex "^(S|U)MULHrr$")>;
  334. // Miscellaneous Data-Processing Instructions
  335. // -----------------------------------------------------------------------------
  336. def : InstRW<[TSV110Wr_1cyc_1ALUAB], (instregex "^EXTR(W|X)rri$")>;
  337. def : InstRW<[TSV110Wr_1cyc_1ALUAB], (instregex "^(S|U)?BFM(W|X)ri$")>;
  338. def : InstRW<[TSV110Wr_1cyc_1ALUAB], (instregex "^(CLS|CLZ|RBIT|REV(16|32)?)(W|X)r$")>;
  339. // Load Instructions
  340. // -----------------------------------------------------------------------------
  341. def : InstRW<[TSV110Wr_4cyc_1LdSt], (instregex "^LDR(W|X)l$")>;
  342. def : InstRW<[TSV110Wr_4cyc_1LdSt], (instrs LDRSWl)>;
  343. def : InstRW<[TSV110Wr_4cyc_1LdSt], (instregex "^LDR(BB|HH|W|X)ui$")>;
  344. def : InstRW<[TSV110Wr_4cyc_1LdSt], (instregex "^LDRS(BW|BX|HW|HX|W)ui$")>;
  345. def : InstRW<[TSV110Wr_4cyc_1LdSt, WriteAdr], (instregex "^LDR(BB|HH|W|X)(post|pre)$")>;
  346. def : InstRW<[TSV110Wr_4cyc_1LdSt, WriteAdr], (instregex "^LDRS(BW|BX|HW|HX|W)(post|pre)$")>;
  347. def : InstRW<[TSV110Wr_4cyc_1LdSt], (instregex "^LDTR(B|H|W|X)i$")>;
  348. def : InstRW<[TSV110Wr_4cyc_1LdSt], (instregex "^LDUR(BB|HH|W|X)i$")>;
  349. def : InstRW<[TSV110Wr_4cyc_1LdSt], (instregex "^LDTRS(BW|BX|HW|HX|W)i$")>;
  350. def : InstRW<[TSV110Wr_4cyc_1LdSt], (instregex "^LDURS(BW|BX|HW|HX|W)i$")>;
  351. def : InstRW<[TSV110Wr_4cyc_1LdSt, WriteLDHi], (instregex "^LDNP(W|X)i$")>;
  352. def : InstRW<[TSV110Wr_4cyc_1LdSt, WriteLDHi], (instregex "^LDP(W|X)i$")>;
  353. def : InstRW<[TSV110Wr_4cyc_1LdSt_1ALUAB, WriteLDHi, WriteAdr],(instregex "^LDP(W|X)(post|pre)$")>;
  354. def : InstRW<[TSV110Wr_4cyc_1LdSt, WriteLDHi], (instrs LDPSWi)>;
  355. def : InstRW<[TSV110Wr_4cyc_1LdSt, WriteLDHi, WriteAdr], (instrs LDPSWpost)>;
  356. def : InstRW<[TSV110Wr_4cyc_1LdSt, WriteLDHi, WriteAdr], (instrs LDPSWpre)>;
  357. def : InstRW<[TSV110Wr_4cyc_1LdSt], (instrs PRFMl)>;
  358. def : InstRW<[TSV110Wr_4cyc_1LdSt], (instrs PRFUMi)>;
  359. def : InstRW<[TSV110Wr_4cyc_1LdSt], (instregex "^PRFMui$")>;
  360. def : InstRW<[TSV110Wr_4cyc_1LdSt], (instregex "^PRFMro(W|X)$")>;
  361. // Store Instructions
  362. // -----------------------------------------------------------------------------
  363. def : InstRW<[TSV110Wr_1cyc_1LdSt], (instregex "^STN?P(W|X)i$")>;
  364. def : InstRW<[TSV110Wr_1cyc_1LdSt, WriteAdr], (instregex "^STP(W|X)(post|pre)$")>;
  365. def : InstRW<[TSV110Wr_1cyc_1LdSt], (instregex "^STUR(BB|HH|W|X)i$")>;
  366. def : InstRW<[TSV110Wr_1cyc_1LdSt], (instregex "^STTR(B|H|W|X)i$")>;
  367. def : InstRW<[TSV110Wr_1cyc_1LdSt], (instregex "^STR(BB|HH|W|X)ui$")>;
  368. def : InstRW<[TSV110Wr_1cyc_1LdSt, WriteAdr], (instregex "^STR(BB|HH|W|X)(post|pre)$")>;
  369. def : InstRW<[TSV110Wr_1cyc_1LdSt, WriteAdr], (instregex "^STR(BB|HH|W|X)ro(W|X)$")>;
  370. // FP Data Processing Instructions
  371. // -----------------------------------------------------------------------------
  372. def : InstRW<[TSV110Wr_2cyc_1F], (instregex "F(ABS|NEG)(D|S)r")>;
  373. def : InstRW<[TSV110Wr_3cyc_1F], (instregex "^FCCMP(E)?(S|D)rr$")>;
  374. def : InstRW<[TSV110Wr_3cyc_1F], (instregex "^FCMP(E)?(S|D)r(r|i)$")>;
  375. def : InstRW<[TSV110Wr_3cyc_1F], (instregex "^FCSEL(S|D)rrr$")>;
  376. def : InstRW<[TSV110Wr_11cyc_1FSU1], (instrs FDIVSrr)>;
  377. def : InstRW<[TSV110Wr_18cyc_1FSU1], (instrs FDIVDrr)>;
  378. def : InstRW<[TSV110Wr_17cyc_1FSU2], (instrs FSQRTSr)>;
  379. def : InstRW<[TSV110Wr_31cyc_1FSU2], (instrs FSQRTDr)>;
  380. def : InstRW<[TSV110Wr_2cyc_1F], (instregex "^F(MAX|MIN).+rr")>;
  381. def : InstRW<[TSV110Wr_4cyc_1F], (instregex "^FN?M(ADD|SUB)Hrrr")>;
  382. def : InstRW<[TSV110Wr_5cyc_1F], (instregex "^FN?M(ADD|SUB)Srrr")>;
  383. def : InstRW<[TSV110Wr_7cyc_1F], (instregex "^FN?M(ADD|SUB)Drrr")>;
  384. def : InstRW<[TSV110Wr_4cyc_1F], (instregex "^F(ADD|SUB)Hrr")>;
  385. def : InstRW<[TSV110Wr_5cyc_1F], (instregex "^F(ADD|SUB)Srr")>;
  386. def : InstRW<[TSV110Wr_4cyc_1F], (instregex "^F(ADD|SUB)Drr")>;
  387. def : InstRW<[TSV110Wr_4cyc_1F], (instregex "^F(N)?MULHrr$")>;
  388. def : InstRW<[TSV110Wr_5cyc_1F], (instregex "^F(N)?MULSrr$")>;
  389. def : InstRW<[TSV110Wr_5cyc_1F], (instregex "^F(N)?MULDrr$")>;
  390. def : InstRW<[TSV110Wr_3cyc_1F], (instregex "^FRINT.+r")>;
  391. // FP Miscellaneous Instructions
  392. // -----------------------------------------------------------------------------
  393. def : InstRW<[TSV110Wr_5cyc_1ALU_1F], (instregex "^[SU]CVTF[SU][WX][SD]ri")>;
  394. def : InstRW<[TSV110Wr_4cyc_1FSU1], (instregex "^FCVT(A|M|N|P|Z)(S|U)U(W|X)(S|D)r$")>;
  395. def : InstRW<[TSV110Wr_3cyc_1F], (instregex "^FCVT[HSD][HSD]r")>;
  396. def : InstRW<[TSV110Wr_2cyc_1FSU1], (instregex "^FMOV(DX|WS|XD|SW|DXHigh|XDHigh)r$")>;
  397. def : InstRW<[TSV110Wr_2cyc_1F], (instregex "^FMOV[SD][ir]$")>;
  398. // FP Load Instructions
  399. // -----------------------------------------------------------------------------
  400. def : InstRW<[TSV110Wr_5cyc_1LdSt], (instregex "^LDR[DSQ]l")>;
  401. def : InstRW<[TSV110Wr_5cyc_1LdSt], (instregex "^LDUR[BDHSQ]i")>;
  402. def : InstRW<[TSV110Wr_5cyc_1LdSt, WriteAdr], (instregex "^LDR[BDHSQ](post|pre)")>;
  403. def : InstRW<[TSV110Wr_5cyc_1LdSt], (instregex "^LDR[BDHSQ]ui")>;
  404. def : InstRW<[TSV110Wr_6cyc_1LdSt_1ALUAB, ReadAdrBase], (instregex "^LDR(Q|D|H|S|B)ro(W|X)$")>;
  405. def : InstRW<[TSV110Wr_5cyc_1LdSt, WriteLDHi], (instregex "^LDN?P[DQS]i")>;
  406. def : InstRW<[TSV110Wr_5cyc_1LdSt, WriteLDHi, WriteAdr], (instregex "^LDP[DQS](post|pre)")>;
  407. // FP Store Instructions
  408. // -----------------------------------------------------------------------------
  409. def : InstRW<[TSV110Wr_1cyc_1LdSt], (instregex "^STUR[BHSDQ]i")>;
  410. def : InstRW<[TSV110Wr_1cyc_1LdSt_1ALUAB, ReadAdrBase], (instregex "^STR[BHSDQ](post|pre)")>;
  411. def : InstRW<[TSV110Wr_1cyc_1LdSt], (instregex "^STR[BHSDQ]ui")>;
  412. def : InstRW<[TSV110Wr_2cyc_1LdSt_1ALUAB, ReadAdrBase], (instregex "^STR[BHSDQ]ro[WX]")>;
  413. def : InstRW<[TSV110Wr_2cyc_2LdSt], (instregex "^STN?P[SDQ]i")>;
  414. def : InstRW<[TSV110Wr_2cyc_2LdSt, WriteAdr], (instregex "^STP[SDQ](post|pre)")>;
  415. // ASIMD Integer Instructions
  416. // -----------------------------------------------------------------------------
  417. // Reference for forms in this group
  418. // D form - v8i8, v4i16, v2i32
  419. // Q form - v16i8, v8i16, v4i32
  420. // D form - v1i8, v1i16, v1i32, v1i64
  421. // Q form - v16i8, v8i16, v4i32, v2i64
  422. // D form - v8i8_v8i16, v4i16_v4i32, v2i32_v2i64
  423. // Q form - v16i8_v8i16, v8i16_v4i32, v4i32_v2i64
  424. // ASIMD simple arithmetic
  425. def : InstRW<[TSV110Wr_2cyc_1FSU1_1FSU2], (instregex "^(ABS|ADD(P)?|NEG|SUB)v")>;
  426. def : InstRW<[TSV110Wr_2cyc_1FSU1_1FSU2], (instregex "^[SU](ADD(L|LP|W)|SUB(L|W))v")>;
  427. // ASIMD complex arithmetic
  428. def : InstRW<[TSV110Wr_4cyc_1FSU1_1FSU2], (instregex "^[SU]H(ADD|SUB)v")>;
  429. def : InstRW<[TSV110Wr_4cyc_1FSU1_1FSU2], (instregex "^R?(ADD|SUB)HN2?v")>;
  430. def : InstRW<[TSV110Wr_4cyc_1FSU1_1FSU2], (instregex "^[SU]Q(ADD|SUB)v")>;
  431. def : InstRW<[TSV110Wr_4cyc_1FSU1_1FSU2], (instregex "^(SU|US)QADDv")>;
  432. def : InstRW<[TSV110Wr_4cyc_1FSU1_1FSU2], (instregex "^[SU]RHADDv")>;
  433. def : InstRW<[TSV110Wr_4cyc_1FSU1_1FSU2], (instregex "^[SU]ABAL?v")>;
  434. def : InstRW<[TSV110Wr_4cyc_1FSU1_1FSU2], (instregex "^[SU]ABDL?v")>;
  435. def : InstRW<[TSV110Wr_4cyc_1FSU1_1FSU2], (instregex "^[SU]ADALPv")>;
  436. def : InstRW<[TSV110Wr_4cyc_1FSU1_1FSU2], (instregex "^((SQ)(ABS|NEG))v")>;
  437. // ASIMD compare
  438. def : InstRW<[TSV110Wr_2cyc_1FSU1_1FSU2], (instregex "^CM(EQ|GE|GT|HI|HS|LE|LT|TST)v")>;
  439. // ASIMD max/min
  440. def : InstRW<[TSV110Wr_2cyc_1FSU1_1FSU2], (instregex "^[SU](MIN|MAX)P?v")>;
  441. // ASIMD logical
  442. def : InstRW<[TSV110Wr_2cyc_1FSU1_1FSU2], (instregex "^(AND|BIC|BIF|BIT|BSL|EOR|MVN|NOT|ORN|ORR)v")>;
  443. // ASIMD multiply accumulate, D-form
  444. def : InstRW<[TSV110Wr_4cyc_1FSU1], (instregex "^(MUL|ML[AS]|SQR?D(MULH))(v8i8|v4i16|v2i32|v1i8|v1i16|v1i32|v1i64)")>;
  445. // ASIMD multiply accumulate, Q-form
  446. def : InstRW<[TSV110Wr_8cyc_2FSU1], (instregex "^(MUL|ML[AS]|SQR?D(MULH))(v16i8|v8i16|v4i32)")>;
  447. // ASIMD multiply accumulate long
  448. def : InstRW<[TSV110Wr_4cyc_1FSU1], (instregex "(S|U|SQD)(MLAL|MLSL|MULL)v.*")>;
  449. def : InstRW<[TSV110Wr_2cyc_1FSU1], (instregex "^PMULL(v8i8|v16i8)")>;
  450. def : InstRW<[TSV110Wr_2cyc_1FSU1], (instregex "^PMULL(v1i64|v2i64)")>;
  451. // ASIMD shift
  452. // ASIMD shift accumulate
  453. def : InstRW<[TSV110Wr_4cyc_1FSU1], (instregex "^(S|SR|U|UR)SRA")>;
  454. // ASIMD shift by immed, basic
  455. def : InstRW<[TSV110Wr_4cyc_1FSU1],
  456. (instregex "SHLv","SLIv","SRIv","SHRNv","SQXTNv","SQXTUNv","UQXTNv")>;
  457. // ASIMD shift by immed, complex
  458. def : InstRW<[TSV110Wr_4cyc_1FSU1], (instregex "^[SU]?(Q|R){1,2}SHR")>;
  459. def : InstRW<[TSV110Wr_4cyc_1FSU1], (instregex "^SQSHLU")>;
  460. // ASIMD shift by register, basic, Q-form
  461. def : InstRW<[TSV110Wr_4cyc_1FSU1], (instregex "^[SU]SHL(v16i8|v8i16|v4i32|v2i64)")>;
  462. // ASIMD shift by register, complex, D-form
  463. def : InstRW<[TSV110Wr_4cyc_1FSU1], (instregex "^[SU][QR]{1,2}SHL(v1i8|v1i16|v1i32|v1i64|v8i8|v4i16|v2i32|b|d|h|s)")>;
  464. // ASIMD shift by register, complex, Q-form
  465. def : InstRW<[TSV110Wr_4cyc_1FSU1], (instregex "^[SU][QR]{1,2}SHL(v16i8|v8i16|v4i32|v2i64)")>;
  466. // ASIMD reduction
  467. // ASIMD arith, reduce, 4H/4S
  468. def : InstRW<[TSV110Wr_4cyc_1FSU1_1FSU2], (instregex "^[SU]?ADDL?V(v8i8|v4i16|v2i32)v$")>;
  469. // ASIMD arith, reduce, 8B/8H
  470. def : InstRW<[TSV110Wr_8cyc_1FSU1_1FSU2], (instregex "^[SU]?ADDL?V(v8i16|v4i32)v$")>;
  471. // ASIMD arith, reduce, 16B
  472. def : InstRW<[TSV110Wr_8cyc_1FSU1_1FSU2], (instregex "^[SU]?ADDL?Vv16i8v$")>;
  473. // ASIMD max/min, reduce, 4H/4S
  474. def : InstRW<[TSV110Wr_4cyc_1FSU1_1FSU2], (instregex "^[SU](MIN|MAX)V(v4i16|v4i32)v$")>;
  475. // ASIMD max/min, reduce, 8B/8H
  476. def : InstRW<[TSV110Wr_8cyc_1FSU1_1FSU2], (instregex "^[SU](MIN|MAX)V(v8i8|v8i16)v$")>;
  477. // ASIMD max/min, reduce, 16B
  478. def : InstRW<[TSV110Wr_8cyc_1FSU1_1FSU2], (instregex "^[SU](MIN|MAX)Vv16i8v$")>;
  479. // Vector - Floating Point
  480. // -----------------------------------------------------------------------------
  481. // Reference for forms in this group
  482. // D form - v2f32
  483. // Q form - v4f32, v2f64
  484. // D form - 32, 64
  485. // D form - v1i32, v1i64
  486. // D form - v2i32
  487. // Q form - v4i32, v2i64
  488. // ASIMD FP sign manipulation
  489. def : InstRW<[TSV110Wr_2cyc_1F], (instregex "^FABSv")>;
  490. def : InstRW<[TSV110Wr_2cyc_1F], (instregex "^FNEGv")>;
  491. // ASIMD FP compare
  492. def : InstRW<[TSV110Wr_2cyc_1F], (instregex "^F(AC|CM)(EQ|GE|GT|LE|LT)v")>;
  493. // ASIMD FP convert
  494. def : InstRW<[TSV110Wr_2cyc_1F], (instregex "^FCVT[AMNPZ][SU]v")>;
  495. def : InstRW<[TSV110Wr_3cyc_1F], (instregex "^FCVT(L)v")>;
  496. def : InstRW<[TSV110Wr_5cyc_1F], (instregex "^FCVT(N|XN)v")>;
  497. // ASIMD FP divide, D-form, F32
  498. def : InstRW<[TSV110Wr_11cyc_1FSU1], (instregex "FDIVv2f32")>;
  499. // ASIMD FP divide, Q-form, F32
  500. def : InstRW<[TSV110Wr_24cyc_1FSU1], (instregex "FDIVv4f32")>;
  501. // ASIMD FP divide, Q-form, F64
  502. def : InstRW<[TSV110Wr_38cyc_1FSU1], (instregex "FDIVv2f64")>;
  503. // ASIMD FP SQRT
  504. def : InstRW<[TSV110Wr_17cyc_1FSU2], (instrs FSQRTv2f32)>;
  505. def : InstRW<[TSV110Wr_36cyc_1FSU2], (instrs FSQRTv4f32)>;
  506. def : InstRW<[TSV110Wr_64cyc_1FSU2], (instrs FSQRTv2f64)>;
  507. // ASIMD FP max,min
  508. def : InstRW<[TSV110Wr_2cyc_1F], (instregex "^F(MAX|MIN)(NM)?v")>;
  509. def : InstRW<[TSV110Wr_2cyc_1F], (instregex "^F(MAX|MIN)(NM)?Pv")>;
  510. def : InstRW<[TSV110Wr_4cyc_1F], (instregex "^F(MAX|MIN)(NM)?Vv")>;
  511. // ASIMD FP add
  512. def : InstRW<[TSV110Wr_5cyc_1F], (instregex "^F(ADD|ADDP|SUB)v")>;
  513. // ASIMD FP multiply
  514. def : InstRW<[TSV110Wr_5cyc_1F], (instregex "^FMULX?v")>;
  515. // ASIMD Miscellaneous Instructions
  516. // -----------------------------------------------------------------------------
  517. def : InstRW<[TSV110Wr_2cyc_1FSU1_1FSU2], (instregex "^(CLS|CLZ|CNT)v")>;
  518. def : InstRW<[TSV110Wr_2cyc_1FSU1_1FSU2], (instregex "^(DUP|INS)v.+lane")>;
  519. def : InstRW<[TSV110Wr_2cyc_1FSU1_1FSU2], (instregex "^REV(16|32|64)v")>;
  520. def : InstRW<[TSV110Wr_2cyc_1FSU1_1FSU2], (instregex "^(UZP|ZIP)[12]v")>;
  521. def : InstRW<[TSV110Wr_2cyc_1FSU1_1FSU2], (instregex "^EXTv")>;
  522. def : InstRW<[TSV110Wr_2cyc_1FSU1_1FSU2], (instregex "^XTNv")>;
  523. def : InstRW<[TSV110Wr_2cyc_1FSU1_1FSU2], (instregex "^RBITv")>;
  524. def : InstRW<[TSV110Wr_4cyc_1F], (instregex "^(INS|DUP)v.+gpr")>;
  525. def : InstRW<[TSV110Wr_3cyc_1FSU1], (instregex "^[SU]MOVv")>;
  526. // ASIMD table lookup, D-form
  527. def : InstRW<[TSV110Wr_2cyc_1F], (instregex "^TB[LX]v8i8One")>;
  528. def : InstRW<[TSV110Wr_4cyc_2F], (instregex "^TB[LX]v8i8Two")>;
  529. def : InstRW<[TSV110Wr_6cyc_3F], (instregex "^TB[LX]v8i8Three")>;
  530. def : InstRW<[TSV110Wr_8cyc_4F], (instregex "^TB[LX]v8i8Four")>;
  531. // ASIMD table lookup, Q-form
  532. def : InstRW<[TSV110Wr_2cyc_1F], (instregex "^TB[LX]v16i8One")>;
  533. def : InstRW<[TSV110Wr_4cyc_2F], (instregex "^TB[LX]v16i8Two")>;
  534. def : InstRW<[TSV110Wr_6cyc_3F], (instregex "^TB[LX]v16i8Three")>;
  535. def : InstRW<[TSV110Wr_8cyc_4F], (instregex "^TB[LX]v16i8Four")>;
  536. def : InstRW<[TSV110Wr_2cyc_1F], (instregex "^FMOVv")>;
  537. def : InstRW<[TSV110Wr_3cyc_1F], (instregex "^FRINT[AIMNPXZ]v")>;
  538. def : InstRW<[TSV110Wr_3cyc_1F], (instregex "^[SU]CVTFv")>;
  539. def : InstRW<[TSV110Wr_3cyc_1F], (instregex "^[FU](RECP|RSQRT)(E|X)v")>;
  540. // ASIMD Load Instructions
  541. // -----------------------------------------------------------------------------
  542. def : InstRW<[TSV110Wr_7cyc_1F_1LdSt], (instregex "^LD1Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  543. def : InstRW<[TSV110Wr_7cyc_1F_1LdSt, WriteAdr], (instregex "^LD1Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  544. def : InstRW<[TSV110Wr_7cyc_2F_1LdSt], (instregex "^LD2Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  545. def : InstRW<[TSV110Wr_7cyc_2F_1LdSt, WriteAdr], (instregex "^LD2Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  546. def : InstRW<[TSV110Wr_8cyc_3F_1LdSt], (instregex "^LD3Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  547. def : InstRW<[TSV110Wr_8cyc_3F_1LdSt, WriteAdr], (instregex "^LD3Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  548. def : InstRW<[TSV110Wr_8cyc_3F_2LdSt], (instregex "^LD4Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  549. def : InstRW<[TSV110Wr_8cyc_3F_2LdSt, WriteAdr], (instregex "^LD4Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  550. def : InstRW<[TSV110Wr_7cyc_1F_1LdSt], (instregex "LD1i(8|16|32|64)$")>;
  551. def : InstRW<[TSV110Wr_7cyc_1F_1LdSt, WriteAdr], (instregex "LD1i(8|16|32|64)_POST$")>;
  552. def : InstRW<[TSV110Wr_7cyc_2F_1LdSt], (instregex "LD2i(8|16|32|64)$")>;
  553. def : InstRW<[TSV110Wr_7cyc_2F_1LdSt, WriteAdr], (instregex "LD2i(8|16|32|64)_POST$")>;
  554. def : InstRW<[TSV110Wr_8cyc_3F_1LdSt], (instregex "LD3i(8|16|32|64)$")>;
  555. def : InstRW<[TSV110Wr_8cyc_3F_1LdSt, WriteAdr], (instregex "LD3i(8|16|32|64)_POST$")>;
  556. def : InstRW<[TSV110Wr_8cyc_3F_2LdSt], (instregex "LD4i(8|16|32|64)$")>;
  557. def : InstRW<[TSV110Wr_8cyc_3F_2LdSt, WriteAdr], (instregex "LD4i(8|16|32|64)_POST$")>;
  558. def : InstRW<[TSV110Wr_5cyc_1LdSt], (instregex "^LD1Onev(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  559. def : InstRW<[TSV110Wr_5cyc_1LdSt, WriteAdr], (instregex "^LD1Onev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  560. def : InstRW<[TSV110Wr_5cyc_1LdSt], (instregex "^LD1Twov(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  561. def : InstRW<[TSV110Wr_5cyc_1LdSt, WriteAdr], (instregex "^LD1Twov(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  562. def : InstRW<[TSV110Wr_6cyc_3LdSt], (instregex "^LD1Threev(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  563. def : InstRW<[TSV110Wr_6cyc_3LdSt, WriteAdr], (instregex "^LD1Threev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  564. def : InstRW<[TSV110Wr_6cyc_2LdSt], (instregex "^LD1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  565. def : InstRW<[TSV110Wr_6cyc_2LdSt, WriteAdr], (instregex "^LD1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  566. def : InstRW<[TSV110Wr_7cyc_2F_1LdSt], (instregex "^LD2Twov(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  567. def : InstRW<[TSV110Wr_7cyc_2F_1LdSt, WriteAdr], (instregex "^LD2Twov(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  568. def : InstRW<[TSV110Wr_8cyc_3F_1LdSt], (instregex "^LD3Threev(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  569. def : InstRW<[TSV110Wr_8cyc_3F_1LdSt, WriteAdr], (instregex "^LD3Threev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  570. def : InstRW<[TSV110Wr_10cyc_4F_4LdSt], (instregex "^LD4Fourv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  571. def : InstRW<[TSV110Wr_10cyc_4F_4LdSt, WriteAdr], (instregex "^LD4Fourv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  572. // ASIMD Store Instructions
  573. // -----------------------------------------------------------------------------
  574. def : InstRW<[TSV110Wr_3cyc_1F], (instregex "ST1i(8|16|32|64)$")>;
  575. def : InstRW<[TSV110Wr_3cyc_1F, WriteAdr], (instregex "ST1i(8|16|32|64)_POST$")>;
  576. def : InstRW<[TSV110Wr_4cyc_1F], (instregex "ST2i(8|16|32|64)$")>;
  577. def : InstRW<[TSV110Wr_4cyc_1F, WriteAdr], (instregex "ST2i(8|16|32|64)_POST$")>;
  578. def : InstRW<[TSV110Wr_5cyc_1F], (instregex "ST3i(8|16|32|64)$")>;
  579. def : InstRW<[TSV110Wr_5cyc_1F, WriteAdr], (instregex "ST3i(8|16|32|64)_POST$")>;
  580. def : InstRW<[TSV110Wr_6cyc_1F], (instregex "ST4i(8|16|32|64)$")>;
  581. def : InstRW<[TSV110Wr_6cyc_1F, WriteAdr], (instregex "ST4i(8|16|32|64)_POST$")>;
  582. def : InstRW<[TSV110Wr_3cyc_1F], (instregex "^ST1Onev(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  583. def : InstRW<[TSV110Wr_3cyc_1F, WriteAdr], (instregex "^ST1Onev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  584. def : InstRW<[TSV110Wr_4cyc_1F], (instregex "^ST1Twov(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  585. def : InstRW<[TSV110Wr_4cyc_1F, WriteAdr], (instregex "^ST1Twov(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  586. def : InstRW<[TSV110Wr_5cyc_1F], (instregex "^ST1Threev(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  587. def : InstRW<[TSV110Wr_5cyc_1F, WriteAdr], (instregex "^ST1Threev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  588. def : InstRW<[TSV110Wr_6cyc_1F], (instregex "^ST1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  589. def : InstRW<[TSV110Wr_6cyc_1F, WriteAdr], (instregex "^ST1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  590. def : InstRW<[TSV110Wr_4cyc_1F], (instregex "^ST2Twov(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  591. def : InstRW<[TSV110Wr_4cyc_1F, WriteAdr], (instregex "^ST2Twov(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  592. def : InstRW<[TSV110Wr_5cyc_1F], (instregex "^ST3Threev(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  593. def : InstRW<[TSV110Wr_5cyc_1F, WriteAdr], (instregex "^ST3Threev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  594. def : InstRW<[TSV110Wr_8cyc_1F], (instregex "^ST4Fourv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  595. def : InstRW<[TSV110Wr_8cyc_1F, WriteAdr], (instregex "^ST4Fourv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  596. } // SchedModel = TSV110Model