1 //===-- X86Schedule.td - X86 Scheduling Definitions --------*- tablegen -*-===//
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
7 //===----------------------------------------------------------------------===//
9 //===----------------------------------------------------------------------===//
10 // InstrSchedModel annotations for out-of-order CPUs.
12 // Instructions with folded loads need to read the memory operand immediately,
13 // but other register operands don't have to be read until the load is ready.
14 // These operands are marked with ReadAfterLd.
15 def ReadAfterLd : SchedRead;
16 def ReadAfterVecLd : SchedRead;
17 def ReadAfterVecXLd : SchedRead;
18 def ReadAfterVecYLd : SchedRead;
20 // Instructions that move data between general purpose registers and vector
21 // registers may be subject to extra latency due to data bypass delays.
22 // This SchedRead describes a bypass delay caused by data being moved from the
23 // integer unit to the floating point unit.
24 def ReadInt2Fpu : SchedRead;
26 // Instructions with both a load and a store folded are modeled as a folded
28 def WriteRMW : SchedWrite;
30 // Helper to set SchedWrite ExePorts/Latency/ReleaseAtCycles/NumMicroOps.
31 multiclass X86WriteRes<SchedWrite SchedRW,
32 list<ProcResourceKind> ExePorts,
33 int Lat, list<int> Res, int UOps> {
34 def : WriteRes<SchedRW, ExePorts> {
36 let ReleaseAtCycles = Res;
37 let NumMicroOps = UOps;
41 // Most instructions can fold loads, so almost every SchedWrite comes in two
42 // variants: With and without a folded load.
43 // An X86FoldableSchedWrite holds a reference to the corresponding SchedWrite
44 // with a folded load.
45 class X86FoldableSchedWrite : SchedWrite {
46 // The SchedWrite to use when a load is folded into the instruction.
48 // The SchedRead to tag register operands than don't need to be ready
49 // until the folded load has completed.
50 SchedRead ReadAfterFold;
53 // Multiclass that produces a linked pair of SchedWrites.
54 multiclass X86SchedWritePair<SchedRead ReadAfter = ReadAfterLd> {
55 // Register-Memory operation.
57 // Register-Register operation.
58 def NAME : X86FoldableSchedWrite {
59 let Folded = !cast<SchedWrite>(NAME#"Ld");
60 let ReadAfterFold = ReadAfter;
64 // Helpers to mark SchedWrites as unsupported.
65 multiclass X86WriteResUnsupported<SchedWrite SchedRW> {
66 let Unsupported = 1 in {
67 def : WriteRes<SchedRW, []>;
70 multiclass X86WriteResPairUnsupported<X86FoldableSchedWrite SchedRW> {
71 let Unsupported = 1 in {
72 def : WriteRes<SchedRW, []>;
73 def : WriteRes<SchedRW.Folded, []>;
77 // Multiclass that wraps X86FoldableSchedWrite for each vector width.
78 class X86SchedWriteWidths<X86FoldableSchedWrite sScl,
79 X86FoldableSchedWrite s128,
80 X86FoldableSchedWrite s256,
81 X86FoldableSchedWrite s512> {
82 X86FoldableSchedWrite Scl = sScl; // Scalar float/double operations.
83 X86FoldableSchedWrite MMX = sScl; // MMX operations.
84 X86FoldableSchedWrite XMM = s128; // XMM operations.
85 X86FoldableSchedWrite YMM = s256; // YMM operations.
86 X86FoldableSchedWrite ZMM = s512; // ZMM operations.
89 // Multiclass that wraps X86SchedWriteWidths for each fp vector type.
90 class X86SchedWriteSizes<X86SchedWriteWidths sPH,
91 X86SchedWriteWidths sPS,
92 X86SchedWriteWidths sPD> {
93 X86SchedWriteWidths PH = sPH;
94 X86SchedWriteWidths PS = sPS;
95 X86SchedWriteWidths PD = sPD;
98 // Multiclass that wraps move/load/store triple for a vector width.
99 class X86SchedWriteMoveLS<SchedWrite MoveRR,
101 SchedWrite StoreMR> {
102 SchedWrite RR = MoveRR;
103 SchedWrite RM = LoadRM;
104 SchedWrite MR = StoreMR;
107 // Multiclass that wraps masked load/store writes for a vector width.
108 class X86SchedWriteMaskMove<SchedWrite LoadRM, SchedWrite StoreMR> {
109 SchedWrite RM = LoadRM;
110 SchedWrite MR = StoreMR;
113 // Multiclass that wraps X86SchedWriteMoveLS for each vector width.
114 class X86SchedWriteMoveLSWidths<X86SchedWriteMoveLS sScl,
115 X86SchedWriteMoveLS s128,
116 X86SchedWriteMoveLS s256,
117 X86SchedWriteMoveLS s512> {
118 X86SchedWriteMoveLS Scl = sScl; // Scalar float/double operations.
119 X86SchedWriteMoveLS MMX = sScl; // MMX operations.
120 X86SchedWriteMoveLS XMM = s128; // XMM operations.
121 X86SchedWriteMoveLS YMM = s256; // YMM operations.
122 X86SchedWriteMoveLS ZMM = s512; // ZMM operations.
125 // Loads, stores, and moves, not folded with other operations.
126 def WriteLoad : SchedWrite;
127 def WriteStore : SchedWrite;
128 def WriteStoreNT : SchedWrite;
129 def WriteMove : SchedWrite;
130 def WriteVecMaskedGatherWriteback : SchedWrite;
131 def WriteCopy : WriteSequence<[WriteLoad, WriteStore]>; // mem->mem copy
134 defm WriteALU : X86SchedWritePair; // Simple integer ALU op.
135 defm WriteADC : X86SchedWritePair; // Integer ALU + flags op.
136 def WriteALURMW : WriteSequence<[WriteALULd, WriteRMW]>;
137 def WriteADCRMW : WriteSequence<[WriteADCLd, WriteRMW]>;
138 def WriteLEA : SchedWrite; // LEA instructions can't fold loads.
140 // Integer multiplication
141 defm WriteIMul8 : X86SchedWritePair; // Integer 8-bit multiplication.
142 defm WriteIMul16 : X86SchedWritePair; // Integer 16-bit multiplication.
143 defm WriteIMul16Imm : X86SchedWritePair; // Integer 16-bit multiplication by immediate.
144 defm WriteIMul16Reg : X86SchedWritePair; // Integer 16-bit multiplication by register.
145 defm WriteIMul32 : X86SchedWritePair; // Integer 32-bit multiplication.
146 defm WriteIMul32Imm : X86SchedWritePair; // Integer 32-bit multiplication by immediate.
147 defm WriteIMul32Reg : X86SchedWritePair; // Integer 32-bit multiplication by register.
148 defm WriteIMul64 : X86SchedWritePair; // Integer 64-bit multiplication.
149 defm WriteIMul64Imm : X86SchedWritePair; // Integer 64-bit multiplication by immediate.
150 defm WriteIMul64Reg : X86SchedWritePair; // Integer 64-bit multiplication by register.
151 defm WriteMULX32 : X86SchedWritePair; // Integer 32-bit Multiplication without affecting flags.
152 defm WriteMULX64 : X86SchedWritePair; // Integer 64-bit Multiplication without affecting flags.
153 def WriteIMulH : SchedWrite; // Integer multiplication, high part (only used by the RR variant of MULX).
154 def WriteIMulHLd : SchedWrite; // Integer multiplication, high part (only used by the RM variant of MULX).
156 def WriteBSWAP32 : SchedWrite; // Byte Order (Endianness) 32-bit Swap.
157 def WriteBSWAP64 : SchedWrite; // Byte Order (Endianness) 64-bit Swap.
158 defm WriteCMPXCHG : X86SchedWritePair; // Compare and set, compare and swap.
159 def WriteCMPXCHGRMW : SchedWrite; // Compare and set, compare and swap.
160 def WriteXCHG : SchedWrite; // Compare+Exchange - TODO RMW support.
163 defm WriteDiv8 : X86SchedWritePair;
164 defm WriteDiv16 : X86SchedWritePair;
165 defm WriteDiv32 : X86SchedWritePair;
166 defm WriteDiv64 : X86SchedWritePair;
167 defm WriteIDiv8 : X86SchedWritePair;
168 defm WriteIDiv16 : X86SchedWritePair;
169 defm WriteIDiv32 : X86SchedWritePair;
170 defm WriteIDiv64 : X86SchedWritePair;
172 defm WriteBSF : X86SchedWritePair; // Bit scan forward.
173 defm WriteBSR : X86SchedWritePair; // Bit scan reverse.
174 defm WritePOPCNT : X86SchedWritePair; // Bit population count.
175 defm WriteLZCNT : X86SchedWritePair; // Leading zero count.
176 defm WriteTZCNT : X86SchedWritePair; // Trailing zero count.
177 defm WriteCMOV : X86SchedWritePair; // Conditional move.
178 def WriteFCMOV : SchedWrite; // X87 conditional move.
179 def WriteSETCC : SchedWrite; // Set register based on condition code.
180 def WriteSETCCStore : SchedWrite;
181 def WriteLAHFSAHF : SchedWrite; // Load/Store flags in AH.
183 def WriteBitTest : SchedWrite; // Bit Test
184 def WriteBitTestImmLd : SchedWrite;
185 def WriteBitTestRegLd : SchedWrite;
187 def WriteBitTestSet : SchedWrite; // Bit Test + Set
188 def WriteBitTestSetImmLd : SchedWrite;
189 def WriteBitTestSetRegLd : SchedWrite;
190 def WriteBitTestSetImmRMW : WriteSequence<[WriteBitTestSetImmLd, WriteRMW]>;
191 def WriteBitTestSetRegRMW : WriteSequence<[WriteBitTestSetRegLd, WriteRMW]>;
193 // Integer shifts and rotates.
194 defm WriteShift : X86SchedWritePair;
195 defm WriteShiftCL : X86SchedWritePair;
196 defm WriteRotate : X86SchedWritePair;
197 defm WriteRotateCL : X86SchedWritePair;
199 // Double shift instructions.
200 def WriteSHDrri : SchedWrite;
201 def WriteSHDrrcl : SchedWrite;
202 def WriteSHDmri : SchedWrite;
203 def WriteSHDmrcl : SchedWrite;
205 // BMI1 BEXTR/BLS, BMI2 BZHI
206 defm WriteBEXTR : X86SchedWritePair;
207 defm WriteBLS : X86SchedWritePair;
208 defm WriteBZHI : X86SchedWritePair;
210 // Idioms that clear a register, like xorps %xmm0, %xmm0.
211 // These can often bypass execution ports completely.
212 def WriteZero : SchedWrite;
214 // Branches don't produce values, so they have no latency, but they still
215 // consume resources. Indirect branches can fold loads.
216 defm WriteJump : X86SchedWritePair;
218 // Floating point. This covers both scalar and vector operations.
219 def WriteFLD0 : SchedWrite;
220 def WriteFLD1 : SchedWrite;
221 def WriteFLDC : SchedWrite;
222 def WriteFLoad : SchedWrite;
223 def WriteFLoadX : SchedWrite;
224 def WriteFLoadY : SchedWrite;
225 def WriteFMaskedLoad : SchedWrite;
226 def WriteFMaskedLoadY : SchedWrite;
227 def WriteFStore : SchedWrite;
228 def WriteFStoreX : SchedWrite;
229 def WriteFStoreY : SchedWrite;
230 def WriteFStoreNT : SchedWrite;
231 def WriteFStoreNTX : SchedWrite;
232 def WriteFStoreNTY : SchedWrite;
234 def WriteFMaskedStore32 : SchedWrite;
235 def WriteFMaskedStore64 : SchedWrite;
236 def WriteFMaskedStore32Y : SchedWrite;
237 def WriteFMaskedStore64Y : SchedWrite;
239 def WriteFMove : SchedWrite;
240 def WriteFMoveX : SchedWrite;
241 def WriteFMoveY : SchedWrite;
242 def WriteFMoveZ : SchedWrite;
244 defm WriteFAdd : X86SchedWritePair<ReadAfterVecLd>; // Floating point add/sub.
245 defm WriteFAddX : X86SchedWritePair<ReadAfterVecXLd>; // Floating point add/sub (XMM).
246 defm WriteFAddY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point add/sub (YMM).
247 defm WriteFAddZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point add/sub (ZMM).
248 defm WriteFAdd64 : X86SchedWritePair<ReadAfterVecLd>; // Floating point double add/sub.
249 defm WriteFAdd64X : X86SchedWritePair<ReadAfterVecXLd>; // Floating point double add/sub (XMM).
250 defm WriteFAdd64Y : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double add/sub (YMM).
251 defm WriteFAdd64Z : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double add/sub (ZMM).
252 defm WriteFCmp : X86SchedWritePair<ReadAfterVecLd>; // Floating point compare.
253 defm WriteFCmpX : X86SchedWritePair<ReadAfterVecXLd>; // Floating point compare (XMM).
254 defm WriteFCmpY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point compare (YMM).
255 defm WriteFCmpZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point compare (ZMM).
256 defm WriteFCmp64 : X86SchedWritePair<ReadAfterVecLd>; // Floating point double compare.
257 defm WriteFCmp64X : X86SchedWritePair<ReadAfterVecXLd>; // Floating point double compare (XMM).
258 defm WriteFCmp64Y : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double compare (YMM).
259 defm WriteFCmp64Z : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double compare (ZMM).
260 defm WriteFCom : X86SchedWritePair<ReadAfterVecLd>; // Floating point compare to flags (X87).
261 defm WriteFComX : X86SchedWritePair<ReadAfterVecLd>; // Floating point compare to flags (SSE).
262 defm WriteFMul : X86SchedWritePair<ReadAfterVecLd>; // Floating point multiplication.
263 defm WriteFMulX : X86SchedWritePair<ReadAfterVecXLd>; // Floating point multiplication (XMM).
264 defm WriteFMulY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point multiplication (YMM).
265 defm WriteFMulZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point multiplication (YMM).
266 defm WriteFMul64 : X86SchedWritePair<ReadAfterVecLd>; // Floating point double multiplication.
267 defm WriteFMul64X : X86SchedWritePair<ReadAfterVecXLd>; // Floating point double multiplication (XMM).
268 defm WriteFMul64Y : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double multiplication (YMM).
269 defm WriteFMul64Z : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double multiplication (ZMM).
270 defm WriteFDiv : X86SchedWritePair<ReadAfterVecLd>; // Floating point division.
271 defm WriteFDivX : X86SchedWritePair<ReadAfterVecXLd>; // Floating point division (XMM).
272 defm WriteFDivY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point division (YMM).
273 defm WriteFDivZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point division (ZMM).
274 defm WriteFDiv64 : X86SchedWritePair<ReadAfterVecLd>; // Floating point double division.
275 defm WriteFDiv64X : X86SchedWritePair<ReadAfterVecXLd>; // Floating point double division (XMM).
276 defm WriteFDiv64Y : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double division (YMM).
277 defm WriteFDiv64Z : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double division (ZMM).
278 defm WriteFSqrt : X86SchedWritePair<ReadAfterVecLd>; // Floating point square root.
279 defm WriteFSqrtX : X86SchedWritePair<ReadAfterVecXLd>; // Floating point square root (XMM).
280 defm WriteFSqrtY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point square root (YMM).
281 defm WriteFSqrtZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point square root (ZMM).
282 defm WriteFSqrt64 : X86SchedWritePair<ReadAfterVecLd>; // Floating point double square root.
283 defm WriteFSqrt64X : X86SchedWritePair<ReadAfterVecXLd>; // Floating point double square root (XMM).
284 defm WriteFSqrt64Y : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double square root (YMM).
285 defm WriteFSqrt64Z : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double square root (ZMM).
286 defm WriteFSqrt80 : X86SchedWritePair<ReadAfterVecLd>; // Floating point long double square root.
287 defm WriteFRcp : X86SchedWritePair<ReadAfterVecLd>; // Floating point reciprocal estimate.
288 defm WriteFRcpX : X86SchedWritePair<ReadAfterVecXLd>; // Floating point reciprocal estimate (XMM).
289 defm WriteFRcpY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point reciprocal estimate (YMM).
290 defm WriteFRcpZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point reciprocal estimate (ZMM).
291 defm WriteFRsqrt : X86SchedWritePair<ReadAfterVecLd>; // Floating point reciprocal square root estimate.
292 defm WriteFRsqrtX: X86SchedWritePair<ReadAfterVecXLd>; // Floating point reciprocal square root estimate (XMM).
293 defm WriteFRsqrtY: X86SchedWritePair<ReadAfterVecYLd>; // Floating point reciprocal square root estimate (YMM).
294 defm WriteFRsqrtZ: X86SchedWritePair<ReadAfterVecYLd>; // Floating point reciprocal square root estimate (ZMM).
295 defm WriteFMA : X86SchedWritePair<ReadAfterVecLd>; // Fused Multiply Add.
296 defm WriteFMAX : X86SchedWritePair<ReadAfterVecXLd>; // Fused Multiply Add (XMM).
297 defm WriteFMAY : X86SchedWritePair<ReadAfterVecYLd>; // Fused Multiply Add (YMM).
298 defm WriteFMAZ : X86SchedWritePair<ReadAfterVecYLd>; // Fused Multiply Add (ZMM).
299 defm WriteDPPD : X86SchedWritePair<ReadAfterVecXLd>; // Floating point double dot product.
300 defm WriteDPPS : X86SchedWritePair<ReadAfterVecXLd>; // Floating point single dot product.
301 defm WriteDPPSY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point single dot product (YMM).
302 defm WriteFSign : X86SchedWritePair<ReadAfterVecLd>; // Floating point fabs/fchs.
303 defm WriteFRnd : X86SchedWritePair<ReadAfterVecXLd>; // Floating point rounding.
304 defm WriteFRndY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point rounding (YMM).
305 defm WriteFRndZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point rounding (ZMM).
306 defm WriteFLogic : X86SchedWritePair<ReadAfterVecXLd>; // Floating point and/or/xor logicals.
307 defm WriteFLogicY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point and/or/xor logicals (YMM).
308 defm WriteFLogicZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point and/or/xor logicals (ZMM).
309 defm WriteFTest : X86SchedWritePair<ReadAfterVecXLd>; // Floating point TEST instructions.
310 defm WriteFTestY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point TEST instructions (YMM).
311 defm WriteFTestZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point TEST instructions (ZMM).
312 defm WriteFShuffle : X86SchedWritePair<ReadAfterVecXLd>; // Floating point vector shuffles.
313 defm WriteFShuffleY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point vector shuffles (YMM).
314 defm WriteFShuffleZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point vector shuffles (ZMM).
315 defm WriteFVarShuffle : X86SchedWritePair<ReadAfterVecXLd>; // Floating point vector variable shuffles.
316 defm WriteFVarShuffleY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point vector variable shuffles (YMM).
317 defm WriteFVarShuffleZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point vector variable shuffles (ZMM).
318 defm WriteFBlend : X86SchedWritePair<ReadAfterVecXLd>; // Floating point vector blends.
319 defm WriteFBlendY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point vector blends (YMM).
320 defm WriteFBlendZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point vector blends (ZMM).
321 defm WriteFVarBlend : X86SchedWritePair<ReadAfterVecXLd>; // Fp vector variable blends.
322 defm WriteFVarBlendY : X86SchedWritePair<ReadAfterVecYLd>; // Fp vector variable blends (YMM).
323 defm WriteFVarBlendZ : X86SchedWritePair<ReadAfterVecYLd>; // Fp vector variable blends (YMZMM).
325 // FMA Scheduling helper class.
326 class FMASC { X86FoldableSchedWrite Sched = WriteFAdd; }
328 // Horizontal Add/Sub (float and integer)
329 defm WriteFHAdd : X86SchedWritePair<ReadAfterVecXLd>;
330 defm WriteFHAddY : X86SchedWritePair<ReadAfterVecYLd>;
331 defm WriteFHAddZ : X86SchedWritePair<ReadAfterVecYLd>;
332 defm WritePHAdd : X86SchedWritePair<ReadAfterVecLd>;
333 defm WritePHAddX : X86SchedWritePair<ReadAfterVecXLd>;
334 defm WritePHAddY : X86SchedWritePair<ReadAfterVecYLd>;
335 defm WritePHAddZ : X86SchedWritePair<ReadAfterVecYLd>;
337 // Vector integer operations.
338 def WriteVecLoad : SchedWrite;
339 def WriteVecLoadX : SchedWrite;
340 def WriteVecLoadY : SchedWrite;
341 def WriteVecLoadNT : SchedWrite;
342 def WriteVecLoadNTY : SchedWrite;
343 def WriteVecMaskedLoad : SchedWrite;
344 def WriteVecMaskedLoadY : SchedWrite;
345 def WriteVecStore : SchedWrite;
346 def WriteVecStoreX : SchedWrite;
347 def WriteVecStoreY : SchedWrite;
348 def WriteVecStoreNT : SchedWrite;
349 def WriteVecStoreNTY : SchedWrite;
350 def WriteVecMaskedStore32 : SchedWrite;
351 def WriteVecMaskedStore64 : SchedWrite;
352 def WriteVecMaskedStore32Y : SchedWrite;
353 def WriteVecMaskedStore64Y : SchedWrite;
354 def WriteVecMove : SchedWrite;
355 def WriteVecMoveX : SchedWrite;
356 def WriteVecMoveY : SchedWrite;
357 def WriteVecMoveZ : SchedWrite;
358 def WriteVecMoveToGpr : SchedWrite;
359 def WriteVecMoveFromGpr : SchedWrite;
361 defm WriteVecALU : X86SchedWritePair<ReadAfterVecLd>; // Vector integer ALU op, no logicals.
362 defm WriteVecALUX : X86SchedWritePair<ReadAfterVecXLd>; // Vector integer ALU op, no logicals (XMM).
363 defm WriteVecALUY : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer ALU op, no logicals (YMM).
364 defm WriteVecALUZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer ALU op, no logicals (ZMM).
365 defm WriteVecLogic : X86SchedWritePair<ReadAfterVecLd>; // Vector integer and/or/xor logicals.
366 defm WriteVecLogicX : X86SchedWritePair<ReadAfterVecXLd>; // Vector integer and/or/xor logicals (XMM).
367 defm WriteVecLogicY : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer and/or/xor logicals (YMM).
368 defm WriteVecLogicZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer and/or/xor logicals (ZMM).
369 defm WriteVecTest : X86SchedWritePair<ReadAfterVecXLd>; // Vector integer TEST instructions.
370 defm WriteVecTestY : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer TEST instructions (YMM).
371 defm WriteVecTestZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer TEST instructions (ZMM).
372 defm WriteVecShift : X86SchedWritePair<ReadAfterVecLd>; // Vector integer shifts (default).
373 defm WriteVecShiftX : X86SchedWritePair<ReadAfterVecXLd>; // Vector integer shifts (XMM).
374 defm WriteVecShiftY : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer shifts (YMM).
375 defm WriteVecShiftZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer shifts (ZMM).
376 defm WriteVecShiftImm : X86SchedWritePair<ReadAfterVecLd>; // Vector integer immediate shifts (default).
377 defm WriteVecShiftImmX: X86SchedWritePair<ReadAfterVecXLd>; // Vector integer immediate shifts (XMM).
378 defm WriteVecShiftImmY: X86SchedWritePair<ReadAfterVecYLd>; // Vector integer immediate shifts (YMM).
379 defm WriteVecShiftImmZ: X86SchedWritePair<ReadAfterVecYLd>; // Vector integer immediate shifts (ZMM).
380 defm WriteVecIMul : X86SchedWritePair<ReadAfterVecLd>; // Vector integer multiply (default).
381 defm WriteVecIMulX : X86SchedWritePair<ReadAfterVecXLd>; // Vector integer multiply (XMM).
382 defm WriteVecIMulY : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer multiply (YMM).
383 defm WriteVecIMulZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer multiply (ZMM).
384 defm WritePMULLD : X86SchedWritePair<ReadAfterVecXLd>; // Vector PMULLD.
385 defm WritePMULLDY : X86SchedWritePair<ReadAfterVecYLd>; // Vector PMULLD (YMM).
386 defm WritePMULLDZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector PMULLD (ZMM).
387 defm WriteShuffle : X86SchedWritePair<ReadAfterVecLd>; // Vector shuffles.
388 defm WriteShuffleX : X86SchedWritePair<ReadAfterVecXLd>; // Vector shuffles (XMM).
389 defm WriteShuffleY : X86SchedWritePair<ReadAfterVecYLd>; // Vector shuffles (YMM).
390 defm WriteShuffleZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector shuffles (ZMM).
391 defm WriteVarShuffle : X86SchedWritePair<ReadAfterVecLd>; // Vector variable shuffles.
392 defm WriteVarShuffleX : X86SchedWritePair<ReadAfterVecXLd>; // Vector variable shuffles (XMM).
393 defm WriteVarShuffleY : X86SchedWritePair<ReadAfterVecYLd>; // Vector variable shuffles (YMM).
394 defm WriteVarShuffleZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector variable shuffles (ZMM).
395 defm WriteBlend : X86SchedWritePair<ReadAfterVecXLd>; // Vector blends.
396 defm WriteBlendY : X86SchedWritePair<ReadAfterVecYLd>; // Vector blends (YMM).
397 defm WriteBlendZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector blends (ZMM).
398 defm WriteVarBlend : X86SchedWritePair<ReadAfterVecXLd>; // Vector variable blends.
399 defm WriteVarBlendY : X86SchedWritePair<ReadAfterVecYLd>; // Vector variable blends (YMM).
400 defm WriteVarBlendZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector variable blends (ZMM).
401 defm WritePSADBW : X86SchedWritePair<ReadAfterVecLd>; // Vector PSADBW.
402 defm WritePSADBWX : X86SchedWritePair<ReadAfterVecXLd>; // Vector PSADBW (XMM).
403 defm WritePSADBWY : X86SchedWritePair<ReadAfterVecYLd>; // Vector PSADBW (YMM).
404 defm WritePSADBWZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector PSADBW (ZMM).
405 defm WriteMPSAD : X86SchedWritePair<ReadAfterVecXLd>; // Vector MPSAD.
406 defm WriteMPSADY : X86SchedWritePair<ReadAfterVecYLd>; // Vector MPSAD (YMM).
407 defm WriteMPSADZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector MPSAD (ZMM).
408 defm WritePHMINPOS : X86SchedWritePair<ReadAfterVecXLd>; // Vector PHMINPOS.
410 // Vector insert/extract operations.
411 defm WriteVecInsert : X86SchedWritePair; // Insert gpr to vector element.
412 def WriteVecExtract : SchedWrite; // Extract vector element to gpr.
413 def WriteVecExtractSt : SchedWrite; // Extract vector element and store.
415 // MOVMSK operations.
416 def WriteFMOVMSK : SchedWrite;
417 def WriteVecMOVMSK : SchedWrite;
418 def WriteVecMOVMSKY : SchedWrite;
419 def WriteMMXMOVMSK : SchedWrite;
421 // Conversion between integer and float.
422 defm WriteCvtSD2I : X86SchedWritePair<ReadAfterVecLd>; // Double -> Integer.
423 defm WriteCvtPD2I : X86SchedWritePair<ReadAfterVecXLd>; // Double -> Integer (XMM).
424 defm WriteCvtPD2IY : X86SchedWritePair<ReadAfterVecYLd>; // Double -> Integer (YMM).
425 defm WriteCvtPD2IZ : X86SchedWritePair<ReadAfterVecYLd>; // Double -> Integer (ZMM).
427 defm WriteCvtSS2I : X86SchedWritePair<ReadAfterVecLd>; // Float -> Integer.
428 defm WriteCvtPS2I : X86SchedWritePair<ReadAfterVecXLd>; // Float -> Integer (XMM).
429 defm WriteCvtPS2IY : X86SchedWritePair<ReadAfterVecYLd>; // Float -> Integer (YMM).
430 defm WriteCvtPS2IZ : X86SchedWritePair<ReadAfterVecYLd>; // Float -> Integer (ZMM).
432 defm WriteCvtI2SD : X86SchedWritePair<ReadAfterVecLd>; // Integer -> Double.
433 defm WriteCvtI2PD : X86SchedWritePair<ReadAfterVecXLd>; // Integer -> Double (XMM).
434 defm WriteCvtI2PDY : X86SchedWritePair<ReadAfterVecYLd>; // Integer -> Double (YMM).
435 defm WriteCvtI2PDZ : X86SchedWritePair<ReadAfterVecYLd>; // Integer -> Double (ZMM).
437 defm WriteCvtI2SS : X86SchedWritePair<ReadAfterVecLd>; // Integer -> Float.
438 defm WriteCvtI2PS : X86SchedWritePair<ReadAfterVecXLd>; // Integer -> Float (XMM).
439 defm WriteCvtI2PSY : X86SchedWritePair<ReadAfterVecYLd>; // Integer -> Float (YMM).
440 defm WriteCvtI2PSZ : X86SchedWritePair<ReadAfterVecYLd>; // Integer -> Float (ZMM).
442 defm WriteCvtSS2SD : X86SchedWritePair<ReadAfterVecLd>; // Float -> Double size conversion.
443 defm WriteCvtPS2PD : X86SchedWritePair<ReadAfterVecXLd>; // Float -> Double size conversion (XMM).
444 defm WriteCvtPS2PDY : X86SchedWritePair<ReadAfterVecYLd>; // Float -> Double size conversion (YMM).
445 defm WriteCvtPS2PDZ : X86SchedWritePair<ReadAfterVecYLd>; // Float -> Double size conversion (ZMM).
447 defm WriteCvtSD2SS : X86SchedWritePair<ReadAfterVecLd>; // Double -> Float size conversion.
448 defm WriteCvtPD2PS : X86SchedWritePair<ReadAfterVecXLd>; // Double -> Float size conversion (XMM).
449 defm WriteCvtPD2PSY : X86SchedWritePair<ReadAfterVecYLd>; // Double -> Float size conversion (YMM).
450 defm WriteCvtPD2PSZ : X86SchedWritePair<ReadAfterVecYLd>; // Double -> Float size conversion (ZMM).
452 defm WriteCvtPH2PS : X86SchedWritePair<ReadAfterVecXLd>; // Half -> Float size conversion.
453 defm WriteCvtPH2PSY : X86SchedWritePair<ReadAfterVecYLd>; // Half -> Float size conversion (YMM).
454 defm WriteCvtPH2PSZ : X86SchedWritePair<ReadAfterVecYLd>; // Half -> Float size conversion (ZMM).
456 def WriteCvtPS2PH : SchedWrite; // // Float -> Half size conversion.
457 def WriteCvtPS2PHY : SchedWrite; // // Float -> Half size conversion (YMM).
458 def WriteCvtPS2PHZ : SchedWrite; // // Float -> Half size conversion (ZMM).
459 def WriteCvtPS2PHSt : SchedWrite; // // Float -> Half + store size conversion.
460 def WriteCvtPS2PHYSt : SchedWrite; // // Float -> Half + store size conversion (YMM).
461 def WriteCvtPS2PHZSt : SchedWrite; // // Float -> Half + store size conversion (ZMM).
463 // CRC32 instruction.
464 defm WriteCRC32 : X86SchedWritePair<ReadAfterLd>;
466 // Strings instructions.
467 // Packed Compare Implicit Length Strings, Return Mask
468 defm WritePCmpIStrM : X86SchedWritePair<ReadAfterVecXLd>;
469 // Packed Compare Explicit Length Strings, Return Mask
470 defm WritePCmpEStrM : X86SchedWritePair<ReadAfterVecXLd>;
471 // Packed Compare Implicit Length Strings, Return Index
472 defm WritePCmpIStrI : X86SchedWritePair<ReadAfterVecXLd>;
473 // Packed Compare Explicit Length Strings, Return Index
474 defm WritePCmpEStrI : X86SchedWritePair<ReadAfterVecXLd>;
477 defm WriteAESDecEnc : X86SchedWritePair<ReadAfterVecXLd>; // Decryption, encryption.
478 defm WriteAESIMC : X86SchedWritePair<ReadAfterVecXLd>; // InvMixColumn.
479 defm WriteAESKeyGen : X86SchedWritePair<ReadAfterVecXLd>; // Key Generation.
481 // Carry-less multiplication instructions.
482 defm WriteCLMul : X86SchedWritePair<ReadAfterVecXLd>;
485 def WriteEMMS : SchedWrite;
488 def WriteLDMXCSR : SchedWrite;
489 def WriteSTMXCSR : SchedWrite;
491 // Catch-all for expensive system instructions.
492 def WriteSystem : SchedWrite;
495 defm WriteFShuffle256 : X86SchedWritePair<ReadAfterVecYLd>; // Fp 256-bit width vector shuffles.
496 defm WriteFVarShuffle256 : X86SchedWritePair<ReadAfterVecYLd>; // Fp 256-bit width variable shuffles.
497 defm WriteShuffle256 : X86SchedWritePair<ReadAfterVecYLd>; // 256-bit width vector shuffles.
498 defm WriteVPMOV256 : X86SchedWritePair<ReadAfterVecYLd>; // 256-bit width packed vector width-changing move.
499 defm WriteVarShuffle256 : X86SchedWritePair<ReadAfterVecYLd>; // 256-bit width vector variable shuffles.
500 defm WriteVarVecShift : X86SchedWritePair<ReadAfterVecXLd>; // Variable vector shifts.
501 defm WriteVarVecShiftY : X86SchedWritePair<ReadAfterVecYLd>; // Variable vector shifts (YMM).
502 defm WriteVarVecShiftZ : X86SchedWritePair<ReadAfterVecYLd>; // Variable vector shifts (ZMM).
504 // Old microcoded instructions that nobody use.
505 def WriteMicrocoded : SchedWrite;
507 // Fence instructions.
508 def WriteFence : SchedWrite;
510 // Nop, not very useful expect it provides a model for nops!
511 def WriteNop : SchedWrite;
513 // Move/Load/Store wrappers.
515 : X86SchedWriteMoveLS<WriteFMove, WriteFLoad, WriteFStore>;
517 : X86SchedWriteMoveLS<WriteFMoveX, WriteFLoadX, WriteFStoreX>;
519 : X86SchedWriteMoveLS<WriteFMoveY, WriteFLoadY, WriteFStoreY>;
521 : X86SchedWriteMoveLS<WriteFMoveZ, WriteFLoadY, WriteFStoreY>;
522 def SchedWriteFMoveLS
523 : X86SchedWriteMoveLSWidths<WriteFMoveLS, WriteFMoveLSX,
524 WriteFMoveLSY, WriteFMoveLSZ>;
527 : X86SchedWriteMoveLS<WriteFMove, WriteFLoad, WriteFStoreNT>;
529 : X86SchedWriteMoveLS<WriteFMove, WriteFLoad, WriteFStoreNTX>;
531 : X86SchedWriteMoveLS<WriteFMoveY, WriteFLoadY, WriteFStoreNTY>;
532 def SchedWriteFMoveLSNT
533 : X86SchedWriteMoveLSWidths<WriteFMoveLSNT, WriteFMoveLSNTX,
534 WriteFMoveLSNTY, WriteFMoveLSNTY>;
537 : X86SchedWriteMoveLS<WriteVecMove, WriteVecLoad, WriteVecStore>;
539 : X86SchedWriteMoveLS<WriteVecMoveX, WriteVecLoadX, WriteVecStoreX>;
541 : X86SchedWriteMoveLS<WriteVecMoveY, WriteVecLoadY, WriteVecStoreY>;
543 : X86SchedWriteMoveLS<WriteVecMoveZ, WriteVecLoadY, WriteVecStoreY>;
544 def SchedWriteVecMoveLS
545 : X86SchedWriteMoveLSWidths<WriteVecMoveLS, WriteVecMoveLSX,
546 WriteVecMoveLSY, WriteVecMoveLSZ>;
549 : X86SchedWriteMoveLS<WriteVecMove, WriteVecLoadNT, WriteVecStoreNT>;
550 def WriteVecMoveLSNTX
551 : X86SchedWriteMoveLS<WriteVecMoveX, WriteVecLoadNT, WriteVecStoreNT>;
552 def WriteVecMoveLSNTY
553 : X86SchedWriteMoveLS<WriteVecMoveY, WriteVecLoadNTY, WriteVecStoreNTY>;
554 def SchedWriteVecMoveLSNT
555 : X86SchedWriteMoveLSWidths<WriteVecMoveLSNT, WriteVecMoveLSNTX,
556 WriteVecMoveLSNTY, WriteVecMoveLSNTY>;
558 // Conditional SIMD Packed Loads and Stores wrappers.
560 : X86SchedWriteMaskMove<WriteFMaskedLoad, WriteFMaskedStore32>;
562 : X86SchedWriteMaskMove<WriteFMaskedLoad, WriteFMaskedStore64>;
563 def WriteFMaskMove32Y
564 : X86SchedWriteMaskMove<WriteFMaskedLoadY, WriteFMaskedStore32Y>;
565 def WriteFMaskMove64Y
566 : X86SchedWriteMaskMove<WriteFMaskedLoadY, WriteFMaskedStore64Y>;
567 def WriteVecMaskMove32
568 : X86SchedWriteMaskMove<WriteVecMaskedLoad, WriteVecMaskedStore32>;
569 def WriteVecMaskMove64
570 : X86SchedWriteMaskMove<WriteVecMaskedLoad, WriteVecMaskedStore64>;
571 def WriteVecMaskMove32Y
572 : X86SchedWriteMaskMove<WriteVecMaskedLoadY, WriteVecMaskedStore32Y>;
573 def WriteVecMaskMove64Y
574 : X86SchedWriteMaskMove<WriteVecMaskedLoadY, WriteVecMaskedStore64Y>;
576 // Vector width wrappers.
578 : X86SchedWriteWidths<WriteFAdd, WriteFAddX, WriteFAddY, WriteFAddZ>;
580 : X86SchedWriteWidths<WriteFAdd64, WriteFAdd64X, WriteFAdd64Y, WriteFAdd64Z>;
582 : X86SchedWriteWidths<WriteFHAdd, WriteFHAdd, WriteFHAddY, WriteFHAddZ>;
584 : X86SchedWriteWidths<WriteFCmp, WriteFCmpX, WriteFCmpY, WriteFCmpZ>;
586 : X86SchedWriteWidths<WriteFCmp64, WriteFCmp64X, WriteFCmp64Y, WriteFCmp64Z>;
588 : X86SchedWriteWidths<WriteFMul, WriteFMulX, WriteFMulY, WriteFMulZ>;
590 : X86SchedWriteWidths<WriteFMul64, WriteFMul64X, WriteFMul64Y, WriteFMul64Z>;
592 : X86SchedWriteWidths<WriteFMA, WriteFMAX, WriteFMAY, WriteFMAZ>;
594 : X86SchedWriteWidths<WriteDPPD, WriteDPPD, WriteDPPD, WriteDPPD>;
596 : X86SchedWriteWidths<WriteDPPS, WriteDPPS, WriteDPPSY, WriteDPPSY>;
598 : X86SchedWriteWidths<WriteFDiv, WriteFDivX, WriteFDivY, WriteFDivZ>;
600 : X86SchedWriteWidths<WriteFDiv64, WriteFDiv64X, WriteFDiv64Y, WriteFDiv64Z>;
602 : X86SchedWriteWidths<WriteFSqrt, WriteFSqrtX,
603 WriteFSqrtY, WriteFSqrtZ>;
604 def SchedWriteFSqrt64
605 : X86SchedWriteWidths<WriteFSqrt64, WriteFSqrt64X,
606 WriteFSqrt64Y, WriteFSqrt64Z>;
608 : X86SchedWriteWidths<WriteFRcp, WriteFRcpX, WriteFRcpY, WriteFRcpZ>;
610 : X86SchedWriteWidths<WriteFRsqrt, WriteFRsqrtX, WriteFRsqrtY, WriteFRsqrtZ>;
612 : X86SchedWriteWidths<WriteFRnd, WriteFRnd, WriteFRndY, WriteFRndZ>;
614 : X86SchedWriteWidths<WriteFLogic, WriteFLogic, WriteFLogicY, WriteFLogicZ>;
616 : X86SchedWriteWidths<WriteFTest, WriteFTest, WriteFTestY, WriteFTestZ>;
618 def SchedWriteFShuffle
619 : X86SchedWriteWidths<WriteFShuffle, WriteFShuffle,
620 WriteFShuffleY, WriteFShuffleZ>;
621 def SchedWriteFVarShuffle
622 : X86SchedWriteWidths<WriteFVarShuffle, WriteFVarShuffle,
623 WriteFVarShuffleY, WriteFVarShuffleZ>;
625 : X86SchedWriteWidths<WriteFBlend, WriteFBlend, WriteFBlendY, WriteFBlendZ>;
626 def SchedWriteFVarBlend
627 : X86SchedWriteWidths<WriteFVarBlend, WriteFVarBlend,
628 WriteFVarBlendY, WriteFVarBlendZ>;
630 def SchedWriteCvtDQ2PD
631 : X86SchedWriteWidths<WriteCvtI2SD, WriteCvtI2PD,
632 WriteCvtI2PDY, WriteCvtI2PDZ>;
633 def SchedWriteCvtDQ2PS
634 : X86SchedWriteWidths<WriteCvtI2SS, WriteCvtI2PS,
635 WriteCvtI2PSY, WriteCvtI2PSZ>;
636 def SchedWriteCvtPD2DQ
637 : X86SchedWriteWidths<WriteCvtSD2I, WriteCvtPD2I,
638 WriteCvtPD2IY, WriteCvtPD2IZ>;
639 def SchedWriteCvtPS2DQ
640 : X86SchedWriteWidths<WriteCvtSS2I, WriteCvtPS2I,
641 WriteCvtPS2IY, WriteCvtPS2IZ>;
642 def SchedWriteCvtPS2PD
643 : X86SchedWriteWidths<WriteCvtSS2SD, WriteCvtPS2PD,
644 WriteCvtPS2PDY, WriteCvtPS2PDZ>;
645 def SchedWriteCvtPD2PS
646 : X86SchedWriteWidths<WriteCvtSD2SS, WriteCvtPD2PS,
647 WriteCvtPD2PSY, WriteCvtPD2PSZ>;
650 : X86SchedWriteWidths<WriteVecALU, WriteVecALUX, WriteVecALUY, WriteVecALUZ>;
652 : X86SchedWriteWidths<WritePHAdd, WritePHAddX, WritePHAddY, WritePHAddZ>;
653 def SchedWriteVecLogic
654 : X86SchedWriteWidths<WriteVecLogic, WriteVecLogicX,
655 WriteVecLogicY, WriteVecLogicZ>;
656 def SchedWriteVecTest
657 : X86SchedWriteWidths<WriteVecTest, WriteVecTest,
658 WriteVecTestY, WriteVecTestZ>;
659 def SchedWriteVecShift
660 : X86SchedWriteWidths<WriteVecShift, WriteVecShiftX,
661 WriteVecShiftY, WriteVecShiftZ>;
662 def SchedWriteVecShiftImm
663 : X86SchedWriteWidths<WriteVecShiftImm, WriteVecShiftImmX,
664 WriteVecShiftImmY, WriteVecShiftImmZ>;
665 def SchedWriteVarVecShift
666 : X86SchedWriteWidths<WriteVarVecShift, WriteVarVecShift,
667 WriteVarVecShiftY, WriteVarVecShiftZ>;
668 def SchedWriteVecIMul
669 : X86SchedWriteWidths<WriteVecIMul, WriteVecIMulX,
670 WriteVecIMulY, WriteVecIMulZ>;
672 : X86SchedWriteWidths<WritePMULLD, WritePMULLD,
673 WritePMULLDY, WritePMULLDZ>;
675 : X86SchedWriteWidths<WriteMPSAD, WriteMPSAD,
676 WriteMPSADY, WriteMPSADZ>;
678 : X86SchedWriteWidths<WritePSADBW, WritePSADBWX,
679 WritePSADBWY, WritePSADBWZ>;
681 def SchedWriteVecExtend
682 : X86SchedWriteWidths<WriteShuffle, WriteShuffleX,
683 WriteVPMOV256, WriteVPMOV256>;
684 def SchedWriteVecTruncate
685 : X86SchedWriteWidths<WriteVPMOV256, WriteVPMOV256,
686 WriteVPMOV256, WriteVPMOV256>;
687 def SchedWriteShuffle
688 : X86SchedWriteWidths<WriteShuffle, WriteShuffleX,
689 WriteShuffleY, WriteShuffleZ>;
690 def SchedWriteVarShuffle
691 : X86SchedWriteWidths<WriteVarShuffle, WriteVarShuffleX,
692 WriteVarShuffleY, WriteVarShuffleZ>;
694 : X86SchedWriteWidths<WriteBlend, WriteBlend, WriteBlendY, WriteBlendZ>;
695 def SchedWriteVarBlend
696 : X86SchedWriteWidths<WriteVarBlend, WriteVarBlend,
697 WriteVarBlendY, WriteVarBlendZ>;
699 // Vector size wrappers.
700 // FIXME: Currently PH uses the same schedule method as PS.
701 // We may refine them later.
702 def SchedWriteFAddSizes
703 : X86SchedWriteSizes<SchedWriteFAdd, SchedWriteFAdd, SchedWriteFAdd64>;
704 def SchedWriteFCmpSizes
705 : X86SchedWriteSizes<SchedWriteFCmp, SchedWriteFCmp, SchedWriteFCmp64>;
706 def SchedWriteFMulSizes
707 : X86SchedWriteSizes<SchedWriteFMul, SchedWriteFMul, SchedWriteFMul64>;
708 def SchedWriteFDivSizes
709 : X86SchedWriteSizes<SchedWriteFDiv, SchedWriteFDiv, SchedWriteFDiv64>;
710 def SchedWriteFSqrtSizes
711 : X86SchedWriteSizes<SchedWriteFSqrt, SchedWriteFSqrt, SchedWriteFSqrt64>;
712 def SchedWriteFLogicSizes
713 : X86SchedWriteSizes<SchedWriteFLogic, SchedWriteFLogic, SchedWriteFLogic>;
714 def SchedWriteFShuffleSizes
715 : X86SchedWriteSizes<SchedWriteFShuffle, SchedWriteFShuffle, SchedWriteFShuffle>;
717 //===----------------------------------------------------------------------===//
718 // Generic Processor Scheduler Models.
720 // IssueWidth is analogous to the number of decode units. Core and its
721 // descendents, including Nehalem and SandyBridge have 4 decoders.
722 // Resources beyond the decoder operate on micro-ops and are bufferred
723 // so adjacent micro-ops don't directly compete.
725 // MicroOpBufferSize > 1 indicates that RAW dependencies can be
726 // decoded in the same cycle. The value 32 is a reasonably arbitrary
727 // number of in-flight instructions.
729 // HighLatency=10 is optimistic. X86InstrInfo::isHighLatencyDef
730 // indicates high latency opcodes. Alternatively, InstrItinData
731 // entries may be included here to define specific operand
732 // latencies. Since these latencies are not used for pipeline hazards,
733 // they do not need to be exact.
735 // The GenericX86Model contains no instruction schedules
736 // and disables PostRAScheduler.
737 class GenericX86Model : SchedMachineModel {
739 let MicroOpBufferSize = 32;
741 let HighLatency = 10;
742 let PostRAScheduler = 0;
743 let CompleteModel = 0;
746 def GenericModel : GenericX86Model;
748 // Define a model with the PostRAScheduler enabled.
749 def GenericPostRAModel : GenericX86Model {
750 let PostRAScheduler = 1;