AArch64SchedA55.td 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. //==- AArch64SchedCortexA55.td - ARM Cortex-A55 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 the ARM Cortex-A55 processors.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. // ===---------------------------------------------------------------------===//
  13. // The following definitions describe the per-operand machine model.
  14. // This works with MachineScheduler. See MCSchedModel.h for details.
  15. // Cortex-A55 machine model for scheduling and other instruction cost heuristics.
  16. def CortexA55Model : SchedMachineModel {
  17. let MicroOpBufferSize = 0; // The Cortex-A55 is an in-order processor
  18. let IssueWidth = 2; // It dual-issues under most circumstances
  19. let LoadLatency = 4; // Cycles for loads to access the cache. The
  20. // optimisation guide shows that most loads have
  21. // a latency of 3, but some have a latency of 4
  22. // or 5. Setting it 4 looked to be good trade-off.
  23. let MispredictPenalty = 8; // A branch direction mispredict.
  24. let PostRAScheduler = 1; // Enable PostRA scheduler pass.
  25. let CompleteModel = 0; // Covers instructions applicable to Cortex-A55.
  26. list<Predicate> UnsupportedFeatures = [HasSVE];
  27. // FIXME: Remove when all errors have been fixed.
  28. let FullInstRWOverlapCheck = 0;
  29. }
  30. //===----------------------------------------------------------------------===//
  31. // Define each kind of processor resource and number available.
  32. // Modeling each pipeline as a ProcResource using the BufferSize = 0 since the
  33. // Cortex-A55 is in-order.
  34. def CortexA55UnitALU : ProcResource<2> { let BufferSize = 0; } // Int ALU
  35. def CortexA55UnitMAC : ProcResource<1> { let BufferSize = 0; } // Int MAC, 64-bi wide
  36. def CortexA55UnitDiv : ProcResource<1> { let BufferSize = 0; } // Int Division, not pipelined
  37. def CortexA55UnitLd : ProcResource<1> { let BufferSize = 0; } // Load pipe
  38. def CortexA55UnitSt : ProcResource<1> { let BufferSize = 0; } // Store pipe
  39. def CortexA55UnitB : ProcResource<1> { let BufferSize = 0; } // Branch
  40. // The FP DIV/SQRT instructions execute totally differently from the FP ALU
  41. // instructions, which can mostly be dual-issued; that's why for now we model
  42. // them with 2 resources.
  43. def CortexA55UnitFPALU : ProcResource<2> { let BufferSize = 0; } // FP ALU
  44. def CortexA55UnitFPMAC : ProcResource<2> { let BufferSize = 0; } // FP MAC
  45. def CortexA55UnitFPDIV : ProcResource<1> { let BufferSize = 0; } // FP Div/SQRT, 64/128
  46. //===----------------------------------------------------------------------===//
  47. // Subtarget-specific SchedWrite types
  48. let SchedModel = CortexA55Model in {
  49. // These latencies are modeled without taking into account forwarding paths
  50. // (the software optimisation guide lists latencies taking into account
  51. // typical forwarding paths).
  52. def : WriteRes<WriteImm, [CortexA55UnitALU]> { let Latency = 3; } // MOVN, MOVZ
  53. def : WriteRes<WriteI, [CortexA55UnitALU]> { let Latency = 3; } // ALU
  54. def : WriteRes<WriteISReg, [CortexA55UnitALU]> { let Latency = 3; } // ALU of Shifted-Reg
  55. def : WriteRes<WriteIEReg, [CortexA55UnitALU]> { let Latency = 3; } // ALU of Extended-Reg
  56. def : WriteRes<WriteExtr, [CortexA55UnitALU]> { let Latency = 3; } // EXTR from a reg pair
  57. def : WriteRes<WriteIS, [CortexA55UnitALU]> { let Latency = 3; } // Shift/Scale
  58. // MAC
  59. def : WriteRes<WriteIM32, [CortexA55UnitMAC]> { let Latency = 4; } // 32-bit Multiply
  60. def : WriteRes<WriteIM64, [CortexA55UnitMAC]> { let Latency = 4; } // 64-bit Multiply
  61. // Div
  62. def : WriteRes<WriteID32, [CortexA55UnitDiv]> {
  63. let Latency = 8; let ResourceCycles = [8];
  64. }
  65. def : WriteRes<WriteID64, [CortexA55UnitDiv]> {
  66. let Latency = 8; let ResourceCycles = [8];
  67. }
  68. // Load
  69. def : WriteRes<WriteLD, [CortexA55UnitLd]> { let Latency = 3; }
  70. def : WriteRes<WriteLDIdx, [CortexA55UnitLd]> { let Latency = 4; }
  71. def : WriteRes<WriteLDHi, [CortexA55UnitLd]> { let Latency = 5; }
  72. // Vector Load - Vector loads take 1-5 cycles to issue. For the WriteVecLd
  73. // below, choosing the median of 3 which makes the latency 6.
  74. // An extra cycle is needed to get the swizzling right.
  75. def : WriteRes<WriteVLD, [CortexA55UnitLd]> { let Latency = 6;
  76. let ResourceCycles = [3]; }
  77. def CortexA55WriteVLD1 : SchedWriteRes<[CortexA55UnitLd]> { let Latency = 4; }
  78. def CortexA55WriteVLD1SI : SchedWriteRes<[CortexA55UnitLd]> { let Latency = 4; let SingleIssue = 1; }
  79. def CortexA55WriteVLD2 : SchedWriteRes<[CortexA55UnitLd]> { let Latency = 5;
  80. let ResourceCycles = [2]; }
  81. def CortexA55WriteVLD3 : SchedWriteRes<[CortexA55UnitLd]> { let Latency = 6;
  82. let ResourceCycles = [3]; }
  83. def CortexA55WriteVLD4 : SchedWriteRes<[CortexA55UnitLd]> { let Latency = 7;
  84. let ResourceCycles = [4]; }
  85. def CortexA55WriteVLD5 : SchedWriteRes<[CortexA55UnitLd]> { let Latency = 8;
  86. let ResourceCycles = [5]; }
  87. def CortexA55WriteVLD6 : SchedWriteRes<[CortexA55UnitLd]> { let Latency = 9;
  88. let ResourceCycles = [6]; }
  89. def CortexA55WriteVLD7 : SchedWriteRes<[CortexA55UnitLd]> { let Latency = 10;
  90. let ResourceCycles = [7]; }
  91. def CortexA55WriteVLD8 : SchedWriteRes<[CortexA55UnitLd]> { let Latency = 11;
  92. let ResourceCycles = [8]; }
  93. def CortexA55WriteLDP1 : SchedWriteRes<[]> { let Latency = 4; }
  94. def CortexA55WriteLDP2 : SchedWriteRes<[CortexA55UnitLd]> { let Latency = 5; }
  95. def CortexA55WriteLDP4 : SchedWriteRes<[CortexA55UnitLd, CortexA55UnitLd, CortexA55UnitLd, CortexA55UnitLd, CortexA55UnitLd]> { let Latency = 6; }
  96. // Pre/Post Indexing - Performed as part of address generation
  97. def : WriteRes<WriteAdr, []> { let Latency = 0; }
  98. // Store
  99. let RetireOOO = 1 in {
  100. def : WriteRes<WriteST, [CortexA55UnitSt]> { let Latency = 1; }
  101. def : WriteRes<WriteSTP, [CortexA55UnitSt]> { let Latency = 1; }
  102. def : WriteRes<WriteSTIdx, [CortexA55UnitSt]> { let Latency = 1; }
  103. }
  104. def : WriteRes<WriteSTX, [CortexA55UnitSt]> { let Latency = 4; }
  105. // Vector Store - Similar to vector loads, can take 1-3 cycles to issue.
  106. def : WriteRes<WriteVST, [CortexA55UnitSt]> { let Latency = 5;
  107. let ResourceCycles = [2];}
  108. def CortexA55WriteVST1 : SchedWriteRes<[CortexA55UnitSt]> { let Latency = 4; }
  109. def CortexA55WriteVST2 : SchedWriteRes<[CortexA55UnitSt]> { let Latency = 5;
  110. let ResourceCycles = [2]; }
  111. def CortexA55WriteVST3 : SchedWriteRes<[CortexA55UnitSt]> { let Latency = 6;
  112. let ResourceCycles = [3]; }
  113. def CortexA55WriteVST4 : SchedWriteRes<[CortexA55UnitSt]> { let Latency = 5;
  114. let ResourceCycles = [4]; }
  115. def : WriteRes<WriteAtomic, []> { let Unsupported = 1; }
  116. // Branch
  117. def : WriteRes<WriteBr, [CortexA55UnitB]>;
  118. def : WriteRes<WriteBrReg, [CortexA55UnitB]>;
  119. def : WriteRes<WriteSys, [CortexA55UnitB]>;
  120. def : WriteRes<WriteBarrier, [CortexA55UnitB]>;
  121. def : WriteRes<WriteHint, [CortexA55UnitB]>;
  122. // FP ALU
  123. // As WriteF result is produced in F5 and it can be mostly forwarded
  124. // to consumer at F1, the effectively latency is set as 4.
  125. def : WriteRes<WriteF, [CortexA55UnitFPALU]> { let Latency = 4; }
  126. def : WriteRes<WriteFCmp, [CortexA55UnitFPALU]> { let Latency = 3; }
  127. def : WriteRes<WriteFCvt, [CortexA55UnitFPALU]> { let Latency = 4; }
  128. def : WriteRes<WriteFCopy, [CortexA55UnitFPALU]> { let Latency = 3; }
  129. def : WriteRes<WriteFImm, [CortexA55UnitFPALU]> { let Latency = 3; }
  130. def : WriteRes<WriteVd, [CortexA55UnitFPALU]> { let Latency = 4; }
  131. def : WriteRes<WriteVq, [CortexA55UnitFPALU,CortexA55UnitFPALU]> { let Latency = 4; let BeginGroup = 1; }
  132. // FP ALU specific new schedwrite definitions
  133. def CortexA55WriteFPALU_F2 : SchedWriteRes<[CortexA55UnitFPALU]> { let Latency = 2;}
  134. def CortexA55WriteFPALU_F3 : SchedWriteRes<[CortexA55UnitFPALU]> { let Latency = 3;}
  135. def CortexA55WriteFPALU_F4 : SchedWriteRes<[CortexA55UnitFPALU]> { let Latency = 4;}
  136. def CortexA55WriteFPALU_F5 : SchedWriteRes<[CortexA55UnitFPALU]> { let Latency = 5;}
  137. // FP Mul, Div, Sqrt. Div/Sqrt are not pipelined
  138. def : WriteRes<WriteFMul, [CortexA55UnitFPMAC]> { let Latency = 4; }
  139. let RetireOOO = 1 in {
  140. def : WriteRes<WriteFDiv, [CortexA55UnitFPDIV]> { let Latency = 22;
  141. let ResourceCycles = [29]; }
  142. def CortexA55WriteFMAC : SchedWriteRes<[CortexA55UnitFPMAC]> { let Latency = 4; }
  143. def CortexA55WriteFDivHP : SchedWriteRes<[CortexA55UnitFPDIV]> { let Latency = 8;
  144. let ResourceCycles = [5]; }
  145. def CortexA55WriteFDivSP : SchedWriteRes<[CortexA55UnitFPDIV]> { let Latency = 13;
  146. let ResourceCycles = [10]; }
  147. def CortexA55WriteFDivDP : SchedWriteRes<[CortexA55UnitFPDIV]> { let Latency = 22;
  148. let ResourceCycles = [19]; }
  149. def CortexA55WriteFSqrtHP : SchedWriteRes<[CortexA55UnitFPDIV]> { let Latency = 8;
  150. let ResourceCycles = [5]; }
  151. def CortexA55WriteFSqrtSP : SchedWriteRes<[CortexA55UnitFPDIV]> { let Latency = 12;
  152. let ResourceCycles = [9]; }
  153. def CortexA55WriteFSqrtDP : SchedWriteRes<[CortexA55UnitFPDIV]> { let Latency = 22;
  154. let ResourceCycles = [19]; }
  155. }
  156. //===----------------------------------------------------------------------===//
  157. // Subtarget-specific SchedRead types.
  158. def : ReadAdvance<ReadVLD, 0>;
  159. def : ReadAdvance<ReadExtrHi, 1>;
  160. def : ReadAdvance<ReadAdrBase, 1>;
  161. def : ReadAdvance<ReadST, 1>;
  162. // ALU - ALU input operands are generally needed in EX1. An operand produced in
  163. // in say EX2 can be forwarded for consumption to ALU in EX1, thereby
  164. // allowing back-to-back ALU operations such as add. If an operand requires
  165. // a shift, it will, however, be required in ISS stage.
  166. def : ReadAdvance<ReadI, 2, [WriteImm,WriteI,
  167. WriteISReg, WriteIEReg,WriteIS,
  168. WriteID32,WriteID64,
  169. WriteIM32,WriteIM64]>;
  170. // Shifted operand
  171. def CortexA55ReadShifted : SchedReadAdvance<1, [WriteImm,WriteI,
  172. WriteISReg, WriteIEReg,WriteIS,
  173. WriteID32,WriteID64,
  174. WriteIM32,WriteIM64]>;
  175. def CortexA55ReadNotShifted : SchedReadAdvance<2, [WriteImm,WriteI,
  176. WriteISReg, WriteIEReg,WriteIS,
  177. WriteID32,WriteID64,
  178. WriteIM32,WriteIM64]>;
  179. def CortexA55ReadISReg : SchedReadVariant<[
  180. SchedVar<RegShiftedPred, [CortexA55ReadShifted]>,
  181. SchedVar<NoSchedPred, [CortexA55ReadNotShifted]>]>;
  182. def : SchedAlias<ReadISReg, CortexA55ReadISReg>;
  183. def CortexA55ReadIEReg : SchedReadVariant<[
  184. SchedVar<RegExtendedPred, [CortexA55ReadShifted]>,
  185. SchedVar<NoSchedPred, [CortexA55ReadNotShifted]>]>;
  186. def : SchedAlias<ReadIEReg, CortexA55ReadIEReg>;
  187. // MUL
  188. def : ReadAdvance<ReadIM, 1, [WriteImm,WriteI,
  189. WriteISReg, WriteIEReg,WriteIS,
  190. WriteID32,WriteID64,
  191. WriteIM32,WriteIM64]>;
  192. def : ReadAdvance<ReadIMA, 2, [WriteImm,WriteI,
  193. WriteISReg, WriteIEReg,WriteIS,
  194. WriteID32,WriteID64,
  195. WriteIM32,WriteIM64]>;
  196. // Div
  197. def : ReadAdvance<ReadID, 1, [WriteImm,WriteI,
  198. WriteISReg, WriteIEReg,WriteIS,
  199. WriteID32,WriteID64,
  200. WriteIM32,WriteIM64]>;
  201. //===----------------------------------------------------------------------===//
  202. // Subtarget-specific InstRWs.
  203. //---
  204. // Miscellaneous
  205. //---
  206. def : InstRW<[CortexA55WriteVLD1SI,CortexA55WriteLDP1], (instregex "LDPS?Wi")>;
  207. def : InstRW<[CortexA55WriteVLD1,CortexA55WriteLDP1], (instregex "LDPSi")>;
  208. def : InstRW<[CortexA55WriteVLD1,CortexA55WriteLDP2], (instregex "LDP(X|D)i")>;
  209. def : InstRW<[CortexA55WriteVLD1,CortexA55WriteLDP4], (instregex "LDPQi")>;
  210. def : InstRW<[WriteAdr, CortexA55WriteVLD1SI,CortexA55WriteLDP1], (instregex "LDPS?W(pre|post)")>;
  211. def : InstRW<[WriteAdr, CortexA55WriteVLD1,CortexA55WriteLDP1], (instregex "LDPS(pre|post)")>;
  212. def : InstRW<[WriteAdr, CortexA55WriteVLD1,CortexA55WriteLDP2], (instregex "LDP(X|D)(pre|post)")>;
  213. def : InstRW<[WriteAdr, CortexA55WriteVLD1,CortexA55WriteLDP4], (instregex "LDPQ(pre|post)")>;
  214. def : InstRW<[WriteI], (instrs COPY)>;
  215. //---
  216. // Vector Loads - 64-bit per cycle
  217. //---
  218. // 1-element structures
  219. def : InstRW<[CortexA55WriteVLD1], (instregex "LD1i(8|16|32|64)$")>; // single element
  220. def : InstRW<[CortexA55WriteVLD1], (instregex "LD1Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>; // replicate
  221. def : InstRW<[CortexA55WriteVLD1], (instregex "LD1Onev(8b|4h|2s|1d)$")>;
  222. def : InstRW<[CortexA55WriteVLD2], (instregex "LD1Onev(16b|8h|4s|2d)$")>;
  223. def : InstRW<[CortexA55WriteVLD2], (instregex "LD1Twov(8b|4h|2s|1d)$")>; // multiple structures
  224. def : InstRW<[CortexA55WriteVLD4], (instregex "LD1Twov(16b|8h|4s|2d)$")>;
  225. def : InstRW<[CortexA55WriteVLD3], (instregex "LD1Threev(8b|4h|2s|1d)$")>;
  226. def : InstRW<[CortexA55WriteVLD6], (instregex "LD1Threev(16b|8h|4s|2d)$")>;
  227. def : InstRW<[CortexA55WriteVLD4], (instregex "LD1Fourv(8b|4h|2s|1d)$")>;
  228. def : InstRW<[CortexA55WriteVLD8], (instregex "LD1Fourv(16b|8h|4s|2d)$")>;
  229. def : InstRW<[CortexA55WriteVLD1, WriteAdr], (instregex "LD1i(8|16|32|64)_POST$")>;
  230. def : InstRW<[CortexA55WriteVLD1, WriteAdr], (instregex "LD1Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  231. def : InstRW<[CortexA55WriteVLD1, WriteAdr], (instregex "LD1Onev(8b|4h|2s|1d)_POST$")>;
  232. def : InstRW<[CortexA55WriteVLD2, WriteAdr], (instregex "LD1Onev(16b|8h|4s|2d)_POST$")>;
  233. def : InstRW<[CortexA55WriteVLD2, WriteAdr], (instregex "LD1Twov(8b|4h|2s|1d)_POST$")>;
  234. def : InstRW<[CortexA55WriteVLD4, WriteAdr], (instregex "LD1Twov(16b|8h|4s|2d)_POST$")>;
  235. def : InstRW<[CortexA55WriteVLD3, WriteAdr], (instregex "LD1Threev(8b|4h|2s|1d)_POST$")>;
  236. def : InstRW<[CortexA55WriteVLD6, WriteAdr], (instregex "LD1Threev(16b|8h|4s|2d)_POST$")>;
  237. def : InstRW<[CortexA55WriteVLD4, WriteAdr], (instregex "LD1Fourv(8b|4h|2s|1d)_POST$")>;
  238. def : InstRW<[CortexA55WriteVLD8, WriteAdr], (instregex "LD1Fourv(16b|8h|4s|2d)_POST$")>;
  239. // 2-element structures
  240. def : InstRW<[CortexA55WriteVLD2], (instregex "LD2i(8|16|32|64)$")>;
  241. def : InstRW<[CortexA55WriteVLD2], (instregex "LD2Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  242. def : InstRW<[CortexA55WriteVLD2], (instregex "LD2Twov(8b|4h|2s)$")>;
  243. def : InstRW<[CortexA55WriteVLD4], (instregex "LD2Twov(16b|8h|4s|2d)$")>;
  244. def : InstRW<[CortexA55WriteVLD2, WriteAdr], (instregex "LD2i(8|16|32|64)(_POST)?$")>;
  245. def : InstRW<[CortexA55WriteVLD2, WriteAdr], (instregex "LD2Rv(8b|4h|2s|1d|16b|8h|4s|2d)(_POST)?$")>;
  246. def : InstRW<[CortexA55WriteVLD2, WriteAdr], (instregex "LD2Twov(8b|4h|2s)(_POST)?$")>;
  247. def : InstRW<[CortexA55WriteVLD4, WriteAdr], (instregex "LD2Twov(16b|8h|4s|2d)(_POST)?$")>;
  248. // 3-element structures
  249. def : InstRW<[CortexA55WriteVLD2], (instregex "LD3i(8|16|32|64)$")>;
  250. def : InstRW<[CortexA55WriteVLD2], (instregex "LD3Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  251. def : InstRW<[CortexA55WriteVLD3], (instregex "LD3Threev(8b|4h|2s|1d)$")>;
  252. def : InstRW<[CortexA55WriteVLD6], (instregex "LD3Threev(16b|8h|4s|2d)$")>;
  253. def : InstRW<[CortexA55WriteVLD2, WriteAdr], (instregex "LD3i(8|16|32|64)_POST$")>;
  254. def : InstRW<[CortexA55WriteVLD2, WriteAdr], (instregex "LD3Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  255. def : InstRW<[CortexA55WriteVLD3, WriteAdr], (instregex "LD3Threev(8b|4h|2s|1d)_POST$")>;
  256. def : InstRW<[CortexA55WriteVLD6, WriteAdr], (instregex "LD3Threev(16b|8h|4s|2d)_POST$")>;
  257. // 4-element structures
  258. def : InstRW<[CortexA55WriteVLD2], (instregex "LD4i(8|16|32|64)$")>; // load single 4-el structure to one lane of 4 regs.
  259. def : InstRW<[CortexA55WriteVLD2], (instregex "LD4Rv(8b|4h|2s|1d|16b|8h|4s|2d)$")>; // load single 4-el structure, replicate to all lanes of 4 regs.
  260. def : InstRW<[CortexA55WriteVLD4], (instregex "LD4Fourv(8b|4h|2s|1d)$")>; // load multiple 4-el structures to 4 regs.
  261. def : InstRW<[CortexA55WriteVLD8], (instregex "LD4Fourv(16b|8h|4s|2d)$")>;
  262. def : InstRW<[CortexA55WriteVLD2, WriteAdr], (instregex "LD4i(8|16|32|64)_POST$")>;
  263. def : InstRW<[CortexA55WriteVLD2, WriteAdr], (instregex "LD4Rv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  264. def : InstRW<[CortexA55WriteVLD4, WriteAdr], (instregex "LD4Fourv(8b|4h|2s|1d)_POST$")>;
  265. def : InstRW<[CortexA55WriteVLD8, WriteAdr], (instregex "LD4Fourv(16b|8h|4s|2d)_POST$")>;
  266. //---
  267. // Vector Stores
  268. //---
  269. def : InstRW<[CortexA55WriteVST1], (instregex "ST1i(8|16|32|64)$")>;
  270. def : InstRW<[CortexA55WriteVST1], (instregex "ST1Onev(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  271. def : InstRW<[CortexA55WriteVST1], (instregex "ST1Twov(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  272. def : InstRW<[CortexA55WriteVST2], (instregex "ST1Threev(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  273. def : InstRW<[CortexA55WriteVST4], (instregex "ST1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  274. def : InstRW<[CortexA55WriteVST1, WriteAdr], (instregex "ST1i(8|16|32|64)_POST$")>;
  275. def : InstRW<[CortexA55WriteVST1, WriteAdr], (instregex "ST1Onev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  276. def : InstRW<[CortexA55WriteVST1, WriteAdr], (instregex "ST1Twov(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  277. def : InstRW<[CortexA55WriteVST2, WriteAdr], (instregex "ST1Threev(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  278. def : InstRW<[CortexA55WriteVST4, WriteAdr], (instregex "ST1Fourv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  279. def : InstRW<[CortexA55WriteVST2], (instregex "ST2i(8|16|32|64)$")>;
  280. def : InstRW<[CortexA55WriteVST2], (instregex "ST2Twov(8b|4h|2s)$")>;
  281. def : InstRW<[CortexA55WriteVST4], (instregex "ST2Twov(16b|8h|4s|2d)$")>;
  282. def : InstRW<[CortexA55WriteVST2, WriteAdr], (instregex "ST2i(8|16|32|64)_POST$")>;
  283. def : InstRW<[CortexA55WriteVST2, WriteAdr], (instregex "ST2Twov(8b|4h|2s)_POST$")>;
  284. def : InstRW<[CortexA55WriteVST4, WriteAdr], (instregex "ST2Twov(16b|8h|4s|2d)_POST$")>;
  285. def : InstRW<[CortexA55WriteVST2], (instregex "ST3i(8|16|32|64)$")>;
  286. def : InstRW<[CortexA55WriteVST4], (instregex "ST3Threev(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  287. def : InstRW<[CortexA55WriteVST2, WriteAdr], (instregex "ST3i(8|16|32|64)_POST$")>;
  288. def : InstRW<[CortexA55WriteVST4, WriteAdr], (instregex "ST3Threev(8b|4h|2s|1d|2d|16b|8h|4s|4d)_POST$")>;
  289. def : InstRW<[CortexA55WriteVST2], (instregex "ST4i(8|16|32|64)$")>;
  290. def : InstRW<[CortexA55WriteVST4], (instregex "ST4Fourv(8b|4h|2s|1d|16b|8h|4s|2d)$")>;
  291. def : InstRW<[CortexA55WriteVST2, WriteAdr], (instregex "ST4i(8|16|32|64)_POST$")>;
  292. def : InstRW<[CortexA55WriteVST4, WriteAdr], (instregex "ST4Fourv(8b|4h|2s|1d|16b|8h|4s|2d)_POST$")>;
  293. //---
  294. // Floating Point Conversions, MAC, DIV, SQRT
  295. //---
  296. def : InstRW<[CortexA55WriteFPALU_F2], (instregex "^DUP(v2i64|v4i32|v8i16|v16i8)")>;
  297. def : InstRW<[CortexA55WriteFPALU_F2], (instregex "^XTN")>;
  298. def : InstRW<[CortexA55WriteFPALU_F3], (instregex "^FCVT[ALMNPZ][SU](S|U)?(W|X)")>;
  299. def : InstRW<[CortexA55WriteFPALU_F4], (instregex "^FCVT(X)?[ALMNPXZ](S|U|N)?v")>;
  300. def : InstRW<[CortexA55WriteFPALU_F4], (instregex "^(S|U)CVTF(S|U)(W|X)(H|S|D)")>;
  301. def : InstRW<[CortexA55WriteFPALU_F4], (instregex "^(S|U)CVTF(h|s|d)")>;
  302. def : InstRW<[CortexA55WriteFPALU_F4], (instregex "^(S|U)CVTFv")>;
  303. def : InstRW<[CortexA55WriteFMAC], (instregex "^FN?M(ADD|SUB).*")>;
  304. def : InstRW<[CortexA55WriteFMAC], (instregex "^FML(A|S).*")>;
  305. def : InstRW<[CortexA55WriteFDivHP], (instrs FDIVHrr)>;
  306. def : InstRW<[CortexA55WriteFDivSP], (instrs FDIVSrr)>;
  307. def : InstRW<[CortexA55WriteFDivDP], (instrs FDIVDrr)>;
  308. def : InstRW<[CortexA55WriteFDivHP], (instregex "^FDIVv.*16$")>;
  309. def : InstRW<[CortexA55WriteFDivSP], (instregex "^FDIVv.*32$")>;
  310. def : InstRW<[CortexA55WriteFDivDP], (instregex "^FDIVv.*64$")>;
  311. def : InstRW<[CortexA55WriteFSqrtHP], (instregex "^.*SQRT.*16$")>;
  312. def : InstRW<[CortexA55WriteFSqrtSP], (instregex "^.*SQRT.*32$")>;
  313. def : InstRW<[CortexA55WriteFSqrtDP], (instregex "^.*SQRT.*64$")>;
  314. }