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