AArch64SchedA57.td 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690
  1. //=- AArch64SchedA57.td - ARM Cortex-A57 Scheduling Defs -----*- 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 ARM Cortex-A57 to support
  10. // instruction scheduling and other instruction cost heuristics.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //===----------------------------------------------------------------------===//
  14. // The Cortex-A57 is a traditional superscalar microprocessor with a
  15. // conservative 3-wide in-order stage for decode and dispatch. Combined with the
  16. // much wider out-of-order issue stage, this produced a need to carefully
  17. // schedule micro-ops so that all three decoded each cycle are successfully
  18. // issued as the reservation station(s) simply don't stay occupied for long.
  19. // Therefore, IssueWidth is set to the narrower of the two at three, while still
  20. // modeling the machine as out-of-order.
  21. def CortexA57Model : SchedMachineModel {
  22. let IssueWidth = 3; // 3-way decode and dispatch
  23. let MicroOpBufferSize = 128; // 128 micro-op re-order buffer
  24. let LoadLatency = 4; // Optimistic load latency
  25. let MispredictPenalty = 14; // Fetch + Decode/Rename/Dispatch + Branch
  26. // Enable partial & runtime unrolling. The magic number is chosen based on
  27. // experiments and benchmarking data.
  28. let LoopMicroOpBufferSize = 16;
  29. let CompleteModel = 1;
  30. list<Predicate> UnsupportedFeatures = !listconcat(SVEUnsupported.F,
  31. PAUnsupported.F,
  32. SMEUnsupported.F);
  33. }
  34. //===----------------------------------------------------------------------===//
  35. // Define each kind of processor resource and number available on Cortex-A57.
  36. // Cortex A-57 has 8 pipelines that each has its own 8-entry queue where
  37. // micro-ops wait for their operands and then issue out-of-order.
  38. def A57UnitB : ProcResource<1>; // Type B micro-ops
  39. def A57UnitI : ProcResource<2>; // Type I micro-ops
  40. def A57UnitM : ProcResource<1>; // Type M micro-ops
  41. def A57UnitL : ProcResource<1>; // Type L micro-ops
  42. def A57UnitS : ProcResource<1>; // Type S micro-ops
  43. def A57UnitX : ProcResource<1>; // Type X micro-ops
  44. def A57UnitW : ProcResource<1>; // Type W micro-ops
  45. let SchedModel = CortexA57Model in {
  46. def A57UnitV : ProcResGroup<[A57UnitX, A57UnitW]>; // Type V micro-ops
  47. }
  48. let SchedModel = CortexA57Model in {
  49. //===----------------------------------------------------------------------===//
  50. // Define customized scheduler read/write types specific to the Cortex-A57.
  51. include "AArch64SchedA57WriteRes.td"
  52. //===----------------------------------------------------------------------===//
  53. // Map the target-defined scheduler read/write resources and latency for
  54. // Cortex-A57. The Cortex-A57 types are directly associated with resources, so
  55. // defining the aliases precludes the need for mapping them using WriteRes. The
  56. // aliases are sufficient for creating a coarse, working model. As the model
  57. // evolves, InstRWs will be used to override some of these SchedAliases.
  58. //
  59. // WARNING: Using SchedAliases is convenient and works well for latency and
  60. // resource lookup for instructions. However, this creates an entry in
  61. // AArch64WriteLatencyTable with a WriteResourceID of 0, breaking
  62. // any SchedReadAdvance since the lookup will fail.
  63. def : SchedAlias<WriteImm, A57Write_1cyc_1I>;
  64. def : SchedAlias<WriteI, A57Write_1cyc_1I>;
  65. def : SchedAlias<WriteISReg, A57Write_2cyc_1M>;
  66. def : SchedAlias<WriteIEReg, A57Write_2cyc_1M>;
  67. def : SchedAlias<WriteExtr, A57Write_1cyc_1I>;
  68. def : SchedAlias<WriteIS, A57Write_1cyc_1I>;
  69. def : SchedAlias<WriteID32, A57Write_19cyc_1M>;
  70. def : SchedAlias<WriteID64, A57Write_35cyc_1M>;
  71. def : WriteRes<WriteIM32, [A57UnitM]> { let Latency = 3; }
  72. def : WriteRes<WriteIM64, [A57UnitM]> { let Latency = 5; }
  73. def : SchedAlias<WriteBr, A57Write_1cyc_1B>;
  74. def : SchedAlias<WriteBrReg, A57Write_1cyc_1B>;
  75. def : SchedAlias<WriteLD, A57Write_4cyc_1L>;
  76. def : SchedAlias<WriteST, A57Write_1cyc_1S>;
  77. def : SchedAlias<WriteSTP, A57Write_1cyc_1S>;
  78. def : SchedAlias<WriteAdr, A57Write_1cyc_1I>;
  79. def : SchedAlias<WriteLDIdx, A57Write_4cyc_1I_1L>;
  80. def : SchedAlias<WriteSTIdx, A57Write_1cyc_1I_1S>;
  81. def : SchedAlias<WriteF, A57Write_3cyc_1V>;
  82. def : SchedAlias<WriteFCmp, A57Write_3cyc_1V>;
  83. def : SchedAlias<WriteFCvt, A57Write_5cyc_1V>;
  84. def : SchedAlias<WriteFCopy, A57Write_5cyc_1L>;
  85. def : SchedAlias<WriteFImm, A57Write_3cyc_1V>;
  86. def : WriteRes<WriteFMul, [A57UnitV]> { let Latency = 5;}
  87. def : SchedAlias<WriteFDiv, A57Write_17cyc_1W>;
  88. def : SchedAlias<WriteVd, A57Write_3cyc_1V>;
  89. def : SchedAlias<WriteVq, A57Write_3cyc_1V>;
  90. def : SchedAlias<WriteVLD, A57Write_5cyc_1L>;
  91. def : SchedAlias<WriteVST, A57Write_1cyc_1S>;
  92. def : WriteRes<WriteAtomic, []> { let Unsupported = 1; }
  93. def : WriteRes<WriteSys, []> { let Latency = 1; }
  94. def : WriteRes<WriteBarrier, []> { let Latency = 1; }
  95. def : WriteRes<WriteHint, []> { let Latency = 1; }
  96. def : WriteRes<WriteLDHi, []> { let Latency = 4; }
  97. // Forwarding logic is only modeled for multiply and accumulate
  98. def : ReadAdvance<ReadI, 0>;
  99. def : ReadAdvance<ReadISReg, 0>;
  100. def : ReadAdvance<ReadIEReg, 0>;
  101. def : ReadAdvance<ReadIM, 0>;
  102. def : ReadAdvance<ReadIMA, 2, [WriteIM32, WriteIM64]>;
  103. def : ReadAdvance<ReadID, 0>;
  104. def : ReadAdvance<ReadExtrHi, 0>;
  105. def : ReadAdvance<ReadST, 0>;
  106. def : ReadAdvance<ReadAdrBase, 0>;
  107. def : ReadAdvance<ReadVLD, 0>;
  108. //===----------------------------------------------------------------------===//
  109. // Specialize the coarse model by associating instruction groups with the
  110. // subtarget-defined types. As the modeled is refined, this will override most
  111. // of the above ShchedAlias mappings.
  112. // Miscellaneous
  113. // -----------------------------------------------------------------------------
  114. def : InstRW<[WriteI], (instrs COPY)>;
  115. // Branch Instructions
  116. // -----------------------------------------------------------------------------
  117. def : InstRW<[A57Write_1cyc_1B_1I], (instrs BL)>;
  118. def : InstRW<[A57Write_2cyc_1B_1I], (instrs BLR)>;
  119. // Shifted Register with Shift == 0
  120. // ----------------------------------------------------------------------------
  121. def A57WriteISReg : SchedWriteVariant<[
  122. SchedVar<RegShiftedPred, [WriteISReg]>,
  123. SchedVar<NoSchedPred, [WriteI]>]>;
  124. def : InstRW<[A57WriteISReg], (instregex ".*rs$")>;
  125. // Divide and Multiply Instructions
  126. // -----------------------------------------------------------------------------
  127. // Multiply high
  128. def : InstRW<[A57Write_6cyc_1M], (instrs SMULHrr, UMULHrr)>;
  129. // Miscellaneous Data-Processing Instructions
  130. // -----------------------------------------------------------------------------
  131. def : InstRW<[A57Write_1cyc_1I], (instrs EXTRWrri)>;
  132. def : InstRW<[A57Write_3cyc_1I_1M], (instrs EXTRXrri)>;
  133. def : InstRW<[A57Write_2cyc_1M], (instregex "BFM")>;
  134. // Cryptography Extensions
  135. // -----------------------------------------------------------------------------
  136. def A57ReadAES : SchedReadAdvance<3, [A57Write_3cyc_1W]>;
  137. def : InstRW<[A57Write_3cyc_1W], (instregex "^AES[DE]")>;
  138. def : InstRW<[A57Write_3cyc_1W, A57ReadAES], (instregex "^AESI?MC")>;
  139. def : InstRW<[A57Write_6cyc_2V], (instregex "^SHA1SU0")>;
  140. def : InstRW<[A57Write_3cyc_1W], (instregex "^SHA1(H|SU1)")>;
  141. def : InstRW<[A57Write_6cyc_2W], (instregex "^SHA1[CMP]")>;
  142. def : InstRW<[A57Write_3cyc_1W], (instregex "^SHA256SU0")>;
  143. def : InstRW<[A57Write_6cyc_2W], (instregex "^SHA256(H|H2|SU1)")>;
  144. def : InstRW<[A57Write_3cyc_1W], (instregex "^CRC32")>;
  145. // Vector Load
  146. // -----------------------------------------------------------------------------
  147. def : InstRW<[A57Write_8cyc_1L_1V], (instregex "LD1i(8|16|32)$")>;
  148. def : InstRW<[A57Write_8cyc_1L_1V, WriteAdr], (instregex "LD1i(8|16|32)_POST$")>;
  149. def : InstRW<[A57Write_5cyc_1L], (instregex "LD1i(64)$")>;
  150. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instregex "LD1i(64)_POST$")>;
  151. def : InstRW<[A57Write_8cyc_1L_1V], (instregex "LD1Rv(8b|4h|2s)$")>;
  152. def : InstRW<[A57Write_8cyc_1L_1V, WriteAdr], (instregex "LD1Rv(8b|4h|2s)_POST$")>;
  153. def : InstRW<[A57Write_5cyc_1L], (instregex "LD1Rv(1d)$")>;
  154. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instregex "LD1Rv(1d)_POST$")>;
  155. def : InstRW<[A57Write_8cyc_1L_1V], (instregex "LD1Rv(16b|8h|4s|2d)$")>;
  156. def : InstRW<[A57Write_8cyc_1L_1V, WriteAdr], (instregex "LD1Rv(16b|8h|4s|2d)_POST$")>;
  157. def : InstRW<[A57Write_5cyc_1L], (instregex "LD1Onev(8b|4h|2s|1d)$")>;
  158. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instregex "LD1Onev(8b|4h|2s|1d)_POST$")>;
  159. def : InstRW<[A57Write_5cyc_1L], (instregex "LD1Onev(16b|8h|4s|2d)$")>;
  160. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instregex "LD1Onev(16b|8h|4s|2d)_POST$")>;
  161. def : InstRW<[A57Write_5cyc_1L], (instregex "LD1Twov(8b|4h|2s|1d)$")>;
  162. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instregex "LD1Twov(8b|4h|2s|1d)_POST$")>;
  163. def : InstRW<[A57Write_6cyc_2L], (instregex "LD1Twov(16b|8h|4s|2d)$")>;
  164. def : InstRW<[A57Write_6cyc_2L, WriteAdr], (instregex "LD1Twov(16b|8h|4s|2d)_POST$")>;
  165. def : InstRW<[A57Write_6cyc_2L], (instregex "LD1Threev(8b|4h|2s|1d)$")>;
  166. def : InstRW<[A57Write_6cyc_2L, WriteAdr], (instregex "LD1Threev(8b|4h|2s|1d)_POST$")>;
  167. def : InstRW<[A57Write_7cyc_3L], (instregex "LD1Threev(16b|8h|4s|2d)$")>;
  168. def : InstRW<[A57Write_7cyc_3L, WriteAdr], (instregex "LD1Threev(16b|8h|4s|2d)_POST$")>;
  169. def : InstRW<[A57Write_6cyc_2L], (instregex "LD1Fourv(8b|4h|2s|1d)$")>;
  170. def : InstRW<[A57Write_6cyc_2L, WriteAdr], (instregex "LD1Fourv(8b|4h|2s|1d)_POST$")>;
  171. def : InstRW<[A57Write_8cyc_4L], (instregex "LD1Fourv(16b|8h|4s|2d)$")>;
  172. def : InstRW<[A57Write_8cyc_4L, WriteAdr], (instregex "LD1Fourv(16b|8h|4s|2d)_POST$")>;
  173. def : InstRW<[A57Write_8cyc_1L_2V], (instregex "LD2i(8|16)$")>;
  174. def : InstRW<[A57Write_8cyc_1L_2V, WriteAdr], (instregex "LD2i(8|16)_POST$")>;
  175. def : InstRW<[A57Write_6cyc_2L], (instregex "LD2i(32)$")>;
  176. def : InstRW<[A57Write_6cyc_2L, WriteAdr], (instregex "LD2i(32)_POST$")>;
  177. def : InstRW<[A57Write_8cyc_1L_1V], (instregex "LD2i(64)$")>;
  178. def : InstRW<[A57Write_8cyc_1L_1V, WriteAdr], (instregex "LD2i(64)_POST$")>;
  179. def : InstRW<[A57Write_8cyc_1L_1V], (instregex "LD2Rv(8b|4h|2s)$")>;
  180. def : InstRW<[A57Write_8cyc_1L_1V, WriteAdr], (instregex "LD2Rv(8b|4h|2s)_POST$")>;
  181. def : InstRW<[A57Write_5cyc_1L], (instregex "LD2Rv(1d)$")>;
  182. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instregex "LD2Rv(1d)_POST$")>;
  183. def : InstRW<[A57Write_8cyc_1L_2V], (instregex "LD2Rv(16b|8h|4s|2d)$")>;
  184. def : InstRW<[A57Write_8cyc_1L_2V, WriteAdr], (instregex "LD2Rv(16b|8h|4s|2d)_POST$")>;
  185. def : InstRW<[A57Write_8cyc_1L_1V], (instregex "LD2Twov(8b|4h|2s)$")>;
  186. def : InstRW<[A57Write_8cyc_1L_1V, WriteAdr], (instregex "LD2Twov(8b|4h|2s)_POST$")>;
  187. def : InstRW<[A57Write_9cyc_2L_2V], (instregex "LD2Twov(16b|8h|4s)$")>;
  188. def : InstRW<[A57Write_9cyc_2L_2V, WriteAdr], (instregex "LD2Twov(16b|8h|4s)_POST$")>;
  189. def : InstRW<[A57Write_6cyc_2L], (instregex "LD2Twov(2d)$")>;
  190. def : InstRW<[A57Write_6cyc_2L, WriteAdr], (instregex "LD2Twov(2d)_POST$")>;
  191. def : InstRW<[A57Write_9cyc_1L_3V], (instregex "LD3i(8|16)$")>;
  192. def : InstRW<[A57Write_9cyc_1L_3V, WriteAdr], (instregex "LD3i(8|16)_POST$")>;
  193. def : InstRW<[A57Write_8cyc_1L_2V], (instregex "LD3i(32)$")>;
  194. def : InstRW<[A57Write_8cyc_1L_2V, WriteAdr], (instregex "LD3i(32)_POST$")>;
  195. def : InstRW<[A57Write_6cyc_2L], (instregex "LD3i(64)$")>;
  196. def : InstRW<[A57Write_6cyc_2L, WriteAdr], (instregex "LD3i(64)_POST$")>;
  197. def : InstRW<[A57Write_8cyc_1L_2V], (instregex "LD3Rv(8b|4h|2s)$")>;
  198. def : InstRW<[A57Write_8cyc_1L_2V, WriteAdr], (instregex "LD3Rv(8b|4h|2s)_POST$")>;
  199. def : InstRW<[A57Write_6cyc_2L], (instregex "LD3Rv(1d)$")>;
  200. def : InstRW<[A57Write_6cyc_2L, WriteAdr], (instregex "LD3Rv(1d)_POST$")>;
  201. def : InstRW<[A57Write_9cyc_1L_3V], (instregex "LD3Rv(16b|8h|4s)$")>;
  202. def : InstRW<[A57Write_9cyc_1L_3V, WriteAdr], (instregex "LD3Rv(16b|8h|4s)_POST$")>;
  203. def : InstRW<[A57Write_9cyc_2L_3V], (instregex "LD3Rv(2d)$")>;
  204. def : InstRW<[A57Write_9cyc_2L_3V, WriteAdr], (instregex "LD3Rv(2d)_POST$")>;
  205. def : InstRW<[A57Write_9cyc_2L_2V], (instregex "LD3Threev(8b|4h|2s)$")>;
  206. def : InstRW<[A57Write_9cyc_2L_2V, WriteAdr], (instregex "LD3Threev(8b|4h|2s)_POST$")>;
  207. def : InstRW<[A57Write_10cyc_3L_4V], (instregex "LD3Threev(16b|8h|4s)$")>;
  208. def : InstRW<[A57Write_10cyc_3L_4V, WriteAdr], (instregex "LD3Threev(16b|8h|4s)_POST$")>;
  209. def : InstRW<[A57Write_8cyc_4L], (instregex "LD3Threev(2d)$")>;
  210. def : InstRW<[A57Write_8cyc_4L, WriteAdr], (instregex "LD3Threev(2d)_POST$")>;
  211. def : InstRW<[A57Write_9cyc_2L_3V], (instregex "LD4i(8|16)$")>;
  212. def : InstRW<[A57Write_9cyc_2L_3V, WriteAdr], (instregex "LD4i(8|16)_POST$")>;
  213. def : InstRW<[A57Write_8cyc_1L_2V], (instregex "LD4i(32)$")>;
  214. def : InstRW<[A57Write_8cyc_1L_2V, WriteAdr], (instregex "LD4i(32)_POST$")>;
  215. def : InstRW<[A57Write_9cyc_2L_3V], (instregex "LD4i(64)$")>;
  216. def : InstRW<[A57Write_9cyc_2L_3V, WriteAdr], (instregex "LD4i(64)_POST$")>;
  217. def : InstRW<[A57Write_8cyc_1L_2V], (instregex "LD4Rv(8b|4h|2s)$")>;
  218. def : InstRW<[A57Write_8cyc_1L_2V, WriteAdr], (instregex "LD4Rv(8b|4h|2s)_POST$")>;
  219. def : InstRW<[A57Write_6cyc_2L], (instregex "LD4Rv(1d)$")>;
  220. def : InstRW<[A57Write_6cyc_2L, WriteAdr], (instregex "LD4Rv(1d)_POST$")>;
  221. def : InstRW<[A57Write_9cyc_2L_3V], (instregex "LD4Rv(16b|8h|4s)$")>;
  222. def : InstRW<[A57Write_9cyc_2L_3V, WriteAdr], (instregex "LD4Rv(16b|8h|4s)_POST$")>;
  223. def : InstRW<[A57Write_9cyc_2L_4V], (instregex "LD4Rv(2d)$")>;
  224. def : InstRW<[A57Write_9cyc_2L_4V, WriteAdr], (instregex "LD4Rv(2d)_POST$")>;
  225. def : InstRW<[A57Write_9cyc_2L_2V], (instregex "LD4Fourv(8b|4h|2s)$")>;
  226. def : InstRW<[A57Write_9cyc_2L_2V, WriteAdr], (instregex "LD4Fourv(8b|4h|2s)_POST$")>;
  227. def : InstRW<[A57Write_11cyc_4L_4V], (instregex "LD4Fourv(16b|8h|4s)$")>;
  228. def : InstRW<[A57Write_11cyc_4L_4V, WriteAdr], (instregex "LD4Fourv(16b|8h|4s)_POST$")>;
  229. def : InstRW<[A57Write_8cyc_4L], (instregex "LD4Fourv(2d)$")>;
  230. def : InstRW<[A57Write_8cyc_4L, WriteAdr], (instregex "LD4Fourv(2d)_POST$")>;
  231. // Vector Store
  232. // -----------------------------------------------------------------------------
  233. def : InstRW<[A57Write_1cyc_1S], (instregex "ST1i(8|16|32)$")>;
  234. def : InstRW<[A57Write_1cyc_1S, WriteAdr], (instregex "ST1i(8|16|32)_POST$")>;
  235. def : InstRW<[A57Write_3cyc_1S_1V], (instregex "ST1i(64)$")>;
  236. def : InstRW<[A57Write_3cyc_1S_1V, WriteAdr], (instregex "ST1i(64)_POST$")>;
  237. def : InstRW<[A57Write_1cyc_1S], (instregex "ST1Onev(8b|4h|2s|1d)$")>;
  238. def : InstRW<[A57Write_1cyc_1S, WriteAdr], (instregex "ST1Onev(8b|4h|2s|1d)_POST$")>;
  239. def : InstRW<[A57Write_2cyc_2S], (instregex "ST1Onev(16b|8h|4s|2d)$")>;
  240. def : InstRW<[A57Write_2cyc_2S, WriteAdr], (instregex "ST1Onev(16b|8h|4s|2d)_POST$")>;
  241. def : InstRW<[A57Write_2cyc_2S], (instregex "ST1Twov(8b|4h|2s|1d)$")>;
  242. def : InstRW<[A57Write_2cyc_2S, WriteAdr], (instregex "ST1Twov(8b|4h|2s|1d)_POST$")>;
  243. def : InstRW<[A57Write_4cyc_4S], (instregex "ST1Twov(16b|8h|4s|2d)$")>;
  244. def : InstRW<[A57Write_4cyc_4S, WriteAdr], (instregex "ST1Twov(16b|8h|4s|2d)_POST$")>;
  245. def : InstRW<[A57Write_3cyc_3S], (instregex "ST1Threev(8b|4h|2s|1d)$")>;
  246. def : InstRW<[A57Write_3cyc_3S, WriteAdr], (instregex "ST1Threev(8b|4h|2s|1d)_POST$")>;
  247. def : InstRW<[A57Write_6cyc_6S], (instregex "ST1Threev(16b|8h|4s|2d)$")>;
  248. def : InstRW<[A57Write_6cyc_6S, WriteAdr], (instregex "ST1Threev(16b|8h|4s|2d)_POST$")>;
  249. def : InstRW<[A57Write_4cyc_4S], (instregex "ST1Fourv(8b|4h|2s|1d)$")>;
  250. def : InstRW<[A57Write_4cyc_4S, WriteAdr], (instregex "ST1Fourv(8b|4h|2s|1d)_POST$")>;
  251. def : InstRW<[A57Write_8cyc_8S], (instregex "ST1Fourv(16b|8h|4s|2d)$")>;
  252. def : InstRW<[A57Write_8cyc_8S, WriteAdr], (instregex "ST1Fourv(16b|8h|4s|2d)_POST$")>;
  253. def : InstRW<[A57Write_3cyc_1S_1V], (instregex "ST2i(8|16|32)$")>;
  254. def : InstRW<[A57Write_3cyc_1S_1V, WriteAdr], (instregex "ST2i(8|16|32)_POST$")>;
  255. def : InstRW<[A57Write_2cyc_2S], (instregex "ST2i(64)$")>;
  256. def : InstRW<[A57Write_2cyc_2S, WriteAdr], (instregex "ST2i(64)_POST$")>;
  257. def : InstRW<[A57Write_3cyc_2S_1V], (instregex "ST2Twov(8b|4h|2s)$")>;
  258. def : InstRW<[A57Write_3cyc_2S_1V, WriteAdr], (instregex "ST2Twov(8b|4h|2s)_POST$")>;
  259. def : InstRW<[A57Write_4cyc_4S_2V], (instregex "ST2Twov(16b|8h|4s)$")>;
  260. def : InstRW<[A57Write_4cyc_4S_2V, WriteAdr], (instregex "ST2Twov(16b|8h|4s)_POST$")>;
  261. def : InstRW<[A57Write_4cyc_4S], (instregex "ST2Twov(2d)$")>;
  262. def : InstRW<[A57Write_4cyc_4S, WriteAdr], (instregex "ST2Twov(2d)_POST$")>;
  263. def : InstRW<[A57Write_3cyc_1S_1V], (instregex "ST3i(8|16)$")>;
  264. def : InstRW<[A57Write_3cyc_1S_1V, WriteAdr], (instregex "ST3i(8|16)_POST$")>;
  265. def : InstRW<[A57Write_3cyc_3S], (instregex "ST3i(32)$")>;
  266. def : InstRW<[A57Write_3cyc_3S, WriteAdr], (instregex "ST3i(32)_POST$")>;
  267. def : InstRW<[A57Write_3cyc_2S_1V], (instregex "ST3i(64)$")>;
  268. def : InstRW<[A57Write_3cyc_2S_1V, WriteAdr], (instregex "ST3i(64)_POST$")>;
  269. def : InstRW<[A57Write_3cyc_3S_2V], (instregex "ST3Threev(8b|4h|2s)$")>;
  270. def : InstRW<[A57Write_3cyc_3S_2V, WriteAdr], (instregex "ST3Threev(8b|4h|2s)_POST$")>;
  271. def : InstRW<[A57Write_6cyc_6S_4V], (instregex "ST3Threev(16b|8h|4s)$")>;
  272. def : InstRW<[A57Write_6cyc_6S_4V, WriteAdr], (instregex "ST3Threev(16b|8h|4s)_POST$")>;
  273. def : InstRW<[A57Write_6cyc_6S], (instregex "ST3Threev(2d)$")>;
  274. def : InstRW<[A57Write_6cyc_6S, WriteAdr], (instregex "ST3Threev(2d)_POST$")>;
  275. def : InstRW<[A57Write_3cyc_1S_1V], (instregex "ST4i(8|16)$")>;
  276. def : InstRW<[A57Write_3cyc_1S_1V, WriteAdr], (instregex "ST4i(8|16)_POST$")>;
  277. def : InstRW<[A57Write_4cyc_4S], (instregex "ST4i(32)$")>;
  278. def : InstRW<[A57Write_4cyc_4S, WriteAdr], (instregex "ST4i(32)_POST$")>;
  279. def : InstRW<[A57Write_3cyc_2S_1V], (instregex "ST4i(64)$")>;
  280. def : InstRW<[A57Write_3cyc_2S_1V, WriteAdr], (instregex "ST4i(64)_POST$")>;
  281. def : InstRW<[A57Write_4cyc_4S_2V], (instregex "ST4Fourv(8b|4h|2s)$")>;
  282. def : InstRW<[A57Write_4cyc_4S_2V, WriteAdr], (instregex "ST4Fourv(8b|4h|2s)_POST$")>;
  283. def : InstRW<[A57Write_8cyc_8S_4V], (instregex "ST4Fourv(16b|8h|4s)$")>;
  284. def : InstRW<[A57Write_8cyc_8S_4V, WriteAdr], (instregex "ST4Fourv(16b|8h|4s)_POST$")>;
  285. def : InstRW<[A57Write_8cyc_8S], (instregex "ST4Fourv(2d)$")>;
  286. def : InstRW<[A57Write_8cyc_8S, WriteAdr], (instregex "ST4Fourv(2d)_POST$")>;
  287. // Vector - Integer
  288. // -----------------------------------------------------------------------------
  289. // Reference for forms in this group
  290. // D form - v8i8, v4i16, v2i32
  291. // Q form - v16i8, v8i16, v4i32
  292. // D form - v1i8, v1i16, v1i32, v1i64
  293. // Q form - v16i8, v8i16, v4i32, v2i64
  294. // D form - v8i8_v8i16, v4i16_v4i32, v2i32_v2i64
  295. // Q form - v16i8_v8i16, v8i16_v4i32, v4i32_v2i64
  296. // Cortex A57 Software Optimization Guide Sec 3.14
  297. // Advance for absolute diff accum, pairwise add and accumulate, shift accumulate
  298. def A57ReadIVA3 : SchedReadAdvance<3, [A57Write_4cyc_1X_NonMul_Forward, A57Write_5cyc_2X_NonMul_Forward]>;
  299. // ASIMD absolute diff accum, D-form
  300. def : InstRW<[A57Write_4cyc_1X_NonMul_Forward, A57ReadIVA3], (instregex "^[SU]ABA(v8i8|v4i16|v2i32)$")>;
  301. // ASIMD absolute diff accum, Q-form
  302. def : InstRW<[A57Write_5cyc_2X_NonMul_Forward, A57ReadIVA3], (instregex "^[SU]ABA(v16i8|v8i16|v4i32)$")>;
  303. // ASIMD absolute diff accum long
  304. def : InstRW<[A57Write_4cyc_1X_NonMul_Forward, A57ReadIVA3], (instregex "^[SU]ABAL")>;
  305. // ASIMD arith, reduce, 4H/4S
  306. def : InstRW<[A57Write_4cyc_1X], (instregex "^[SU]?ADDL?V(v8i8|v4i16|v2i32)v$")>;
  307. // ASIMD arith, reduce, 8B/8H
  308. def : InstRW<[A57Write_7cyc_1V_1X], (instregex "^[SU]?ADDL?V(v8i16|v4i32)v$")>;
  309. // ASIMD arith, reduce, 16B
  310. def : InstRW<[A57Write_8cyc_2X], (instregex "^[SU]?ADDL?Vv16i8v$")>;
  311. // ASIMD max/min, reduce, 4H/4S
  312. def : InstRW<[A57Write_4cyc_1X], (instregex "^[SU](MIN|MAX)V(v4i16|v4i32)v$")>;
  313. // ASIMD max/min, reduce, 8B/8H
  314. def : InstRW<[A57Write_7cyc_1V_1X], (instregex "^[SU](MIN|MAX)V(v8i8|v8i16)v$")>;
  315. // ASIMD max/min, reduce, 16B
  316. def : InstRW<[A57Write_8cyc_2X], (instregex "^[SU](MIN|MAX)Vv16i8v$")>;
  317. // ASIMD multiply, D-form
  318. // MUL
  319. def : InstRW<[A57Write_5cyc_1W_Mul_Forward], (instregex "^MUL(v8i8|v4i16|v2i32|v1i8|v1i16|v1i32|v1i64)(_indexed)?$")>;
  320. // PMUL, SQDMULH, SQRDMULH
  321. def : InstRW<[A57Write_5cyc_1W], (instregex "^(PMUL|SQR?DMULH)(v8i8|v4i16|v2i32|v1i8|v1i16|v1i32|v1i64)(_indexed)?$")>;
  322. // ASIMD multiply, Q-form
  323. // MUL
  324. def : InstRW<[A57Write_6cyc_2W_Mul_Forward], (instregex "^MUL(v16i8|v8i16|v4i32)(_indexed)?$")>;
  325. // PMUL, SQDMULH, SQRDMULH
  326. def : InstRW<[A57Write_6cyc_2W], (instregex "^(PMUL|SQR?DMULH)(v16i8|v8i16|v4i32)(_indexed)?$")>;
  327. // Cortex A57 Software Optimization Guide Sec 3.14
  328. def A57ReadIVMA4 : SchedReadAdvance<4 , [A57Write_5cyc_1W_Mul_Forward, A57Write_6cyc_2W_Mul_Forward]>;
  329. def A57ReadIVMA3 : SchedReadAdvance<3 , [A57Write_5cyc_1W_Mul_Forward, A57Write_6cyc_2W_Mul_Forward]>;
  330. // ASIMD multiply accumulate, D-form
  331. def : InstRW<[A57Write_5cyc_1W_Mul_Forward, A57ReadIVMA4], (instregex "^ML[AS](v8i8|v4i16|v2i32)(_indexed)?$")>;
  332. // ASIMD multiply accumulate, Q-form
  333. def : InstRW<[A57Write_6cyc_2W_Mul_Forward, A57ReadIVMA4], (instregex "^ML[AS](v16i8|v8i16|v4i32)(_indexed)?$")>;
  334. // ASIMD multiply accumulate long
  335. // ASIMD multiply accumulate saturating long
  336. def : InstRW<[A57Write_5cyc_1W_Mul_Forward, A57ReadIVMA4], (instregex "^(S|U)ML[AS]L")>;
  337. def : InstRW<[A57Write_5cyc_1W_Mul_Forward, A57ReadIVMA3], (instregex "^SQDML[AS]L")>;
  338. // ASIMD multiply long
  339. def : InstRW<[A57Write_5cyc_1W_Mul_Forward], (instregex "^(S|U)MULL")>;
  340. def : InstRW<[A57Write_5cyc_1W], (instregex "^SQDMULL")>;
  341. def : InstRW<[A57Write_5cyc_1W], (instregex "^PMULL(v8i8|v16i8)")>;
  342. def : InstRW<[A57Write_3cyc_1W], (instregex "^PMULL(v1i64|v2i64)")>;
  343. // ASIMD pairwise add and accumulate
  344. // ASIMD shift accumulate
  345. def : InstRW<[A57Write_4cyc_1X_NonMul_Forward, A57ReadIVA3], (instregex "^[SU]ADALP")>;
  346. def : InstRW<[A57Write_4cyc_1X_NonMul_Forward, A57ReadIVA3], (instregex "^(S|SR|U|UR)SRA")>;
  347. // ASIMD shift by immed, complex
  348. def : InstRW<[A57Write_4cyc_1X], (instregex "^[SU]?(Q|R){1,2}SHR")>;
  349. def : InstRW<[A57Write_4cyc_1X], (instregex "^SQSHLU")>;
  350. // ASIMD shift by register, basic, Q-form
  351. def : InstRW<[A57Write_4cyc_2X], (instregex "^[SU]SHL(v16i8|v8i16|v4i32|v2i64)")>;
  352. // ASIMD shift by register, complex, D-form
  353. def : InstRW<[A57Write_4cyc_1X], (instregex "^[SU][QR]{1,2}SHL(v1i8|v1i16|v1i32|v1i64|v8i8|v4i16|v2i32|b|d|h|s)")>;
  354. // ASIMD shift by register, complex, Q-form
  355. def : InstRW<[A57Write_5cyc_2X], (instregex "^[SU][QR]{1,2}SHL(v16i8|v8i16|v4i32|v2i64)")>;
  356. // Vector - Floating Point
  357. // -----------------------------------------------------------------------------
  358. // Reference for forms in this group
  359. // D form - v2f32
  360. // Q form - v4f32, v2f64
  361. // D form - 32, 64
  362. // D form - v1i32, v1i64
  363. // D form - v2i32
  364. // Q form - v4i32, v2i64
  365. // ASIMD FP arith, normal, D-form
  366. def : InstRW<[A57Write_5cyc_1V], (instregex "^(FABD|FADD|FSUB)(v2f32|32|64|v2i32p)")>;
  367. // ASIMD FP arith, normal, Q-form
  368. def : InstRW<[A57Write_5cyc_2V], (instregex "^(FABD|FADD|FSUB)(v4f32|v2f64|v2i64p)")>;
  369. // ASIMD FP arith, pairwise, D-form
  370. def : InstRW<[A57Write_5cyc_1V], (instregex "^FADDP(v2f32|32|64|v2i32)")>;
  371. // ASIMD FP arith, pairwise, Q-form
  372. def : InstRW<[A57Write_9cyc_3V], (instregex "^FADDP(v4f32|v2f64|v2i64)")>;
  373. // ASIMD FP compare, D-form
  374. def : InstRW<[A57Write_5cyc_1V], (instregex "^(FACGE|FACGT|FCMEQ|FCMGE|FCMGT|FCMLE|FCMLT)(v2f32|32|64|v1i32|v2i32|v1i64)")>;
  375. // ASIMD FP compare, Q-form
  376. def : InstRW<[A57Write_5cyc_2V], (instregex "^(FACGE|FACGT|FCMEQ|FCMGE|FCMGT|FCMLE|FCMLT)(v4f32|v2f64|v4i32|v2i64)")>;
  377. // ASIMD FP convert, long and narrow
  378. def : InstRW<[A57Write_8cyc_3V], (instregex "^FCVT(L|N|XN)v")>;
  379. // ASIMD FP convert, other, D-form
  380. def : InstRW<[A57Write_5cyc_1V], (instregex "^[FVSU]CVT([AMNPZ][SU])?(_Int)?(v2f32|v1i32|v2i32|v1i64)")>;
  381. // ASIMD FP convert, other, Q-form
  382. def : InstRW<[A57Write_5cyc_2V], (instregex "^[FVSU]CVT([AMNPZ][SU])?(_Int)?(v4f32|v2f64|v4i32|v2i64)")>;
  383. // ASIMD FP divide, D-form, F32
  384. def : InstRW<[A57Write_17cyc_1W], (instregex "FDIVv2f32")>;
  385. // ASIMD FP divide, Q-form, F32
  386. def : InstRW<[A57Write_34cyc_2W], (instregex "FDIVv4f32")>;
  387. // ASIMD FP divide, Q-form, F64
  388. def : InstRW<[A57Write_64cyc_2W], (instregex "FDIVv2f64")>;
  389. // Note: These were simply duplicated from ASIMD FDIV because of missing documentation
  390. // ASIMD FP square root, D-form, F32
  391. def : InstRW<[A57Write_17cyc_1W], (instregex "FSQRTv2f32")>;
  392. // ASIMD FP square root, Q-form, F32
  393. def : InstRW<[A57Write_34cyc_2W], (instregex "FSQRTv4f32")>;
  394. // ASIMD FP square root, Q-form, F64
  395. def : InstRW<[A57Write_64cyc_2W], (instregex "FSQRTv2f64")>;
  396. // ASIMD FP max/min, normal, D-form
  397. def : InstRW<[A57Write_5cyc_1V], (instregex "^(FMAX|FMIN)(NM)?(v2f32)")>;
  398. // ASIMD FP max/min, normal, Q-form
  399. def : InstRW<[A57Write_5cyc_2V], (instregex "^(FMAX|FMIN)(NM)?(v4f32|v2f64)")>;
  400. // ASIMD FP max/min, pairwise, D-form
  401. def : InstRW<[A57Write_5cyc_1V], (instregex "^(FMAX|FMIN)(NM)?P(v2f32|v2i32)")>;
  402. // ASIMD FP max/min, pairwise, Q-form
  403. def : InstRW<[A57Write_9cyc_3V], (instregex "^(FMAX|FMIN)(NM)?P(v4f32|v2f64|v2i64)")>;
  404. // ASIMD FP max/min, reduce
  405. def : InstRW<[A57Write_10cyc_3V], (instregex "^(FMAX|FMIN)(NM)?Vv")>;
  406. // ASIMD FP multiply, D-form, FZ
  407. def : InstRW<[A57Write_5cyc_1V_FP_Forward], (instregex "^FMULX?(v2f32|v1i32|v2i32|v1i64|32|64)")>;
  408. // ASIMD FP multiply, Q-form, FZ
  409. def : InstRW<[A57Write_5cyc_2V_FP_Forward], (instregex "^FMULX?(v4f32|v2f64|v4i32|v2i64)")>;
  410. // ASIMD FP multiply accumulate, D-form, FZ
  411. // ASIMD FP multiply accumulate, Q-form, FZ
  412. def A57WriteFPVMAD : SchedWriteRes<[A57UnitV]> { let Latency = 9; }
  413. def A57WriteFPVMAQ : SchedWriteRes<[A57UnitV, A57UnitV]> { let Latency = 10; }
  414. // Cortex A57 Software Optimization Guide Sec 3.15
  415. // Advances from FP mul and mul-accum to mul-accum
  416. def A57ReadFPVMA5 : SchedReadAdvance<5, [A57WriteFPVMAD, A57WriteFPVMAQ, A57Write_5cyc_1V_FP_Forward, A57Write_5cyc_2V_FP_Forward]>;
  417. def A57ReadFPVMA6 : SchedReadAdvance<6, [A57WriteFPVMAD, A57WriteFPVMAQ, A57Write_5cyc_1V_FP_Forward, A57Write_5cyc_2V_FP_Forward]>;
  418. def : InstRW<[A57WriteFPVMAD, A57ReadFPVMA5], (instregex "^FML[AS](v2f32|v1i32|v2i32|v1i64)")>;
  419. def : InstRW<[A57WriteFPVMAQ, A57ReadFPVMA6], (instregex "^FML[AS](v4f32|v2f64|v4i32|v2i64)")>;
  420. // ASIMD FP round, D-form
  421. def : InstRW<[A57Write_5cyc_1V], (instregex "^FRINT[AIMNPXZ](v2f32)")>;
  422. // ASIMD FP round, Q-form
  423. def : InstRW<[A57Write_5cyc_2V], (instregex "^FRINT[AIMNPXZ](v4f32|v2f64)")>;
  424. // Vector - Miscellaneous
  425. // -----------------------------------------------------------------------------
  426. // Reference for forms in this group
  427. // D form - v8i8, v4i16, v2i32
  428. // Q form - v16i8, v8i16, v4i32
  429. // D form - v1i8, v1i16, v1i32, v1i64
  430. // Q form - v16i8, v8i16, v4i32, v2i64
  431. // ASIMD bitwise insert, Q-form
  432. def : InstRW<[A57Write_3cyc_2V], (instregex "^(BIF|BIT|BSL|BSP)v16i8")>;
  433. // ASIMD duplicate, gen reg, D-form and Q-form
  434. def : InstRW<[A57Write_8cyc_1L_1V], (instregex "^DUP(i8|i16|i32|i64)$")>;
  435. def : InstRW<[A57Write_8cyc_1L_1V], (instregex "^DUPv.+gpr")>;
  436. // ASIMD move, saturating
  437. def : InstRW<[A57Write_4cyc_1X], (instregex "^[SU]QXTU?N")>;
  438. // ASIMD reciprocal estimate, D-form
  439. def : InstRW<[A57Write_5cyc_1V], (instregex "^[FU](RECP|RSQRT)(E|X)(v2f32|v1i32|v2i32|v1i64)")>;
  440. // ASIMD reciprocal estimate, Q-form
  441. def : InstRW<[A57Write_5cyc_2V], (instregex "^[FU](RECP|RSQRT)(E|X)(v2f64|v4f32|v4i32)")>;
  442. // ASIMD reciprocal step, D-form, FZ
  443. def : InstRW<[A57Write_9cyc_1V], (instregex "^F(RECP|RSQRT)S(v2f32|v1i32|v2i32|v1i64|32|64)")>;
  444. // ASIMD reciprocal step, Q-form, FZ
  445. def : InstRW<[A57Write_9cyc_2V], (instregex "^F(RECP|RSQRT)S(v2f64|v4f32|v4i32)")>;
  446. // ASIMD table lookup, D-form
  447. def : InstRW<[A57Write_3cyc_1V], (instregex "^TB[LX]v8i8One")>;
  448. def : InstRW<[A57Write_6cyc_2V], (instregex "^TB[LX]v8i8Two")>;
  449. def : InstRW<[A57Write_9cyc_3V], (instregex "^TB[LX]v8i8Three")>;
  450. def : InstRW<[A57Write_12cyc_4V], (instregex "^TB[LX]v8i8Four")>;
  451. // ASIMD table lookup, Q-form
  452. def : InstRW<[A57Write_6cyc_3V], (instregex "^TB[LX]v16i8One")>;
  453. def : InstRW<[A57Write_9cyc_5V], (instregex "^TB[LX]v16i8Two")>;
  454. def : InstRW<[A57Write_12cyc_7V], (instregex "^TB[LX]v16i8Three")>;
  455. def : InstRW<[A57Write_15cyc_9V], (instregex "^TB[LX]v16i8Four")>;
  456. // ASIMD transfer, element to gen reg
  457. def : InstRW<[A57Write_6cyc_1I_1L], (instregex "^[SU]MOVv")>;
  458. // ASIMD transfer, gen reg to element
  459. def : InstRW<[A57Write_8cyc_1L_1V], (instregex "^INSv")>;
  460. // ASIMD unzip/zip, Q-form
  461. def : InstRW<[A57Write_6cyc_3V], (instregex "^(UZP|ZIP)(1|2)(v16i8|v8i16|v4i32|v2i64)")>;
  462. // Remainder
  463. // -----------------------------------------------------------------------------
  464. def : InstRW<[A57Write_5cyc_1V], (instregex "^F(ADD|SUB)[DS]rr")>;
  465. // Cortex A57 Software Optimization Guide Sec 3.10
  466. def A57WriteFPMA : SchedWriteRes<[A57UnitV]> { let Latency = 9; }
  467. def A57ReadFPMA5 : SchedReadAdvance<5, [A57WriteFPMA, WriteFMul]>;
  468. def A57ReadFPM : SchedReadAdvance<0>;
  469. def : InstRW<[A57WriteFPMA, A57ReadFPM, A57ReadFPM, A57ReadFPMA5], (instregex "^FN?M(ADD|SUB)[DS]rrr")>;
  470. def : InstRW<[A57Write_10cyc_1L_1V], (instregex "^[FSU]CVT[AMNPZ][SU](_Int)?[SU]?[XW]?[DS]?[rds]i?")>;
  471. def : InstRW<[A57Write_10cyc_1L_1V], (instregex "^[SU]CVTF")>;
  472. def : InstRW<[A57Write_32cyc_1W], (instrs FDIVDrr)>;
  473. def : InstRW<[A57Write_17cyc_1W], (instrs FDIVSrr)>;
  474. def : InstRW<[A57Write_5cyc_1V], (instregex "^F(MAX|MIN).+rr")>;
  475. def : InstRW<[A57Write_5cyc_1V], (instregex "^FRINT.+r")>;
  476. def : InstRW<[A57Write_32cyc_1W], (instrs FSQRTDr)>;
  477. def : InstRW<[A57Write_17cyc_1W], (instrs FSQRTSr)>;
  478. def : InstRW<[A57Write_5cyc_1L, WriteLDHi], (instrs LDNPDi)>;
  479. def : InstRW<[A57Write_6cyc_2L, WriteLDHi], (instrs LDNPQi)>;
  480. def : InstRW<[A57Write_5cyc_1L, WriteLDHi], (instrs LDNPSi)>;
  481. def : InstRW<[A57Write_5cyc_1L, WriteLDHi], (instrs LDPDi)>;
  482. def : InstRW<[A57Write_5cyc_1L, WriteLDHi, WriteAdr], (instrs LDPDpost)>;
  483. def : InstRW<[A57Write_5cyc_1L, WriteLDHi, WriteAdr], (instrs LDPDpre)>;
  484. def : InstRW<[A57Write_6cyc_2L, WriteLDHi], (instrs LDPQi)>;
  485. def : InstRW<[A57Write_6cyc_2L, WriteLDHi, WriteAdr], (instrs LDPQpost)>;
  486. def : InstRW<[A57Write_6cyc_2L, WriteLDHi, WriteAdr], (instrs LDPQpre)>;
  487. def : InstRW<[A57Write_5cyc_1I_2L, WriteLDHi], (instrs LDPSWi)>;
  488. def : InstRW<[A57Write_5cyc_1I_2L, WriteLDHi, WriteAdr], (instrs LDPSWpost)>;
  489. def : InstRW<[A57Write_5cyc_1I_2L, WriteLDHi, WriteAdr], (instrs LDPSWpre)>;
  490. def : InstRW<[A57Write_5cyc_1L, WriteLDHi], (instrs LDPSi)>;
  491. def : InstRW<[A57Write_5cyc_1L, WriteLDHi, WriteAdr], (instrs LDPSpost)>;
  492. def : InstRW<[A57Write_5cyc_1L, WriteLDHi, WriteAdr], (instrs LDPSpre)>;
  493. def : InstRW<[A57Write_5cyc_1L, WriteI], (instrs LDRBpost)>;
  494. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instrs LDRBpre)>;
  495. def : InstRW<[A57Write_5cyc_1L, ReadAdrBase], (instrs LDRBroW)>;
  496. def : InstRW<[A57Write_5cyc_1L, ReadAdrBase], (instrs LDRBroX)>;
  497. def : InstRW<[A57Write_5cyc_1L], (instrs LDRBui)>;
  498. def : InstRW<[A57Write_5cyc_1L], (instrs LDRDl)>;
  499. def : InstRW<[A57Write_5cyc_1L, WriteI], (instrs LDRDpost)>;
  500. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instrs LDRDpre)>;
  501. def : InstRW<[A57Write_5cyc_1L, ReadAdrBase], (instrs LDRDroW)>;
  502. def : InstRW<[A57Write_5cyc_1L, ReadAdrBase], (instrs LDRDroX)>;
  503. def : InstRW<[A57Write_5cyc_1L], (instrs LDRDui)>;
  504. def : InstRW<[A57Write_5cyc_1I_1L, ReadAdrBase], (instrs LDRHHroW)>;
  505. def : InstRW<[A57Write_5cyc_1I_1L, ReadAdrBase], (instrs LDRHHroX)>;
  506. def : InstRW<[A57Write_5cyc_1L, WriteI], (instrs LDRHpost)>;
  507. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instrs LDRHpre)>;
  508. def : InstRW<[A57Write_6cyc_1I_1L, ReadAdrBase], (instrs LDRHroW)>;
  509. def : InstRW<[A57Write_6cyc_1I_1L, ReadAdrBase], (instrs LDRHroX)>;
  510. def : InstRW<[A57Write_5cyc_1L], (instrs LDRHui)>;
  511. def : InstRW<[A57Write_5cyc_1L], (instrs LDRQl)>;
  512. def : InstRW<[A57Write_5cyc_1L, WriteI], (instrs LDRQpost)>;
  513. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instrs LDRQpre)>;
  514. def : InstRW<[A57Write_6cyc_1I_1L, ReadAdrBase], (instrs LDRQroW)>;
  515. def : InstRW<[A57Write_6cyc_1I_1L, ReadAdrBase], (instrs LDRQroX)>;
  516. def : InstRW<[A57Write_5cyc_1L], (instrs LDRQui)>;
  517. def : InstRW<[A57Write_5cyc_1I_1L, ReadAdrBase], (instrs LDRSHWroW)>;
  518. def : InstRW<[A57Write_5cyc_1I_1L, ReadAdrBase], (instrs LDRSHWroX)>;
  519. def : InstRW<[A57Write_5cyc_1I_1L, ReadAdrBase], (instrs LDRSHXroW)>;
  520. def : InstRW<[A57Write_5cyc_1I_1L, ReadAdrBase], (instrs LDRSHXroX)>;
  521. def : InstRW<[A57Write_5cyc_1L], (instrs LDRSl)>;
  522. def : InstRW<[A57Write_5cyc_1L, WriteI], (instrs LDRSpost)>;
  523. def : InstRW<[A57Write_5cyc_1L, WriteAdr], (instrs LDRSpre)>;
  524. def : InstRW<[A57Write_5cyc_1L, ReadAdrBase], (instrs LDRSroW)>;
  525. def : InstRW<[A57Write_5cyc_1L, ReadAdrBase], (instrs LDRSroX)>;
  526. def : InstRW<[A57Write_5cyc_1L], (instrs LDRSui)>;
  527. def : InstRW<[A57Write_5cyc_1L], (instrs LDURBi)>;
  528. def : InstRW<[A57Write_5cyc_1L], (instrs LDURDi)>;
  529. def : InstRW<[A57Write_5cyc_1L], (instrs LDURHi)>;
  530. def : InstRW<[A57Write_5cyc_1L], (instrs LDURQi)>;
  531. def : InstRW<[A57Write_5cyc_1L], (instrs LDURSi)>;
  532. def : InstRW<[A57Write_2cyc_2S], (instrs STNPDi)>;
  533. def : InstRW<[A57Write_4cyc_1I_4S], (instrs STNPQi)>;
  534. def : InstRW<[A57Write_2cyc_2S], (instrs STNPXi)>;
  535. def : InstRW<[A57Write_2cyc_2S], (instrs STPDi)>;
  536. def : InstRW<[WriteAdr, A57Write_2cyc_1I_2S], (instrs STPDpost)>;
  537. def : InstRW<[WriteAdr, A57Write_2cyc_1I_2S], (instrs STPDpre)>;
  538. def : InstRW<[A57Write_4cyc_1I_4S], (instrs STPQi)>;
  539. def : InstRW<[WriteAdr, A57Write_4cyc_1I_4S], (instrs STPQpost)>;
  540. def : InstRW<[WriteAdr, A57Write_4cyc_2I_4S], (instrs STPQpre)>;
  541. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S], (instrs STPSpost)>;
  542. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S], (instrs STPSpre)>;
  543. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S], (instrs STPWpost)>;
  544. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S], (instrs STPWpre)>;
  545. def : InstRW<[A57Write_2cyc_2S], (instrs STPXi)>;
  546. def : InstRW<[WriteAdr, A57Write_2cyc_1I_2S], (instrs STPXpost)>;
  547. def : InstRW<[WriteAdr, A57Write_2cyc_1I_2S], (instrs STPXpre)>;
  548. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRBBpost)>;
  549. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRBBpre)>;
  550. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRBpost)>;
  551. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S], (instrs STRBpre)>;
  552. def : InstRW<[A57Write_3cyc_1I_1S, ReadAdrBase], (instrs STRBroW)>;
  553. def : InstRW<[A57Write_3cyc_1I_1S, ReadAdrBase], (instrs STRBroX)>;
  554. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRDpost)>;
  555. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S], (instrs STRDpre)>;
  556. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRHHpost)>;
  557. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRHHpre)>;
  558. def : InstRW<[A57Write_3cyc_1I_1S, ReadAdrBase], (instrs STRHHroW)>;
  559. def : InstRW<[A57Write_3cyc_1I_1S, ReadAdrBase], (instrs STRHHroX)>;
  560. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRHpost)>;
  561. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S], (instrs STRHpre)>;
  562. def : InstRW<[A57Write_3cyc_1I_1S, ReadAdrBase], (instrs STRHroW)>;
  563. def : InstRW<[A57Write_3cyc_1I_1S, ReadAdrBase], (instrs STRHroX)>;
  564. def : InstRW<[WriteAdr, A57Write_2cyc_1I_2S, ReadAdrBase], (instrs STRQpost)>;
  565. def : InstRW<[WriteAdr, A57Write_2cyc_1I_2S], (instrs STRQpre)>;
  566. def : InstRW<[A57Write_2cyc_1I_2S, ReadAdrBase], (instrs STRQroW)>;
  567. def : InstRW<[A57Write_2cyc_1I_2S, ReadAdrBase], (instrs STRQroX)>;
  568. def : InstRW<[A57Write_2cyc_1I_2S], (instrs STRQui)>;
  569. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRSpost)>;
  570. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S], (instrs STRSpre)>;
  571. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRWpost)>;
  572. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRWpre)>;
  573. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRXpost)>;
  574. def : InstRW<[WriteAdr, A57Write_1cyc_1I_1S, ReadAdrBase], (instrs STRXpre)>;
  575. def : InstRW<[A57Write_2cyc_2S], (instrs STURQi)>;
  576. } // SchedModel = CortexA57Model