xref: /freebsd/contrib/llvm-project/llvm/lib/Target/X86/X86SchedAlderlakeP.td (revision b1879975794772ee51f0b4865753364c7d7626c3)
1//===- X86SchedAlderlakeP.td - X86 Alderlake-P Scheduling ----*- 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 Alderlake-P core to support
10// instruction scheduling and other instruction cost heuristics.
11//
12//===----------------------------------------------------------------------===//
13
14def AlderlakePModel : SchedMachineModel {
15  // Alderlake-P core can allocate 6 uops per cycle.
16  let IssueWidth = 6; // Based on allocator width.
17  let MicroOpBufferSize = 512; // Based on the reorder buffer.
18  let LoadLatency = 5;
19  let MispredictPenalty = 14;
20
21  // Latency for microcoded instructions or instructions without latency info.
22  int MaxLatency = 100;
23
24  // Based on the LSD (loop-stream detector) queue size (ST).
25  let LoopMicroOpBufferSize = 72;
26
27  // This flag is set to allow the scheduler to assign a default model to
28  // unrecognized opcodes.
29  let CompleteModel = 0;
30}
31
32let SchedModel = AlderlakePModel in {
33
34// Alderlake-P core can issue micro-ops to 12 different ports in one cycle.
35def ADLPPort00 : ProcResource<1>;
36def ADLPPort01 : ProcResource<1>;
37def ADLPPort02 : ProcResource<1>;
38def ADLPPort03 : ProcResource<1>;
39def ADLPPort04 : ProcResource<1>;
40def ADLPPort05 : ProcResource<1>;
41def ADLPPort06 : ProcResource<1>;
42def ADLPPort07 : ProcResource<1>;
43def ADLPPort08 : ProcResource<1>;
44def ADLPPort09 : ProcResource<1>;
45def ADLPPort10 : ProcResource<1>;
46def ADLPPort11 : ProcResource<1>;
47
48// Workaround to represent invalid ports. WriteRes shouldn't use this resource.
49def ADLPPortInvalid : ProcResource<1>;
50
51// Many micro-ops are capable of issuing on multiple ports.
52def ADLPPort00_01          : ProcResGroup<[ADLPPort00, ADLPPort01]>;
53def ADLPPort00_01_05       : ProcResGroup<[ADLPPort00, ADLPPort01, ADLPPort05]>;
54def ADLPPort00_01_05_06    : ProcResGroup<[ADLPPort00, ADLPPort01, ADLPPort05, ADLPPort06]>;
55def ADLPPort00_05          : ProcResGroup<[ADLPPort00, ADLPPort05]>;
56def ADLPPort00_05_06       : ProcResGroup<[ADLPPort00, ADLPPort05, ADLPPort06]>;
57def ADLPPort00_06          : ProcResGroup<[ADLPPort00, ADLPPort06]>;
58def ADLPPort01_05          : ProcResGroup<[ADLPPort01, ADLPPort05]>;
59def ADLPPort01_05_10       : ProcResGroup<[ADLPPort01, ADLPPort05, ADLPPort10]>;
60def ADLPPort02_03          : ProcResGroup<[ADLPPort02, ADLPPort03]>;
61def ADLPPort02_03_07       : ProcResGroup<[ADLPPort02, ADLPPort03, ADLPPort07]>;
62def ADLPPort02_03_11       : ProcResGroup<[ADLPPort02, ADLPPort03, ADLPPort11]>;
63def ADLPPort02_03_10       : ProcResGroup<[ADLPPort02, ADLPPort03, ADLPPort10]>;
64def ADLPPort05_11          : ProcResGroup<[ADLPPort05, ADLPPort11]>;
65def ADLPPort07_08          : ProcResGroup<[ADLPPort07, ADLPPort08]>;
66
67// EU has 112 reservation stations.
68def ADLPPort00_01_05_06_10 : ProcResGroup<[ADLPPort00, ADLPPort01, ADLPPort05,
69                                           ADLPPort06, ADLPPort10]> {
70  let BufferSize = 112;
71}
72
73// STD has 48 reservation stations.
74def ADLPPort04_09          : ProcResGroup<[ADLPPort04, ADLPPort09]> {
75  let BufferSize = 48;
76}
77
78// MEM has 72 reservation stations.
79def ADLPPort02_03_07_08_11 : ProcResGroup<[ADLPPort02, ADLPPort03, ADLPPort07,
80                                           ADLPPort08, ADLPPort11]> {
81  let BufferSize = 72;
82}
83
84def ADLPPortAny : ProcResGroup<[ADLPPort00, ADLPPort01, ADLPPort02, ADLPPort03,
85                                ADLPPort04, ADLPPort05, ADLPPort06, ADLPPort07,
86                                ADLPPort08, ADLPPort09, ADLPPort10, ADLPPort11]>;
87
88// Integer loads are 5 cycles, so ReadAfterLd registers needn't be available
89// until 5 cycles after the memory operand.
90def : ReadAdvance<ReadAfterLd, 5>;
91
92// Vector loads are 6 cycles, so ReadAfterVec*Ld registers needn't be available
93// until 6 cycles after the memory operand.
94def : ReadAdvance<ReadAfterVecLd, 6>;
95def : ReadAdvance<ReadAfterVecXLd, 6>;
96def : ReadAdvance<ReadAfterVecYLd, 6>;
97
98def : ReadAdvance<ReadInt2Fpu, 0>;
99
100// Many SchedWrites are defined in pairs with and without a folded load.
101// Instructions with folded loads are usually micro-fused, so they only appear
102// as two micro-ops when queued in the reservation station.
103// This multiclass defines the resource usage for variants with and without
104// folded loads.
105multiclass ADLPWriteResPair<X86FoldableSchedWrite SchedRW,
106                            list<ProcResourceKind> ExePorts,
107                            int Lat, list<int> Res = [1], int UOps = 1,
108                            int LoadLat = 5, int LoadUOps = 1> {
109  // Register variant is using a single cycle on ExePort.
110  def : WriteRes<SchedRW, ExePorts> {
111    let Latency = Lat;
112    let ReleaseAtCycles = Res;
113    let NumMicroOps = UOps;
114  }
115
116  // Memory variant also uses a cycle on port 2/3/11 and adds LoadLat cycles to
117  // the latency (default = 5).
118  def : WriteRes<SchedRW.Folded, !listconcat([ADLPPort02_03_11], ExePorts)> {
119    let Latency = !add(Lat, LoadLat);
120    let ReleaseAtCycles = !listconcat([1], Res);
121    let NumMicroOps = !add(UOps, LoadUOps);
122  }
123}
124
125//===----------------------------------------------------------------------===//
126// The following definitons are infered by smg.
127//===----------------------------------------------------------------------===//
128
129// Infered SchedWrite definition.
130def : WriteRes<WriteADC, [ADLPPort00_06]>;
131defm : X86WriteRes<WriteADCLd, [ADLPPort00_01_05_06_10, ADLPPort00_06], 11, [1, 1], 2>;
132defm : ADLPWriteResPair<WriteAESDecEnc, [ADLPPort00_01], 5, [1], 1, 7>;
133defm : ADLPWriteResPair<WriteAESIMC, [ADLPPort00_01], 8, [2], 2, 7>;
134defm : X86WriteRes<WriteAESKeyGen, [ADLPPort00, ADLPPort00_01, ADLPPort00_01_05, ADLPPort00_06, ADLPPort01_05, ADLPPort05], 7, [4, 1, 1, 2, 3, 3], 14>;
135defm : X86WriteRes<WriteAESKeyGenLd, [ADLPPort00, ADLPPort00_01, ADLPPort00_06, ADLPPort01_05, ADLPPort02_03_11, ADLPPort05], 12, [4, 1, 2, 3, 1, 3], 14>;
136def : WriteRes<WriteALU, [ADLPPort00_01_05_06_10]>;
137def : WriteRes<WriteALULd, [ADLPPort00_01_05_06_10]> {
138  let Latency = 11;
139}
140defm : ADLPWriteResPair<WriteBEXTR, [ADLPPort00_06, ADLPPort01], 6, [1, 1], 2>;
141defm : ADLPWriteResPair<WriteBLS, [ADLPPort01_05_10], 2, [1]>;
142defm : ADLPWriteResPair<WriteBSF, [ADLPPort01], 3, [1]>;
143defm : ADLPWriteResPair<WriteBSR, [ADLPPort01], 3, [1]>;
144def : WriteRes<WriteBSWAP32, [ADLPPort01]>;
145defm : X86WriteRes<WriteBSWAP64, [ADLPPort00_06, ADLPPort01], 2, [1, 1], 2>;
146defm : ADLPWriteResPair<WriteBZHI, [ADLPPort01], 3, [1]>;
147def : WriteRes<WriteBitTest, [ADLPPort01]>;
148defm : X86WriteRes<WriteBitTestImmLd, [ADLPPort01, ADLPPort02_03_11], 6, [1, 1], 2>;
149defm : X86WriteRes<WriteBitTestRegLd, [ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort01_05_10, ADLPPort02_03_11], 11, [4, 2, 1, 2, 1], 10>;
150def : WriteRes<WriteBitTestSet, [ADLPPort01]>;
151def : WriteRes<WriteBitTestSetImmLd, [ADLPPort01]> {
152  let Latency = 11;
153}
154defm : X86WriteRes<WriteBitTestSetRegLd, [ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort01_05_10], 17, [3, 2, 1, 2], 8>;
155defm : ADLPWriteResPair<WriteBlend, [ADLPPort01_05], 1, [1], 1, 7>;
156defm : ADLPWriteResPair<WriteBlendY, [ADLPPort00_01_05], 1, [1], 1, 8>;
157defm : ADLPWriteResPair<WriteCLMul, [ADLPPort05], 3, [1], 1, 7>;
158defm : ADLPWriteResPair<WriteCMOV, [ADLPPort00_06], 1, [1], 1, 6>;
159defm : X86WriteRes<WriteCMPXCHG, [ADLPPort00_01_05_06_10, ADLPPort00_06], 3, [3, 2], 5>;
160defm : X86WriteRes<WriteCMPXCHGRMW, [ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08], 12, [1, 2, 1, 1, 1], 6>;
161defm : ADLPWriteResPair<WriteCRC32, [ADLPPort01], 3, [1]>;
162defm : X86WriteRes<WriteCvtI2PD, [ADLPPort00_01, ADLPPort05], 5, [1, 1], 2>;
163defm : X86WriteRes<WriteCvtI2PDLd, [ADLPPort00_01, ADLPPort02_03_11], 11, [1, 1], 2>;
164defm : X86WriteRes<WriteCvtI2PDY, [ADLPPort00_01, ADLPPort05], 7, [1, 1], 2>;
165defm : X86WriteRes<WriteCvtI2PDYLd, [ADLPPort00_01, ADLPPort02_03_11], 12, [1, 1], 2>;
166defm : X86WriteResPairUnsupported<WriteCvtI2PDZ>;
167defm : ADLPWriteResPair<WriteCvtI2PS, [ADLPPort00_01], 4, [1], 1, 7>;
168defm : ADLPWriteResPair<WriteCvtI2PSY, [ADLPPort00_01], 4, [1], 1, 8>;
169defm : X86WriteResPairUnsupported<WriteCvtI2PSZ>;
170defm : X86WriteRes<WriteCvtI2SD, [ADLPPort00_01, ADLPPort05], 7, [1, 1], 2>;
171defm : X86WriteRes<WriteCvtI2SDLd, [ADLPPort00_01, ADLPPort02_03_11], 11, [1, 1], 2>;
172defm : X86WriteRes<WriteCvtI2SS, [ADLPPort00_01, ADLPPort05], 7, [1, 1], 2>;
173defm : X86WriteRes<WriteCvtI2SSLd, [ADLPPort00_01, ADLPPort02_03_11], 11, [1, 1], 2>;
174defm : ADLPWriteResPair<WriteCvtPD2I, [ADLPPort00_01, ADLPPort05], 5, [1, 1], 2, 7>;
175defm : ADLPWriteResPair<WriteCvtPD2IY, [ADLPPort00_01, ADLPPort05], 7, [1, 1], 2, 8>;
176defm : X86WriteResPairUnsupported<WriteCvtPD2IZ>;
177defm : ADLPWriteResPair<WriteCvtPD2PS, [ADLPPort00_01, ADLPPort05], 5, [1, 1], 2, 7>;
178defm : ADLPWriteResPair<WriteCvtPD2PSY, [ADLPPort00_01, ADLPPort05], 7, [1, 1], 2, 8>;
179defm : X86WriteResPairUnsupported<WriteCvtPD2PSZ>;
180defm : X86WriteRes<WriteCvtPH2PS, [ADLPPort00_01, ADLPPort05], 6, [1, 1], 2>;
181defm : X86WriteRes<WriteCvtPH2PSLd, [ADLPPort00_01, ADLPPort02_03_11], 12, [1, 1], 2>;
182defm : X86WriteRes<WriteCvtPH2PSY, [ADLPPort00_01, ADLPPort05], 8, [1, 1], 2>;
183defm : X86WriteRes<WriteCvtPH2PSYLd, [ADLPPort00_01, ADLPPort02_03_11], 12, [1, 1], 2>;
184defm : X86WriteResPairUnsupported<WriteCvtPH2PSZ>;
185defm : ADLPWriteResPair<WriteCvtPS2I, [ADLPPort00_01], 4, [1], 1, 7>;
186defm : ADLPWriteResPair<WriteCvtPS2IY, [ADLPPort00_01], 4, [1], 1, 8>;
187defm : X86WriteResPairUnsupported<WriteCvtPS2IZ>;
188defm : X86WriteRes<WriteCvtPS2PD, [ADLPPort00_01, ADLPPort05], 5, [1, 1], 2>;
189defm : X86WriteRes<WriteCvtPS2PDLd, [ADLPPort00_01, ADLPPort02_03_11], 11, [1, 1], 2>;
190defm : X86WriteRes<WriteCvtPS2PDY, [ADLPPort00_01, ADLPPort05], 7, [1, 1], 2>;
191defm : X86WriteRes<WriteCvtPS2PDYLd, [ADLPPort00_01, ADLPPort02_03_11], 12, [1, 1], 2>;
192defm : X86WriteResPairUnsupported<WriteCvtPS2PDZ>;
193defm : X86WriteRes<WriteCvtPS2PH, [ADLPPort00_01, ADLPPort05], 6, [1, 1], 2>;
194defm : X86WriteRes<WriteCvtPS2PHSt, [ADLPPort00_01, ADLPPort04_09, ADLPPort07_08], 12, [1, 1, 1], 3>;
195defm : X86WriteRes<WriteCvtPS2PHY, [ADLPPort00_01, ADLPPort05], 8, [1, 1], 2>;
196defm : X86WriteRes<WriteCvtPS2PHYSt, [ADLPPort00_01, ADLPPort04_09, ADLPPort07_08], 12, [1, 1, 1], 3>;
197defm : X86WriteResUnsupported<WriteCvtPS2PHZ>;
198defm : X86WriteResUnsupported<WriteCvtPS2PHZSt>;
199defm : ADLPWriteResPair<WriteCvtSD2I, [ADLPPort00, ADLPPort00_01], 7, [1, 1], 2>;
200defm : ADLPWriteResPair<WriteCvtSD2SS, [ADLPPort00_01, ADLPPort05], 5, [1, 1], 2, 7>;
201defm : ADLPWriteResPair<WriteCvtSS2I, [ADLPPort00, ADLPPort00_01], 7, [1, 1], 2>;
202defm : X86WriteRes<WriteCvtSS2SD, [ADLPPort00_01, ADLPPort05], 5, [1, 1], 2>;
203defm : X86WriteRes<WriteCvtSS2SDLd, [ADLPPort00_01, ADLPPort02_03_11], 11, [1, 1], 2>;
204defm : ADLPWriteResPair<WriteDPPD, [ADLPPort00_01, ADLPPort01_05], 9, [2, 1], 3, 7>;
205defm : ADLPWriteResPair<WriteDPPS, [ADLPPort00_01, ADLPPort00_06, ADLPPort01_05, ADLPPort05], 14, [2, 1, 2, 1], 6, 7>;
206defm : ADLPWriteResPair<WriteDPPSY, [ADLPPort00_01, ADLPPort00_06, ADLPPort01_05, ADLPPort05], 14, [2, 1, 2, 1], 6, 8>;
207defm : ADLPWriteResPair<WriteDiv16, [ADLPPort00_01_05_06_10, ADLPPort01], 16, [1, 3], 4, 4>;
208defm : ADLPWriteResPair<WriteDiv32, [ADLPPort00_01_05_06_10, ADLPPort01], 15, [1, 3], 4, 4>;
209defm : ADLPWriteResPair<WriteDiv64, [ADLPPort01], 18, [3], 3>;
210defm : X86WriteRes<WriteDiv8, [ADLPPort01], 17, [3], 3>;
211defm : X86WriteRes<WriteDiv8Ld, [ADLPPort01], 22, [3], 3>;
212defm : X86WriteRes<WriteEMMS, [ADLPPort00, ADLPPort00_05, ADLPPort00_06], 10, [1, 8, 1], 10>;
213def : WriteRes<WriteFAdd, [ADLPPort05]> {
214  let Latency = 3;
215}
216defm : X86WriteRes<WriteFAddLd, [ADLPPort01_05, ADLPPort02_03_11], 10, [1, 1], 2>;
217defm : ADLPWriteResPair<WriteFAdd64, [ADLPPort01_05], 3, [1], 1, 7>;
218defm : ADLPWriteResPair<WriteFAdd64X, [ADLPPort01_05], 3, [1], 1, 7>;
219defm : ADLPWriteResPair<WriteFAdd64Y, [ADLPPort01_05], 3, [1], 1, 8>;
220defm : X86WriteResPairUnsupported<WriteFAdd64Z>;
221defm : ADLPWriteResPair<WriteFAddX, [ADLPPort01_05], 3, [1], 1, 7>;
222defm : ADLPWriteResPair<WriteFAddY, [ADLPPort01_05], 3, [1], 1, 8>;
223defm : X86WriteResPairUnsupported<WriteFAddZ>;
224defm : ADLPWriteResPair<WriteFBlend, [ADLPPort00_01_05], 1, [1], 1, 7>;
225defm : ADLPWriteResPair<WriteFBlendY, [ADLPPort00_01_05], 1, [1], 1, 8>;
226def : WriteRes<WriteFCMOV, [ADLPPort01]> {
227  let Latency = 3;
228}
229defm : ADLPWriteResPair<WriteFCmp, [ADLPPort00_01], 4, [1], 1, 7>;
230defm : ADLPWriteResPair<WriteFCmp64, [ADLPPort00_01], 4, [1], 1, 7>;
231defm : ADLPWriteResPair<WriteFCmp64X, [ADLPPort00_01], 4, [1], 1, 7>;
232defm : ADLPWriteResPair<WriteFCmp64Y, [ADLPPort00_01], 4, [1], 1, 8>;
233defm : X86WriteResPairUnsupported<WriteFCmp64Z>;
234defm : ADLPWriteResPair<WriteFCmpX, [ADLPPort00_01], 4, [1], 1, 7>;
235defm : ADLPWriteResPair<WriteFCmpY, [ADLPPort00_01], 4, [1], 1, 8>;
236defm : X86WriteResPairUnsupported<WriteFCmpZ>;
237def : WriteRes<WriteFCom, [ADLPPort05]>;
238defm : X86WriteRes<WriteFComLd, [ADLPPort02_03, ADLPPort05], 8, [1, 1], 2>;
239defm : ADLPWriteResPair<WriteFComX, [ADLPPort00], 3, [1]>;
240defm : ADLPWriteResPair<WriteFDiv, [ADLPPort00], 11, [1], 1, 7>;
241defm : ADLPWriteResPair<WriteFDiv64, [ADLPPort00], 14, [1]>;
242defm : ADLPWriteResPair<WriteFDiv64X, [ADLPPort00], 14, [1], 1, 6>;
243defm : ADLPWriteResPair<WriteFDiv64Y, [ADLPPort00], 14, [1], 1, 7>;
244defm : X86WriteResPairUnsupported<WriteFDiv64Z>;
245defm : ADLPWriteResPair<WriteFDivX, [ADLPPort00], 11, [1], 1, 7>;
246defm : ADLPWriteResPair<WriteFDivY, [ADLPPort00], 11, [1], 1, 8>;
247defm : X86WriteResPairUnsupported<WriteFDivZ>;
248defm : ADLPWriteResPair<WriteFHAdd, [ADLPPort01_05, ADLPPort05], 6, [1, 2], 3, 6>;
249defm : ADLPWriteResPair<WriteFHAddY, [ADLPPort01_05, ADLPPort05], 5, [1, 2], 3, 8>;
250def : WriteRes<WriteFLD0, [ADLPPort00_05]>;
251defm : X86WriteRes<WriteFLD1, [ADLPPort00_05], 1, [2], 2>;
252defm : X86WriteRes<WriteFLDC, [ADLPPort00_05], 1, [2], 2>;
253def : WriteRes<WriteFLoad, [ADLPPort02_03_11]> {
254  let Latency = 7;
255}
256def : WriteRes<WriteFLoadX, [ADLPPort02_03_11]> {
257  let Latency = 7;
258}
259def : WriteRes<WriteFLoadY, [ADLPPort02_03_11]> {
260  let Latency = 8;
261}
262defm : ADLPWriteResPair<WriteFLogic, [ADLPPort00_01_05], 1, [1], 1, 7>;
263defm : ADLPWriteResPair<WriteFLogicY, [ADLPPort00_01_05], 1, [1], 1, 8>;
264defm : X86WriteResPairUnsupported<WriteFLogicZ>;
265defm : ADLPWriteResPair<WriteFMA, [ADLPPort00_01], 4, [1], 1, 7>;
266defm : ADLPWriteResPair<WriteFMAX, [ADLPPort00_01], 4, [1], 1, 7>;
267defm : ADLPWriteResPair<WriteFMAY, [ADLPPort00_01], 4, [1], 1, 8>;
268defm : X86WriteResPairUnsupported<WriteFMAZ>;
269def : WriteRes<WriteFMOVMSK, [ADLPPort00]> {
270  let Latency = 3;
271}
272defm : X86WriteRes<WriteFMaskedLoad, [ADLPPort00_01_05, ADLPPort02_03_11], 8, [1, 1], 2>;
273defm : X86WriteRes<WriteFMaskedLoadY, [ADLPPort00_01_05, ADLPPort02_03_11], 9, [1, 1], 2>;
274defm : X86WriteRes<WriteFMaskedStore32, [ADLPPort00, ADLPPort04_09, ADLPPort07_08], 14, [1, 1, 1], 3>;
275defm : X86WriteRes<WriteFMaskedStore32Y, [ADLPPort00, ADLPPort04_09, ADLPPort07_08], 14, [1, 1, 1], 3>;
276defm : X86WriteRes<WriteFMaskedStore64, [ADLPPort00, ADLPPort04_09, ADLPPort07_08], 14, [1, 1, 1], 3>;
277defm : X86WriteRes<WriteFMaskedStore64Y, [ADLPPort00, ADLPPort04_09, ADLPPort07_08], 14, [1, 1, 1], 3>;
278defm : X86WriteRes<WriteFMoveX, [], 1, [], 0>;
279defm : X86WriteRes<WriteFMoveY, [], 1, [], 0>;
280defm : X86WriteResUnsupported<WriteFMoveZ>;
281defm : ADLPWriteResPair<WriteFMul, [ADLPPort00_01], 4, [1], 1, 7>;
282defm : ADLPWriteResPair<WriteFMul64, [ADLPPort00_01], 4, [1], 1, 7>;
283defm : ADLPWriteResPair<WriteFMul64X, [ADLPPort00_01], 4, [1], 1, 7>;
284defm : ADLPWriteResPair<WriteFMul64Y, [ADLPPort00_01], 4, [1], 1, 8>;
285defm : X86WriteResPairUnsupported<WriteFMul64Z>;
286defm : ADLPWriteResPair<WriteFMulX, [ADLPPort00_01], 4, [1], 1, 7>;
287defm : ADLPWriteResPair<WriteFMulY, [ADLPPort00_01], 4, [1], 1, 8>;
288defm : X86WriteResPairUnsupported<WriteFMulZ>;
289defm : ADLPWriteResPair<WriteFRcp, [ADLPPort00], 4, [1], 1, 7>;
290defm : ADLPWriteResPair<WriteFRcpX, [ADLPPort00], 4, [1], 1, 7>;
291defm : ADLPWriteResPair<WriteFRcpY, [ADLPPort00], 4, [1], 1, 8>;
292defm : X86WriteResPairUnsupported<WriteFRcpZ>;
293defm : ADLPWriteResPair<WriteFRnd, [ADLPPort00_01], 8, [2], 2, 7>;
294defm : ADLPWriteResPair<WriteFRndY, [ADLPPort00_01], 8, [2], 2, 8>;
295defm : X86WriteResPairUnsupported<WriteFRndZ>;
296defm : ADLPWriteResPair<WriteFRsqrt, [ADLPPort00], 4, [1], 1, 7>;
297defm : ADLPWriteResPair<WriteFRsqrtX, [ADLPPort00], 4, [1], 1, 7>;
298defm : ADLPWriteResPair<WriteFRsqrtY, [ADLPPort00], 4, [1], 1, 8>;
299defm : X86WriteResPairUnsupported<WriteFRsqrtZ>;
300defm : ADLPWriteResPair<WriteFShuffle, [ADLPPort05], 1, [1], 1, 7>;
301defm : ADLPWriteResPair<WriteFShuffle256, [ADLPPort05], 3, [1], 1, 8>;
302defm : ADLPWriteResPair<WriteFShuffleY, [ADLPPort05], 1, [1], 1, 8>;
303defm : X86WriteResPairUnsupported<WriteFShuffleZ>;
304def : WriteRes<WriteFSign, [ADLPPort00]>;
305defm : ADLPWriteResPair<WriteFSqrt, [ADLPPort00], 12, [1], 1, 7>;
306defm : ADLPWriteResPair<WriteFSqrt64, [ADLPPort00], 18, [1]>;
307defm : ADLPWriteResPair<WriteFSqrt64X, [ADLPPort00], 18, [1], 1, 6>;
308defm : ADLPWriteResPair<WriteFSqrt64Y, [ADLPPort00], 18, [1], 1, 7>;
309defm : X86WriteResPairUnsupported<WriteFSqrt64Z>;
310def : WriteRes<WriteFSqrt80, [ADLPPortInvalid, ADLPPort00]> {
311  let ReleaseAtCycles = [7, 1];
312  let Latency = 21;
313}
314defm : ADLPWriteResPair<WriteFSqrtX, [ADLPPort00], 12, [1], 1, 7>;
315defm : ADLPWriteResPair<WriteFSqrtY, [ADLPPort00], 12, [1], 1, 8>;
316defm : X86WriteResPairUnsupported<WriteFSqrtZ>;
317defm : X86WriteRes<WriteFStore, [ADLPPort04_09, ADLPPort07_08], 12, [1, 1], 2>;
318defm : X86WriteResUnsupported<WriteFStoreNT>;
319defm : X86WriteRes<WriteFStoreNTX, [ADLPPort04_09, ADLPPort07_08], 518, [1, 1], 2>;
320defm : X86WriteRes<WriteFStoreNTY, [ADLPPort04_09, ADLPPort07_08], 542, [1, 1], 2>;
321defm : X86WriteRes<WriteFStoreX, [ADLPPort04_09, ADLPPort07_08], 12, [1, 1], 2>;
322defm : X86WriteRes<WriteFStoreY, [ADLPPort04_09, ADLPPort07_08], 12, [1, 1], 2>;
323defm : ADLPWriteResPair<WriteFTest, [ADLPPort00], 3, [1]>;
324defm : ADLPWriteResPair<WriteFTestY, [ADLPPort00], 5, [1], 1, 6>;
325defm : ADLPWriteResPair<WriteFVarBlend, [ADLPPort00_01_05], 1, [1], 1, 7>;
326defm : ADLPWriteResPair<WriteFVarBlendY, [ADLPPort00_01_05], 3, [3], 3, 7>;
327defm : X86WriteResPairUnsupported<WriteFVarBlendZ>;
328defm : ADLPWriteResPair<WriteFVarShuffle, [ADLPPort05], 1, [1], 1, 7>;
329defm : ADLPWriteResPair<WriteFVarShuffle256, [ADLPPort05], 3, [1], 1, 8>;
330defm : ADLPWriteResPair<WriteFVarShuffleY, [ADLPPort05], 1, [1], 1, 8>;
331defm : X86WriteResPairUnsupported<WriteFVarShuffleZ>;
332def : WriteRes<WriteFence, [ADLPPort00_06]> {
333  let Latency = 2;
334}
335defm : ADLPWriteResPair<WriteIDiv16, [ADLPPort00_01_05_06_10, ADLPPort01], 16, [1, 3], 4, 4>;
336defm : ADLPWriteResPair<WriteIDiv32, [ADLPPort00_01_05_06_10, ADLPPort01], 15, [1, 3], 4, 4>;
337defm : ADLPWriteResPair<WriteIDiv64, [ADLPPort01], 18, [3], 3>;
338defm : X86WriteRes<WriteIDiv8, [ADLPPort01], 17, [3], 3>;
339defm : X86WriteRes<WriteIDiv8Ld, [ADLPPort01], 22, [3], 3>;
340defm : ADLPWriteResPair<WriteIMul16, [ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01], 5, [2, 1, 1], 4>;
341defm : ADLPWriteResPair<WriteIMul16Imm, [ADLPPort00_01_05_06_10, ADLPPort01], 4, [1, 1], 2>;
342defm : ADLPWriteResPair<WriteIMul16Reg, [ADLPPort01], 3, [1]>;
343defm : ADLPWriteResPair<WriteIMul32, [ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01], 4, [1, 1, 1], 3>;
344defm : ADLPWriteResPair<WriteIMul32Imm, [ADLPPort01], 3, [1]>;
345defm : ADLPWriteResPair<WriteIMul32Reg, [ADLPPort01], 3, [1]>;
346defm : ADLPWriteResPair<WriteIMul64, [ADLPPort01, ADLPPort05], 4, [1, 1], 2>;
347defm : ADLPWriteResPair<WriteIMul64Imm, [ADLPPort01], 3, [1]>;
348defm : ADLPWriteResPair<WriteIMul64Reg, [ADLPPort01], 3, [1]>;
349defm : ADLPWriteResPair<WriteIMul8, [ADLPPort01], 3, [1]>;
350def : WriteRes<WriteIMulH, []> {
351  let Latency = 3;
352}
353def : WriteRes<WriteIMulHLd, []> {
354  let Latency = 3;
355}
356def : WriteRes<WriteJump, [ADLPPort00_06]>;
357defm : X86WriteRes<WriteJumpLd, [ADLPPort00_06, ADLPPort02_03], 6, [1, 1], 2>;
358def : WriteRes<WriteLAHFSAHF, [ADLPPort00_06]> {
359  let Latency = 3;
360}
361defm : X86WriteRes<WriteLDMXCSR, [ADLPPort00, ADLPPort00_01_05, ADLPPort00_06, ADLPPort02_03_11], 7, [1, 1, 1, 1], 4>;
362def : WriteRes<WriteLEA, [ADLPPort01]>;
363defm : ADLPWriteResPair<WriteLZCNT, [ADLPPort01], 3, [1]>;
364def : WriteRes<WriteLoad, [ADLPPort02_03_11]> {
365  let Latency = 5;
366}
367def : WriteRes<WriteMMXMOVMSK, [ADLPPort00]> {
368  let Latency = 3;
369}
370defm : ADLPWriteResPair<WriteMPSAD, [ADLPPort01_05, ADLPPort05], 4, [1, 1], 2, 7>;
371defm : ADLPWriteResPair<WriteMPSADY, [ADLPPort01_05, ADLPPort05], 4, [1, 1], 2, 8>;
372defm : ADLPWriteResPair<WriteMULX32, [ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01], 4, [1, 1, 1], 2>;
373defm : ADLPWriteResPair<WriteMULX64, [ADLPPort01, ADLPPort05], 4, [1, 1]>;
374def : WriteRes<WriteMicrocoded, [ADLPPort00_01_05_06]> {
375  let Latency = AlderlakePModel.MaxLatency;
376}
377def : WriteRes<WriteMove, [ADLPPort00_01_05_06_10]>;
378defm : X86WriteRes<WriteNop, [], 1, [], 0>;
379defm : X86WriteRes<WritePCmpEStrI, [ADLPPort00, ADLPPort00_01_05, ADLPPort00_06, ADLPPort01, ADLPPort05], 16, [3, 2, 1, 1, 1], 8>;
380defm : X86WriteRes<WritePCmpEStrILd, [ADLPPort00, ADLPPort00_01_05, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort05], 31, [3, 1, 1, 1, 1, 1], 8>;
381defm : X86WriteRes<WritePCmpEStrM, [ADLPPort00, ADLPPort00_01_05, ADLPPort00_06, ADLPPort01, ADLPPort05], 16, [3, 3, 1, 1, 1], 9>;
382defm : X86WriteRes<WritePCmpEStrMLd, [ADLPPort00, ADLPPort00_01_05, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort05], 17, [3, 2, 1, 1, 1, 1], 9>;
383defm : ADLPWriteResPair<WritePCmpIStrI, [ADLPPort00], 11, [3], 3, 20>;
384defm : ADLPWriteResPair<WritePCmpIStrM, [ADLPPort00], 11, [3], 3>;
385defm : ADLPWriteResPair<WritePHAdd, [ADLPPort00_05, ADLPPort05], 3, [1, 2], 3, 8>;
386defm : ADLPWriteResPair<WritePHAddX, [ADLPPort00_01_05, ADLPPort01_05], 2, [1, 2], 3, 7>;
387defm : ADLPWriteResPair<WritePHAddY, [ADLPPort00_01_05, ADLPPort01_05], 2, [1, 2], 3, 8>;
388defm : ADLPWriteResPair<WritePHMINPOS, [ADLPPort00], 4, [1], 1, 7>;
389defm : ADLPWriteResPair<WritePMULLD, [ADLPPort00_01], 10, [2], 2, 8>;
390defm : ADLPWriteResPair<WritePMULLDY, [ADLPPort00_01], 10, [2], 2, 8>;
391defm : X86WriteResPairUnsupported<WritePMULLDZ>;
392defm : ADLPWriteResPair<WritePOPCNT, [ADLPPort01], 3, [1]>;
393defm : ADLPWriteResPair<WritePSADBW, [ADLPPort05], 3, [1], 1, 8>;
394defm : ADLPWriteResPair<WritePSADBWX, [ADLPPort05], 3, [1], 1, 7>;
395defm : ADLPWriteResPair<WritePSADBWY, [ADLPPort05], 3, [1], 1, 8>;
396defm : X86WriteResPairUnsupported<WritePSADBWZ>;
397defm : X86WriteRes<WriteRMW, [ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08], 1, [1, 1, 1], 3>;
398defm : X86WriteRes<WriteRotate, [ADLPPort00_01_05_06_10, ADLPPort00_06], 2, [1, 2], 3>;
399defm : X86WriteRes<WriteRotateLd, [ADLPPort00_01_05_06_10, ADLPPort00_06], 12, [1, 2], 3>;
400defm : X86WriteRes<WriteRotateCL, [ADLPPort00_06], 2, [2], 2>;
401defm : X86WriteRes<WriteRotateCLLd, [ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01], 19, [2, 3, 2], 7>;
402defm : X86WriteRes<WriteSETCC, [ADLPPort00_06], 2, [2], 2>;
403defm : X86WriteRes<WriteSETCCStore, [ADLPPort00_06, ADLPPort04_09, ADLPPort07_08], 13, [2, 1, 1], 4>;
404defm : X86WriteRes<WriteSHDmrcl, [ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08], 12, [1, 1, 1, 1, 1, 1], 6>;
405defm : X86WriteRes<WriteSHDmri, [ADLPPort00_01_05_06_10, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08], 12, [1, 1, 1, 1, 1], 5>;
406defm : X86WriteRes<WriteSHDrrcl, [ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01], 5, [1, 1, 1], 3>;
407def : WriteRes<WriteSHDrri, [ADLPPort01]> {
408  let Latency = 3;
409}
410defm : X86WriteRes<WriteSTMXCSR, [ADLPPort00, ADLPPort00_06, ADLPPort04_09, ADLPPort07_08], 12, [1, 1, 1, 1], 4>;
411def : WriteRes<WriteShift, [ADLPPort00_06]>;
412def : WriteRes<WriteShiftLd, [ADLPPort00_06]> {
413  let Latency = 12;
414}
415defm : X86WriteRes<WriteShiftCL, [ADLPPort00_06], 2, [2], 2>;
416defm : X86WriteRes<WriteShiftCLLd, [ADLPPort00_06], 12, [2], 2>;
417defm : ADLPWriteResPair<WriteShuffle, [ADLPPort05], 1, [1], 1, 8>;
418defm : ADLPWriteResPair<WriteShuffle256, [ADLPPort05], 3, [1], 1, 8>;
419defm : ADLPWriteResPair<WriteShuffleX, [ADLPPort01_05], 1, [1], 1, 7>;
420defm : ADLPWriteResPair<WriteShuffleY, [ADLPPort01_05], 1, [1], 1, 8>;
421defm : X86WriteResPairUnsupported<WriteShuffleZ>;
422defm : X86WriteRes<WriteStore, [ADLPPort04_09, ADLPPort07_08], 12, [1, 1], 2>;
423defm : X86WriteRes<WriteStoreNT, [ADLPPort04_09, ADLPPort07_08], 512, [1, 1], 2>;
424def : WriteRes<WriteSystem, [ADLPPort00_01_05_06]> {
425  let Latency = AlderlakePModel.MaxLatency;
426}
427defm : ADLPWriteResPair<WriteTZCNT, [ADLPPort01], 3, [1]>;
428defm : ADLPWriteResPair<WriteVPMOV256, [ADLPPort05], 3, [1], 1, 8>;
429defm : ADLPWriteResPair<WriteVarBlend, [ADLPPort00_01_05], 1, [1], 1, 7>;
430defm : ADLPWriteResPair<WriteVarBlendY, [ADLPPort00_01_05], 3, [3], 3, 7>;
431defm : X86WriteResPairUnsupported<WriteVarBlendZ>;
432defm : ADLPWriteResPair<WriteVarShuffle, [ADLPPort00, ADLPPort05], 3, [1, 1], 2, 8>;
433defm : ADLPWriteResPair<WriteVarShuffle256, [ADLPPort05], 3, [1], 1, 8>;
434defm : ADLPWriteResPair<WriteVarShuffleX, [ADLPPort01_05], 1, [1], 1, 7>;
435defm : ADLPWriteResPair<WriteVarShuffleY, [ADLPPort01_05], 1, [1], 1, 8>;
436defm : X86WriteResPairUnsupported<WriteVarShuffleZ>;
437defm : ADLPWriteResPair<WriteVarVecShift, [ADLPPort00_01], 1, [1], 1, 7>;
438defm : ADLPWriteResPair<WriteVarVecShiftY, [ADLPPort00_01], 1, [1], 1, 8>;
439defm : X86WriteResPairUnsupported<WriteVarVecShiftZ>;
440defm : ADLPWriteResPair<WriteVecALU, [ADLPPort00], 1, [1], 1, 8>;
441defm : ADLPWriteResPair<WriteVecALUX, [ADLPPort00_01], 1, [1], 1, 7>;
442defm : ADLPWriteResPair<WriteVecALUY, [ADLPPort00_01], 1, [1], 1, 8>;
443defm : X86WriteResPairUnsupported<WriteVecALUZ>;
444defm : X86WriteRes<WriteVecExtract, [ADLPPort00, ADLPPort01_05], 4, [1, 1], 2>;
445defm : X86WriteRes<WriteVecExtractSt, [ADLPPort01_05, ADLPPort04_09, ADLPPort07_08], 19, [1, 1, 1], 3>;
446defm : ADLPWriteResPair<WriteVecIMul, [ADLPPort00], 5, [1], 1, 8>;
447defm : ADLPWriteResPair<WriteVecIMulX, [ADLPPort00_01], 5, [1], 1, 8>;
448defm : ADLPWriteResPair<WriteVecIMulY, [ADLPPort00_01], 5, [1], 1, 8>;
449defm : X86WriteResPairUnsupported<WriteVecIMulZ>;
450defm : X86WriteRes<WriteVecInsert, [ADLPPort01_05, ADLPPort05], 4, [1, 1], 2>;
451defm : X86WriteRes<WriteVecInsertLd, [ADLPPort01_05, ADLPPort02_03_11], 8, [1, 1], 2>;
452def : WriteRes<WriteVecLoad, [ADLPPort02_03_11]> {
453  let Latency = 7;
454}
455def : WriteRes<WriteVecLoadNT, [ADLPPort02_03_11]> {
456  let Latency = 7;
457}
458def : WriteRes<WriteVecLoadNTY, [ADLPPort02_03_11]> {
459  let Latency = 8;
460}
461def : WriteRes<WriteVecLoadX, [ADLPPort02_03_11]> {
462  let Latency = 7;
463}
464def : WriteRes<WriteVecLoadY, [ADLPPort02_03_11]> {
465  let Latency = 8;
466}
467defm : ADLPWriteResPair<WriteVecLogic, [ADLPPort00_05], 1, [1], 1, 8>;
468defm : ADLPWriteResPair<WriteVecLogicX, [ADLPPort00_01_05], 1, [1], 1, 7>;
469defm : ADLPWriteResPair<WriteVecLogicY, [ADLPPort00_01_05], 1, [1], 1, 8>;
470defm : X86WriteResPairUnsupported<WriteVecLogicZ>;
471def : WriteRes<WriteVecMOVMSK, [ADLPPort00]> {
472  let Latency = 3;
473}
474def : WriteRes<WriteVecMOVMSKY, [ADLPPort00]> {
475  let Latency = 4;
476}
477defm : X86WriteRes<WriteVecMaskedGatherWriteback, [], 5, [], 0>;
478defm : X86WriteRes<WriteVecMaskedLoad, [ADLPPort00_01_05, ADLPPort02_03_11], 8, [1, 1], 2>;
479defm : X86WriteRes<WriteVecMaskedLoadY, [ADLPPort00_01_05, ADLPPort02_03_11], 9, [1, 1], 2>;
480defm : X86WriteRes<WriteVecMaskedStore32, [ADLPPort00, ADLPPort04_09, ADLPPort07_08], 14, [1, 1, 1], 3>;
481defm : X86WriteRes<WriteVecMaskedStore32Y, [ADLPPort00, ADLPPort04_09, ADLPPort07_08], 14, [1, 1, 1], 3>;
482defm : X86WriteRes<WriteVecMaskedStore64, [ADLPPort00, ADLPPort04_09, ADLPPort07_08], 14, [1, 1, 1], 3>;
483defm : X86WriteRes<WriteVecMaskedStore64Y, [ADLPPort00, ADLPPort04_09, ADLPPort07_08], 14, [1, 1, 1], 3>;
484def : WriteRes<WriteVecMove, [ADLPPort00_05]>;
485def : WriteRes<WriteVecMoveFromGpr, [ADLPPort05]> {
486  let Latency = 3;
487}
488def : WriteRes<WriteVecMoveToGpr, [ADLPPort00]> {
489  let Latency = 3;
490}
491defm : X86WriteRes<WriteVecMoveX, [], 1, [], 0>;
492defm : X86WriteRes<WriteVecMoveY, [], 1, [], 0>;
493defm : X86WriteResUnsupported<WriteVecMoveZ>;
494defm : ADLPWriteResPair<WriteVecShift, [ADLPPort00], 1, [1], 1, 8>;
495def : WriteRes<WriteVecShiftImm, [ADLPPort00]>;
496def : WriteRes<WriteVecShiftImmX, [ADLPPort00_01]>;
497defm : X86WriteResUnsupported<WriteVecShiftImmXLd>;
498def : WriteRes<WriteVecShiftImmY, [ADLPPort00_01]>;
499defm : X86WriteResUnsupported<WriteVecShiftImmYLd>;
500defm : X86WriteResPairUnsupported<WriteVecShiftImmZ>;
501defm : X86WriteRes<WriteVecShiftX, [ADLPPort00_01, ADLPPort01_05], 2, [1, 1], 2>;
502defm : X86WriteRes<WriteVecShiftXLd, [ADLPPort00_01, ADLPPort02_03_11], 8, [1, 1], 2>;
503defm : X86WriteRes<WriteVecShiftY, [ADLPPort00_01, ADLPPort05], 4, [1, 1], 2>;
504defm : X86WriteRes<WriteVecShiftYLd, [ADLPPort00_01, ADLPPort02_03_11], 9, [1, 1], 2>;
505defm : X86WriteResPairUnsupported<WriteVecShiftZ>;
506defm : X86WriteRes<WriteVecStore, [ADLPPort04_09, ADLPPort07_08], 12, [1, 1], 2>;
507defm : X86WriteRes<WriteVecStoreNT, [ADLPPort04_09, ADLPPort07_08], 511, [1, 1], 2>;
508defm : X86WriteRes<WriteVecStoreNTY, [ADLPPort04_09, ADLPPort07_08], 507, [1, 1], 2>;
509defm : X86WriteRes<WriteVecStoreX, [ADLPPort04_09, ADLPPort07_08], 12, [1, 1], 2>;
510defm : X86WriteRes<WriteVecStoreY, [ADLPPort04_09, ADLPPort07_08], 12, [1, 1], 2>;
511defm : ADLPWriteResPair<WriteVecTest, [ADLPPort00, ADLPPort05], 4, [1, 1], 2>;
512defm : ADLPWriteResPair<WriteVecTestY, [ADLPPort00, ADLPPort05], 6, [1, 1], 2, 6>;
513defm : X86WriteRes<WriteXCHG, [ADLPPort00_01_05_06_10], 2, [3], 3>;
514def : WriteRes<WriteZero, []>;
515
516// Infered SchedWriteRes and InstRW definition.
517
518def ADLPWriteResGroup0 : SchedWriteRes<[ADLPPort00_01_05_06, ADLPPort02_03, ADLPPort02_03_07, ADLPPort04]> {
519  let Latency = 7;
520  let NumMicroOps = 3;
521}
522def : InstRW<[ADLPWriteResGroup0], (instregex "^AA(D|N)D64mr$",
523                                              "^A(X?)OR64mr$")>;
524
525def ADLPWriteResGroup1 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08]> {
526  let ReleaseAtCycles = [2, 1, 1, 1, 1];
527  let Latency = 12;
528  let NumMicroOps = 6;
529}
530def : InstRW<[ADLPWriteResGroup1, ReadAfterLd, ReadAfterLd, ReadDefault, ReadDefault, ReadDefault, ReadDefault, ReadDefault], (instregex "^(ADC|SBB)(16|32|64)mr$")>;
531
532def ADLPWriteResGroup2 : SchedWriteRes<[ADLPPort00_06, ADLPPort02_03_11]> {
533  let Latency = 6;
534  let NumMicroOps = 2;
535}
536def : InstRW<[ADLPWriteResGroup2], (instregex "^JMP(16|32|64)m((_NT)?)$",
537                                              "^RET(16|32)$",
538                                              "^RORX(32|64)mi$")>;
539def : InstRW<[ADLPWriteResGroup2, ReadAfterLd, ReadAfterLd, ReadDefault, ReadDefault, ReadDefault, ReadDefault, ReadDefault], (instregex "^(ADC|SBB)(8|16|32|64)rm$",
540                                                                                                                                         "^AD(C|O)X(32|64)rm$")>;
541
542def ADLPWriteResGroup3 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08]> {
543  let Latency = 13;
544  let NumMicroOps = 5;
545}
546def : InstRW<[ADLPWriteResGroup3], (instregex "^(ADC|SBB)8mi(8?)$")>;
547
548def ADLPWriteResGroup4 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08]> {
549  let ReleaseAtCycles = [2, 1, 1, 1, 1];
550  let Latency = 13;
551  let NumMicroOps = 6;
552}
553def : InstRW<[ADLPWriteResGroup4, ReadAfterLd, ReadAfterLd, ReadDefault, ReadDefault, ReadDefault, ReadDefault, ReadDefault], (instregex "^(ADC|SBB)8mr$")>;
554
555def ADLPWriteResGroup5 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort02_03_11]> {
556  let Latency = 6;
557  let NumMicroOps = 2;
558}
559def : InstRW<[ADLPWriteResGroup5], (instregex "^CMP(8|16|32)mi$",
560                                              "^CMP(8|16|32|64)mi8$",
561                                              "^MOV(8|16)rm$",
562                                              "^POP(16|32)r((mr)?)$")>;
563def : InstRW<[ADLPWriteResGroup5], (instrs CMP64mi32,
564                                           MOV8rm_NOREX,
565                                           MOVZX16rm8)>;
566def : InstRW<[ADLPWriteResGroup5, ReadAfterLd], (instregex "^(ADD|CMP|SUB)(8|16|32|64)rm$",
567                                                           "^AND(8|16|32)rm$",
568                                                           "^(X?)OR(8|16|32)rm$")>;
569def : InstRW<[ADLPWriteResGroup5, ReadAfterLd, ReadDefault, ReadDefault, ReadDefault, ReadDefault, ReadDefault], (instregex "^CMP(8|16|32|64)mr$")>;
570
571def ADLPWriteResGroup6 : SchedWriteRes<[]> {
572  let NumMicroOps = 0;
573}
574def : InstRW<[ADLPWriteResGroup6], (instregex "^(ADD|SUB)64ri8$",
575                                              "^(DE|IN)C64r$",
576                                              "^MOV64rr((_REV)?)$")>;
577def : InstRW<[ADLPWriteResGroup6], (instrs CLC,
578                                           JMP_2)>;
579
580def ADLPWriteResGroup7 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08]> {
581  let Latency = 13;
582  let NumMicroOps = 4;
583}
584def : InstRW<[ADLPWriteResGroup7], (instregex "^A(D|N)D8mi(8?)$",
585                                              "^(DE|IN)C8m$",
586                                              "^N(EG|OT)8m$",
587                                              "^(X?)OR8mi(8?)$",
588                                              "^SUB8mi(8?)$")>;
589def : InstRW<[ADLPWriteResGroup7, ReadAfterLd, ReadDefault, ReadDefault, ReadDefault, ReadDefault, ReadDefault], (instregex "^A(D|N)D8mr$",
590                                                                                                                            "^(X?)OR8mr$")>;
591def : InstRW<[ADLPWriteResGroup7, ReadAfterLd, ReadDefault, ReadDefault, ReadDefault, ReadDefault, ReadDefault], (instrs SUB8mr)>;
592
593def ADLPWriteResGroup8 : SchedWriteRes<[ADLPPort01_05]> {
594  let Latency = 3;
595}
596def : InstRW<[ADLPWriteResGroup8], (instregex "^(V?)(ADD|SUB)SSrr((_Int)?)$")>;
597
598def ADLPWriteResGroup9 : SchedWriteRes<[ADLPPort02_03, ADLPPort05]> {
599  let Latency = 10;
600  let NumMicroOps = 2;
601}
602def : InstRW<[ADLPWriteResGroup9], (instregex "^ADD_F(32|64)m$",
603                                              "^ILD_F(16|32|64)m$",
604                                              "^SUB(R?)_F(32|64)m$")>;
605
606def ADLPWriteResGroup10 : SchedWriteRes<[ADLPPort02_03, ADLPPort05]> {
607  let ReleaseAtCycles = [1, 2];
608  let Latency = 13;
609  let NumMicroOps = 3;
610}
611def : InstRW<[ADLPWriteResGroup10], (instregex "^ADD_FI(16|32)m$",
612                                               "^SUB(R?)_FI(16|32)m$")>;
613
614def ADLPWriteResGroup11 : SchedWriteRes<[ADLPPort00_01_05_06_10]> {
615  let Latency = 2;
616}
617def : InstRW<[ADLPWriteResGroup11], (instregex "^AND(8|16|32|64)r(r|i8)$",
618                                               "^AND(8|16|32|64)rr_REV$",
619                                               "^(AND|TEST)(32|64)i32$",
620                                               "^(AND|TEST)(8|32)ri$",
621                                               "^(AND|TEST)64ri32$",
622                                               "^(AND|TEST)8i8$",
623                                               "^(X?)OR(8|16|32|64)r(r|i8)$",
624                                               "^(X?)OR(8|16|32|64)rr_REV$",
625                                               "^(X?)OR(32|64)i32$",
626                                               "^(X?)OR(8|32)ri$",
627                                               "^(X?)OR64ri32$",
628                                               "^(X?)OR8i8$",
629                                               "^TEST(8|16|32|64)rr$")>;
630def : InstRW<[ADLPWriteResGroup11], (instrs XOR8rr_NOREX)>;
631
632def ADLPWriteResGroup12 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort02_03_11]> {
633  let Latency = 7;
634  let NumMicroOps = 2;
635}
636def : InstRW<[ADLPWriteResGroup12], (instregex "^TEST(8|16|32)mi$")>;
637def : InstRW<[ADLPWriteResGroup12], (instrs TEST64mi32)>;
638def : InstRW<[ADLPWriteResGroup12, ReadAfterLd], (instregex "^(X?)OR64rm$")>;
639def : InstRW<[ADLPWriteResGroup12, ReadAfterLd], (instrs AND64rm)>;
640def : InstRW<[ADLPWriteResGroup12, ReadAfterLd, ReadDefault, ReadDefault, ReadDefault, ReadDefault, ReadDefault], (instregex "^TEST(8|16|32|64)mr$")>;
641
642def ADLPWriteResGroup13 : SchedWriteRes<[ADLPPort01_05_10, ADLPPort02_03_11]> {
643  let Latency = 7;
644  let NumMicroOps = 2;
645}
646def : InstRW<[ADLPWriteResGroup13, ReadAfterLd], (instregex "^ANDN(32|64)rm$")>;
647
648def ADLPWriteResGroup14 : SchedWriteRes<[ADLPPort01_05_10]> {
649  let Latency = 2;
650}
651def : InstRW<[ADLPWriteResGroup14], (instregex "^ANDN(32|64)rr$")>;
652
653def ADLPWriteResGroup15 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11]> {
654  let ReleaseAtCycles = [5, 2, 1, 1];
655  let Latency = 10;
656  let NumMicroOps = 9;
657}
658def : InstRW<[ADLPWriteResGroup15], (instrs BT64mr)>;
659
660def ADLPWriteResGroup16 : SchedWriteRes<[ADLPPort01]> {
661  let Latency = 3;
662}
663def : InstRW<[ADLPWriteResGroup16], (instregex "^BT((C|R|S)?)64rr$",
664                                               "^P(DEP|EXT)(32|64)rr$")>;
665
666def ADLPWriteResGroup17 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08]> {
667  let ReleaseAtCycles = [4, 2, 1, 1, 1, 1];
668  let Latency = 17;
669  let NumMicroOps = 10;
670}
671def : InstRW<[ADLPWriteResGroup17], (instregex "^BT(C|R|S)64mr$")>;
672
673def ADLPWriteResGroup18 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08]> {
674  let Latency = 7;
675  let NumMicroOps = 5;
676}
677def : InstRW<[ADLPWriteResGroup18], (instregex "^CALL(16|32|64)m((_NT)?)$")>;
678
679def ADLPWriteResGroup19 : SchedWriteRes<[ADLPPort00_06, ADLPPort04_09, ADLPPort07_08]> {
680  let Latency = 3;
681  let NumMicroOps = 3;
682}
683def : InstRW<[ADLPWriteResGroup19], (instregex "^CALL(16|32|64)r((_NT)?)$")>;
684
685def ADLPWriteResGroup20 : SchedWriteRes<[ADLPPort04_09, ADLPPort07_08]> {
686  let Latency = 3;
687  let NumMicroOps = 2;
688}
689def : InstRW<[ADLPWriteResGroup20], (instrs CALL64pcrel32,
690                                            MFENCE)>;
691
692def ADLPWriteResGroup21 : SchedWriteRes<[ADLPPort01_05]>;
693def : InstRW<[ADLPWriteResGroup21], (instregex "^C(DQ|WD)E$",
694                                               "^(V?)MOVS(H|L)DUPrr$",
695                                               "^(V?)SHUFP(D|S)rri$",
696                                               "^VMOVS(H|L)DUPYrr$",
697                                               "^VSHUFP(D|S)Yrri$")>;
698def : InstRW<[ADLPWriteResGroup21], (instrs CBW,
699                                            VPBLENDWYrri)>;
700
701def ADLPWriteResGroup22 : SchedWriteRes<[ADLPPort00_06]>;
702def : InstRW<[ADLPWriteResGroup22], (instregex "^C(DQ|QO)$",
703                                               "^(CL|ST)AC$")>;
704
705def ADLPWriteResGroup23 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06]> {
706  let Latency = 3;
707  let NumMicroOps = 2;
708}
709def : InstRW<[ADLPWriteResGroup23], (instrs CLD)>;
710
711def ADLPWriteResGroup24 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort04_09, ADLPPort07_08]> {
712  let Latency = 3;
713  let NumMicroOps = 3;
714}
715def : InstRW<[ADLPWriteResGroup24], (instrs CLDEMOTE)>;
716
717def ADLPWriteResGroup25 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort04_09, ADLPPort07_08]> {
718  let Latency = 2;
719  let NumMicroOps = 4;
720}
721def : InstRW<[ADLPWriteResGroup25], (instrs CLFLUSH)>;
722
723def ADLPWriteResGroup26 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort04_09, ADLPPort07_08]> {
724  let Latency = 2;
725  let NumMicroOps = 3;
726}
727def : InstRW<[ADLPWriteResGroup26], (instrs CLFLUSHOPT)>;
728
729def ADLPWriteResGroup27 : SchedWriteRes<[ADLPPort00_06, ADLPPort01]> {
730  let ReleaseAtCycles = [2, 1];
731  let Latency = AlderlakePModel.MaxLatency;
732  let NumMicroOps = 3;
733}
734def : InstRW<[ADLPWriteResGroup27], (instrs CLI)>;
735
736def ADLPWriteResGroup28 : SchedWriteRes<[ADLPPort00_06, ADLPPort01, ADLPPort05]> {
737  let ReleaseAtCycles = [6, 1, 3];
738  let Latency = AlderlakePModel.MaxLatency;
739  let NumMicroOps = 10;
740}
741def : InstRW<[ADLPWriteResGroup28], (instrs CLTS)>;
742
743def ADLPWriteResGroup29 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort04_09, ADLPPort07_08]> {
744  let Latency = 5;
745  let NumMicroOps = 3;
746}
747def : InstRW<[ADLPWriteResGroup29], (instregex "^MOV16o(16|32|64)a$")>;
748def : InstRW<[ADLPWriteResGroup29], (instrs CLWB)>;
749
750def ADLPWriteResGroup30 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort02_03_11]> {
751  let ReleaseAtCycles = [5, 2];
752  let Latency = 6;
753  let NumMicroOps = 7;
754}
755def : InstRW<[ADLPWriteResGroup30], (instregex "^CMPS(B|L|Q|W)$")>;
756
757def ADLPWriteResGroup31 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01_05, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
758  let ReleaseAtCycles = [2, 7, 6, 2, 1, 1, 2, 1];
759  let Latency = 32;
760  let NumMicroOps = 22;
761}
762def : InstRW<[ADLPWriteResGroup31], (instrs CMPXCHG16B)>;
763
764def ADLPWriteResGroup32 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08]> {
765  let ReleaseAtCycles = [4, 7, 2, 1, 1, 1];
766  let Latency = 25;
767  let NumMicroOps = 16;
768}
769def : InstRW<[ADLPWriteResGroup32], (instrs CMPXCHG8B)>;
770
771def ADLPWriteResGroup33 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08]> {
772  let ReleaseAtCycles = [1, 2, 1, 1, 1];
773  let Latency = 13;
774  let NumMicroOps = 6;
775}
776def : InstRW<[ADLPWriteResGroup33], (instrs CMPXCHG8rm)>;
777
778def ADLPWriteResGroup34 : SchedWriteRes<[ADLPPort00, ADLPPort00_01, ADLPPort00_06, ADLPPort01, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
779  let ReleaseAtCycles = [2, 1, 10, 6, 1, 5, 1];
780  let Latency = 18;
781  let NumMicroOps = 26;
782}
783def : InstRW<[ADLPWriteResGroup34], (instrs CPUID)>;
784
785def ADLPWriteResGroup35 : SchedWriteRes<[ADLPPort00, ADLPPort00_01, ADLPPort02_03_11]> {
786  let Latency = 26;
787  let NumMicroOps = 3;
788}
789def : InstRW<[ADLPWriteResGroup35], (instregex "^(V?)CVT(T?)SD2SIrm((_Int)?)$")>;
790
791def ADLPWriteResGroup36 : SchedWriteRes<[ADLPPort00_01, ADLPPort02_03_11, ADLPPort05]> {
792  let Latency = 12;
793  let NumMicroOps = 3;
794}
795def : InstRW<[ADLPWriteResGroup36], (instrs CVTSI642SSrm)>;
796def : InstRW<[ADLPWriteResGroup36, ReadAfterVecLd], (instregex "^(V?)CVTSI642SSrm_Int$")>;
797def : InstRW<[ADLPWriteResGroup36, ReadAfterVecLd], (instrs VCVTSI642SSrm)>;
798
799def ADLPWriteResGroup37 : SchedWriteRes<[ADLPPort00_01, ADLPPort05]> {
800  let ReleaseAtCycles = [1, 2];
801  let Latency = 8;
802  let NumMicroOps = 3;
803}
804def : InstRW<[ADLPWriteResGroup37, ReadInt2Fpu], (instrs CVTSI642SSrr)>;
805def : InstRW<[ADLPWriteResGroup37, ReadDefault, ReadInt2Fpu], (instregex "^(V?)CVTSI642SSrr_Int$")>;
806def : InstRW<[ADLPWriteResGroup37, ReadDefault, ReadInt2Fpu], (instrs VCVTSI642SSrr)>;
807
808def ADLPWriteResGroup38 : SchedWriteRes<[ADLPPort00, ADLPPort00_01, ADLPPort05]> {
809  let Latency = 8;
810  let NumMicroOps = 3;
811}
812def : InstRW<[ADLPWriteResGroup38], (instregex "^(V?)CVT(T?)SS2SI64rr_Int$")>;
813def : InstRW<[ADLPWriteResGroup38, ReadDefault], (instregex "^(V?)CVT(T?)SS2SI64rr$")>;
814
815def ADLPWriteResGroup39 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06]> {
816  let Latency = 2;
817  let NumMicroOps = 2;
818}
819def : InstRW<[ADLPWriteResGroup39], (instregex "^J(E|R)CXZ$")>;
820def : InstRW<[ADLPWriteResGroup39], (instrs CWD)>;
821
822def ADLPWriteResGroup40 : SchedWriteRes<[ADLPPort00_01_05_06]>;
823def : InstRW<[ADLPWriteResGroup40], (instregex "^(LD|ST)_Frr$",
824                                               "^MOV16s(m|r)$",
825                                               "^MOV(32|64)sr$")>;
826def : InstRW<[ADLPWriteResGroup40], (instrs DEC16r_alt,
827                                            SALC,
828                                            ST_FPrr,
829                                            SYSCALL)>;
830
831def ADLPWriteResGroup41 : SchedWriteRes<[ADLPPort00_06, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08]> {
832  let Latency = 7;
833}
834def : InstRW<[ADLPWriteResGroup41], (instrs DEC32r_alt)>;
835
836def ADLPWriteResGroup42 : SchedWriteRes<[ADLPPort00, ADLPPort02_03]> {
837  let Latency = 27;
838  let NumMicroOps = 2;
839}
840def : InstRW<[ADLPWriteResGroup42], (instregex "^DIVR_F(32|64)m$")>;
841
842def ADLPWriteResGroup43 : SchedWriteRes<[ADLPPort00, ADLPPort02_03, ADLPPort05]> {
843  let Latency = 30;
844  let NumMicroOps = 3;
845}
846def : InstRW<[ADLPWriteResGroup43], (instregex "^DIVR_FI(16|32)m$")>;
847
848def ADLPWriteResGroup44 : SchedWriteRes<[ADLPPort00]> {
849  let Latency = 15;
850}
851def : InstRW<[ADLPWriteResGroup44], (instregex "^DIVR_F(P?)rST0$")>;
852def : InstRW<[ADLPWriteResGroup44], (instrs DIVR_FST0r)>;
853
854def ADLPWriteResGroup45 : SchedWriteRes<[ADLPPort00, ADLPPort02_03_11]> {
855  let Latency = 20;
856  let NumMicroOps = 2;
857}
858def : InstRW<[ADLPWriteResGroup45, ReadAfterVecLd], (instregex "^(V?)DIVSDrm_Int$")>;
859
860def ADLPWriteResGroup46 : SchedWriteRes<[ADLPPort00, ADLPPort02_03]> {
861  let Latency = 22;
862  let NumMicroOps = 2;
863}
864def : InstRW<[ADLPWriteResGroup46], (instregex "^DIV_F(32|64)m$")>;
865
866def ADLPWriteResGroup47 : SchedWriteRes<[ADLPPort00, ADLPPort02_03, ADLPPort05]> {
867  let Latency = 25;
868  let NumMicroOps = 3;
869}
870def : InstRW<[ADLPWriteResGroup47], (instregex "^DIV_FI(16|32)m$")>;
871
872def ADLPWriteResGroup48 : SchedWriteRes<[ADLPPort00]> {
873  let Latency = 20;
874}
875def : InstRW<[ADLPWriteResGroup48], (instregex "^DIV_F(P?)rST0$")>;
876def : InstRW<[ADLPWriteResGroup48], (instrs DIV_FST0r)>;
877
878def ADLPWriteResGroup49 : SchedWriteRes<[ADLPPort00, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
879  let ReleaseAtCycles = [2, 21, 2, 14, 4, 9, 5];
880  let Latency = 126;
881  let NumMicroOps = 57;
882}
883def : InstRW<[ADLPWriteResGroup49], (instrs ENTER)>;
884
885def ADLPWriteResGroup50 : SchedWriteRes<[ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
886  let Latency = 12;
887  let NumMicroOps = 3;
888}
889def : InstRW<[ADLPWriteResGroup50], (instregex "^(V?)EXTRACTPSmr$")>;
890def : InstRW<[ADLPWriteResGroup50], (instrs SMSW16m)>;
891
892def ADLPWriteResGroup51 : SchedWriteRes<[ADLPPort00, ADLPPort05]> {
893  let Latency = 4;
894  let NumMicroOps = 2;
895}
896def : InstRW<[ADLPWriteResGroup51], (instregex "^(V?)EXTRACTPSrr$")>;
897def : InstRW<[ADLPWriteResGroup51], (instrs MMX_PEXTRWrr)>;
898
899def ADLPWriteResGroup52 : SchedWriteRes<[ADLPPort00_01_05_06, ADLPPort02_03, ADLPPort02_03_07, ADLPPort04, ADLPPort06]> {
900  let Latency = 7;
901  let NumMicroOps = 5;
902}
903def : InstRW<[ADLPWriteResGroup52], (instrs FARCALL64m)>;
904
905def ADLPWriteResGroup53 : SchedWriteRes<[ADLPPort02_03, ADLPPort06]> {
906  let Latency = 6;
907  let NumMicroOps = 2;
908}
909def : InstRW<[ADLPWriteResGroup53], (instrs FARJMP64m,
910                                            JMP64m_REX)>;
911
912def ADLPWriteResGroup54 : SchedWriteRes<[ADLPPort02_03_07, ADLPPort04]> {
913  let NumMicroOps = 2;
914}
915def : InstRW<[ADLPWriteResGroup54], (instregex "^(V?)MASKMOVDQU((64)?)$",
916                                               "^ST_FP(32|64|80)m$")>;
917def : InstRW<[ADLPWriteResGroup54], (instrs FBSTPm,
918                                            VMPTRSTm)>;
919
920def ADLPWriteResGroup55 : SchedWriteRes<[ADLPPort00_05]> {
921  let ReleaseAtCycles = [2];
922  let Latency = 2;
923  let NumMicroOps = 2;
924}
925def : InstRW<[ADLPWriteResGroup55], (instrs FDECSTP)>;
926
927def ADLPWriteResGroup56 : SchedWriteRes<[ADLPPort02_03, ADLPPort05]> {
928  let ReleaseAtCycles = [1, 2];
929  let Latency = 11;
930  let NumMicroOps = 3;
931}
932def : InstRW<[ADLPWriteResGroup56], (instregex "^FICOM(P?)(16|32)m$")>;
933
934def ADLPWriteResGroup57 : SchedWriteRes<[ADLPPort00_05]>;
935def : InstRW<[ADLPWriteResGroup57], (instregex "^MMX_P(ADD|SUB)(B|D|Q|W)rr$")>;
936def : InstRW<[ADLPWriteResGroup57], (instrs FINCSTP,
937                                            FNOP)>;
938
939def ADLPWriteResGroup58 : SchedWriteRes<[ADLPPort00, ADLPPort00_05, ADLPPort02_03]> {
940  let Latency = 7;
941  let NumMicroOps = 3;
942}
943def : InstRW<[ADLPWriteResGroup58], (instrs FLDCW16m)>;
944
945def ADLPWriteResGroup59 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06, ADLPPort00_05, ADLPPort00_06, ADLPPort02_03]> {
946  let ReleaseAtCycles = [2, 39, 5, 10, 8];
947  let Latency = 62;
948  let NumMicroOps = 64;
949}
950def : InstRW<[ADLPWriteResGroup59], (instrs FLDENVm)>;
951
952def ADLPWriteResGroup60 : SchedWriteRes<[ADLPPort00_01_05_06]> {
953  let ReleaseAtCycles = [4];
954  let Latency = 4;
955  let NumMicroOps = 4;
956}
957def : InstRW<[ADLPWriteResGroup60], (instrs FNCLEX)>;
958
959def ADLPWriteResGroup61 : SchedWriteRes<[ADLPPort00_01_05_06, ADLPPort00_05, ADLPPort05]> {
960  let ReleaseAtCycles = [6, 3, 6];
961  let Latency = 75;
962  let NumMicroOps = 15;
963}
964def : InstRW<[ADLPWriteResGroup61], (instrs FNINIT)>;
965
966def ADLPWriteResGroup62 : SchedWriteRes<[ADLPPort02_03_07, ADLPPort04, ADLPPort06]> {
967  let Latency = 2;
968  let NumMicroOps = 3;
969}
970def : InstRW<[ADLPWriteResGroup62], (instrs FNSTCW16m)>;
971
972def ADLPWriteResGroup63 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06]> {
973  let Latency = 3;
974  let NumMicroOps = 2;
975}
976def : InstRW<[ADLPWriteResGroup63], (instrs FNSTSW16r)>;
977
978def ADLPWriteResGroup64 : SchedWriteRes<[ADLPPort00, ADLPPort02_03_07, ADLPPort04]> {
979  let Latency = 3;
980  let NumMicroOps = 3;
981}
982def : InstRW<[ADLPWriteResGroup64], (instrs FNSTSWm)>;
983
984def ADLPWriteResGroup65 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06, ADLPPort00_06, ADLPPort01, ADLPPort02_03_07, ADLPPort04, ADLPPort05, ADLPPort06]> {
985  let ReleaseAtCycles = [9, 30, 21, 1, 11, 11, 16, 1];
986  let Latency = 106;
987  let NumMicroOps = 100;
988}
989def : InstRW<[ADLPWriteResGroup65], (instrs FSTENVm)>;
990
991def ADLPWriteResGroup66 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06, ADLPPort00_05, ADLPPort00_06, ADLPPort01_05, ADLPPort02_03, ADLPPort06]> {
992  let ReleaseAtCycles = [4, 47, 1, 2, 1, 33, 2];
993  let Latency = 63;
994  let NumMicroOps = 90;
995}
996def : InstRW<[ADLPWriteResGroup66], (instrs FXRSTOR)>;
997
998def ADLPWriteResGroup67 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06, ADLPPort00_05, ADLPPort00_06, ADLPPort01_05, ADLPPort02_03, ADLPPort06]> {
999  let ReleaseAtCycles = [4, 45, 1, 2, 1, 31, 4];
1000  let Latency = 63;
1001  let NumMicroOps = 88;
1002}
1003def : InstRW<[ADLPWriteResGroup67], (instrs FXRSTOR64)>;
1004
1005def ADLPWriteResGroup68 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
1006  let ReleaseAtCycles = [2, 5, 10, 10, 2, 38, 5, 38];
1007  let Latency = AlderlakePModel.MaxLatency;
1008  let NumMicroOps = 110;
1009}
1010def : InstRW<[ADLPWriteResGroup68], (instregex "^FXSAVE((64)?)$")>;
1011
1012def ADLPWriteResGroup69 : SchedWriteRes<[ADLPPort00_01, ADLPPort02_03_11]> {
1013  let Latency = 12;
1014  let NumMicroOps = 2;
1015}
1016def : InstRW<[ADLPWriteResGroup69, ReadAfterVecXLd], (instregex "^(V?)GF2P8AFFINE((INV)?)QBrmi$",
1017                                                                "^(V?)GF2P8MULBrm$")>;
1018def : InstRW<[ADLPWriteResGroup69, ReadAfterVecYLd], (instregex "^VGF2P8AFFINE((INV)?)QBYrmi$")>;
1019def : InstRW<[ADLPWriteResGroup69, ReadAfterVecYLd], (instrs VGF2P8MULBYrm)>;
1020
1021def ADLPWriteResGroup70 : SchedWriteRes<[ADLPPort00_01]> {
1022  let Latency = 5;
1023}
1024def : InstRW<[ADLPWriteResGroup70], (instregex "^(V?)GF2P8MULBrr$")>;
1025def : InstRW<[ADLPWriteResGroup70], (instrs VGF2P8MULBYrr)>;
1026
1027def ADLPWriteResGroup71 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort01_05_10, ADLPPort02_03_11, ADLPPort05]> {
1028  let ReleaseAtCycles = [7, 5, 26, 19, 2, 7, 21];
1029  let Latency = 35;
1030  let NumMicroOps = 87;
1031}
1032def : InstRW<[ADLPWriteResGroup71], (instrs IN16ri)>;
1033
1034def ADLPWriteResGroup72 : SchedWriteRes<[ADLPPort00, ADLPPort00_01, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort01_05_10, ADLPPort02_03_11, ADLPPort05]> {
1035  let ReleaseAtCycles = [7, 1, 4, 26, 19, 3, 7, 20];
1036  let Latency = 35;
1037  let NumMicroOps = 87;
1038}
1039def : InstRW<[ADLPWriteResGroup72], (instrs IN16rr)>;
1040
1041def ADLPWriteResGroup73 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort01_05_10, ADLPPort02_03_11, ADLPPort05]> {
1042  let ReleaseAtCycles = [7, 6, 28, 21, 2, 10, 20];
1043  let Latency = 35;
1044  let NumMicroOps = 94;
1045}
1046def : InstRW<[ADLPWriteResGroup73], (instrs IN32ri)>;
1047
1048def ADLPWriteResGroup74 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort01_05_10, ADLPPort02_03_11, ADLPPort05]> {
1049  let ReleaseAtCycles = [7, 9, 28, 21, 2, 11, 21];
1050  let NumMicroOps = 99;
1051}
1052def : InstRW<[ADLPWriteResGroup74], (instrs IN32rr)>;
1053
1054def ADLPWriteResGroup75 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort01_05_10, ADLPPort02_03_11, ADLPPort05]> {
1055  let ReleaseAtCycles = [7, 6, 25, 19, 2, 8, 20];
1056  let Latency = 35;
1057  let NumMicroOps = 87;
1058}
1059def : InstRW<[ADLPWriteResGroup75], (instrs IN8ri)>;
1060
1061def ADLPWriteResGroup76 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort01_05_10, ADLPPort02_03_11, ADLPPort05]> {
1062  let ReleaseAtCycles = [7, 6, 25, 19, 2, 7, 20];
1063  let Latency = 35;
1064  let NumMicroOps = 86;
1065}
1066def : InstRW<[ADLPWriteResGroup76], (instrs IN8rr)>;
1067
1068def ADLPWriteResGroup77 : SchedWriteRes<[ADLPPort00_06]> {
1069  let NumMicroOps = 4;
1070}
1071def : InstRW<[ADLPWriteResGroup77], (instrs INC16r_alt)>;
1072
1073def ADLPWriteResGroup78 : SchedWriteRes<[ADLPPort02_03_11]> {
1074  let Latency = 7;
1075}
1076def : InstRW<[ADLPWriteResGroup78], (instregex "^(V?)MOV(D|SH|SL)DUPrm$",
1077                                               "^VPBROADCAST(D|Q)rm$")>;
1078def : InstRW<[ADLPWriteResGroup78], (instrs INC32r_alt,
1079                                            VBROADCASTSSrm)>;
1080
1081def ADLPWriteResGroup79 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
1082  let ReleaseAtCycles = [7, 6, 24, 17, 8, 1, 19, 1];
1083  let Latency = 20;
1084  let NumMicroOps = 83;
1085}
1086def : InstRW<[ADLPWriteResGroup79], (instrs INSB)>;
1087
1088def ADLPWriteResGroup80 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05, ADLPPort00_01_05_06_10, ADLPPort00_05_06, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
1089  let ReleaseAtCycles = [7, 1, 5, 1, 27, 17, 11, 1, 21, 1];
1090  let Latency = 20;
1091  let NumMicroOps = 92;
1092}
1093def : InstRW<[ADLPWriteResGroup80], (instrs INSL)>;
1094
1095def ADLPWriteResGroup81 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05, ADLPPort00_01_05_06_10, ADLPPort00_05_06, ADLPPort00_06, ADLPPort01, ADLPPort01_05_10, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
1096  let ReleaseAtCycles = [7, 1, 4, 1, 25, 17, 1, 9, 1, 19, 1];
1097  let Latency = 20;
1098  let NumMicroOps = 86;
1099}
1100def : InstRW<[ADLPWriteResGroup81], (instrs INSW)>;
1101
1102def ADLPWriteResGroup82 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort01_05_10, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
1103  let ReleaseAtCycles = [5, 4, 8, 6, 2, 5, 7, 5];
1104  let Latency = AlderlakePModel.MaxLatency;
1105  let NumMicroOps = 42;
1106}
1107def : InstRW<[ADLPWriteResGroup82], (instrs INVLPG)>;
1108
1109def ADLPWriteResGroup83 : SchedWriteRes<[ADLPPort02_03_07, ADLPPort04, ADLPPort05]> {
1110  let Latency = 4;
1111  let NumMicroOps = 3;
1112}
1113def : InstRW<[ADLPWriteResGroup83], (instregex "^IST(T?)_FP(16|32|64)m$",
1114                                               "^IST_F(16|32)m$")>;
1115
1116def ADLPWriteResGroup84 : SchedWriteRes<[ADLPPort00_01_05_06, ADLPPort00_06]> {
1117  let Latency = 2;
1118  let NumMicroOps = 2;
1119}
1120def : InstRW<[ADLPWriteResGroup84], (instrs JCXZ)>;
1121
1122def ADLPWriteResGroup85 : SchedWriteRes<[ADLPPort06]>;
1123def : InstRW<[ADLPWriteResGroup85], (instrs JMP64r_REX)>;
1124
1125def ADLPWriteResGroup86 : SchedWriteRes<[]> {
1126  let Latency = 0;
1127  let NumMicroOps = 0;
1128}
1129def : InstRW<[ADLPWriteResGroup86], (instregex "^JMP_(1|4)$")>;
1130def : InstRW<[ADLPWriteResGroup86], (instrs VZEROUPPER)>;
1131
1132def ADLPWriteResGroup87 : SchedWriteRes<[ADLPPort00, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort05]> {
1133  let ReleaseAtCycles = [8, 2, 14, 3, 1];
1134  let Latency = 198;
1135  let NumMicroOps = 81;
1136}
1137def : InstRW<[ADLPWriteResGroup87], (instrs LAR16rm)>;
1138
1139def ADLPWriteResGroup88 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_05_06, ADLPPort00_06, ADLPPort01, ADLPPort01_05, ADLPPort02_03_11, ADLPPort05]> {
1140  let ReleaseAtCycles = [1, 3, 1, 8, 5, 1, 2, 1];
1141  let Latency = 66;
1142  let NumMicroOps = 22;
1143}
1144def : InstRW<[ADLPWriteResGroup88], (instrs LAR16rr)>;
1145
1146def ADLPWriteResGroup89 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_05, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort05]> {
1147  let ReleaseAtCycles = [1, 2, 2, 9, 5, 3, 1];
1148  let Latency = 71;
1149  let NumMicroOps = 85;
1150}
1151def : InstRW<[ADLPWriteResGroup89], (instrs LAR32rm)>;
1152
1153def ADLPWriteResGroup90 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_05_06, ADLPPort00_06, ADLPPort01, ADLPPort01_05, ADLPPort02_03_11, ADLPPort05]> {
1154  let ReleaseAtCycles = [1, 3, 1, 8, 5, 1, 2, 1];
1155  let Latency = 65;
1156  let NumMicroOps = 22;
1157}
1158def : InstRW<[ADLPWriteResGroup90], (instregex "^LAR(32|64)rr$")>;
1159
1160def ADLPWriteResGroup91 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_05, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort05]> {
1161  let ReleaseAtCycles = [1, 2, 2, 9, 5, 3, 1];
1162  let Latency = 71;
1163  let NumMicroOps = 87;
1164}
1165def : InstRW<[ADLPWriteResGroup91], (instrs LAR64rm)>;
1166
1167def ADLPWriteResGroup92 : SchedWriteRes<[ADLPPort02_03]> {
1168  let Latency = 7;
1169}
1170def : InstRW<[ADLPWriteResGroup92], (instregex "^LD_F(32|64|80)m$")>;
1171
1172def ADLPWriteResGroup93 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort01]> {
1173  let Latency = 2;
1174  let NumMicroOps = 2;
1175}
1176def : InstRW<[ADLPWriteResGroup93], (instrs LEA16r)>;
1177
1178def ADLPWriteResGroup94 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort02_03_11]> {
1179  let ReleaseAtCycles = [3, 1];
1180  let Latency = 6;
1181  let NumMicroOps = 4;
1182}
1183def : InstRW<[ADLPWriteResGroup94], (instregex "^LODS(B|W)$",
1184                                               "^SCAS(B|L|Q|W)$")>;
1185def : InstRW<[ADLPWriteResGroup94], (instrs LEAVE)>;
1186
1187def ADLPWriteResGroup95 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort02_03_11]> {
1188  let ReleaseAtCycles = [2, 1];
1189  let Latency = 6;
1190  let NumMicroOps = 3;
1191}
1192def : InstRW<[ADLPWriteResGroup95], (instrs LEAVE64)>;
1193
1194def ADLPWriteResGroup96 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08]> {
1195  let ReleaseAtCycles = [1, 2, 4, 3, 2, 1, 1];
1196  let Latency = AlderlakePModel.MaxLatency;
1197  let NumMicroOps = 14;
1198}
1199def : InstRW<[ADLPWriteResGroup96], (instrs LGDT64m)>;
1200
1201def ADLPWriteResGroup97 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_05, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08]> {
1202  let ReleaseAtCycles = [1, 1, 5, 3, 2, 1, 1];
1203  let Latency = AlderlakePModel.MaxLatency;
1204  let NumMicroOps = 14;
1205}
1206def : InstRW<[ADLPWriteResGroup97], (instrs LIDT64m)>;
1207
1208def ADLPWriteResGroup98 : SchedWriteRes<[ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08]> {
1209  let ReleaseAtCycles = [5, 3, 2, 1, 1];
1210  let Latency = AlderlakePModel.MaxLatency;
1211  let NumMicroOps = 12;
1212}
1213def : InstRW<[ADLPWriteResGroup98], (instrs LLDT16m)>;
1214
1215def ADLPWriteResGroup99 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08]> {
1216  let ReleaseAtCycles = [1, 4, 3, 1, 1, 1];
1217  let Latency = AlderlakePModel.MaxLatency;
1218  let NumMicroOps = 11;
1219}
1220def : InstRW<[ADLPWriteResGroup99], (instrs LLDT16r)>;
1221
1222def ADLPWriteResGroup100 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
1223  let ReleaseAtCycles = [1, 1, 2, 8, 3, 1, 2, 7, 2];
1224  let Latency = AlderlakePModel.MaxLatency;
1225  let NumMicroOps = 27;
1226}
1227def : InstRW<[ADLPWriteResGroup100], (instrs LMSW16m)>;
1228
1229def ADLPWriteResGroup101 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
1230  let ReleaseAtCycles = [5, 7, 1, 2, 5, 2];
1231  let Latency = AlderlakePModel.MaxLatency;
1232  let NumMicroOps = 22;
1233}
1234def : InstRW<[ADLPWriteResGroup101], (instrs LMSW16r)>;
1235
1236def ADLPWriteResGroup102 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort02_03_11]> {
1237  let ReleaseAtCycles = [2, 1];
1238  let Latency = 5;
1239  let NumMicroOps = 3;
1240}
1241def : InstRW<[ADLPWriteResGroup102], (instregex "^LODS(L|Q)$")>;
1242
1243def ADLPWriteResGroup103 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01]> {
1244  let ReleaseAtCycles = [2, 4, 1];
1245  let Latency = 3;
1246  let NumMicroOps = 7;
1247}
1248def : InstRW<[ADLPWriteResGroup103], (instrs LOOP)>;
1249
1250def ADLPWriteResGroup104 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01]> {
1251  let ReleaseAtCycles = [4, 6, 1];
1252  let Latency = 3;
1253  let NumMicroOps = 11;
1254}
1255def : InstRW<[ADLPWriteResGroup104], (instrs LOOPE)>;
1256
1257def ADLPWriteResGroup105 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01]> {
1258  let ReleaseAtCycles = [4, 6, 1];
1259  let Latency = 2;
1260  let NumMicroOps = 11;
1261}
1262def : InstRW<[ADLPWriteResGroup105], (instrs LOOPNE)>;
1263
1264def ADLPWriteResGroup106 : SchedWriteRes<[ADLPPort00_01_05_06, ADLPPort02_03, ADLPPort06]> {
1265  let Latency = 7;
1266  let NumMicroOps = 3;
1267}
1268def : InstRW<[ADLPWriteResGroup106], (instrs LRET64)>;
1269
1270def ADLPWriteResGroup107 : SchedWriteRes<[ADLPPort00, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort05]> {
1271  let ReleaseAtCycles = [1, 5, 3, 3, 1];
1272  let Latency = 70;
1273  let NumMicroOps = 13;
1274}
1275def : InstRW<[ADLPWriteResGroup107], (instregex "^LSL(16|32|64)rm$")>;
1276
1277def ADLPWriteResGroup108 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort05]> {
1278  let ReleaseAtCycles = [1, 4, 4, 3, 2, 1];
1279  let Latency = 63;
1280  let NumMicroOps = 15;
1281}
1282def : InstRW<[ADLPWriteResGroup108], (instregex "^LSL(16|32|64)rr$")>;
1283
1284def ADLPWriteResGroup109 : SchedWriteRes<[ADLPPort00_01, ADLPPort02_03_11, ADLPPort05]> {
1285  let Latency = 24;
1286  let NumMicroOps = 3;
1287}
1288def : InstRW<[ADLPWriteResGroup109], (instregex "^MMX_CVT(T?)PD2PIrm$")>;
1289
1290def ADLPWriteResGroup110 : SchedWriteRes<[ADLPPort00_01, ADLPPort05]> {
1291  let Latency = 8;
1292  let NumMicroOps = 2;
1293}
1294def : InstRW<[ADLPWriteResGroup110], (instregex "^MMX_CVT(T?)PD2PIrr$")>;
1295
1296def ADLPWriteResGroup111 : SchedWriteRes<[ADLPPort00_01, ADLPPort05]> {
1297  let Latency = 6;
1298  let NumMicroOps = 2;
1299}
1300def : InstRW<[ADLPWriteResGroup111], (instrs MMX_CVTPI2PDrr)>;
1301
1302def ADLPWriteResGroup112 : SchedWriteRes<[ADLPPort00, ADLPPort00_01]> {
1303  let Latency = 7;
1304  let NumMicroOps = 2;
1305}
1306def : InstRW<[ADLPWriteResGroup112], (instrs MMX_CVTPI2PSrr)>;
1307
1308def ADLPWriteResGroup113 : SchedWriteRes<[ADLPPort00, ADLPPort02_03_11]> {
1309  let Latency = 13;
1310  let NumMicroOps = 2;
1311}
1312def : InstRW<[ADLPWriteResGroup113], (instregex "^MMX_CVT(T?)PS2PIrm$")>;
1313
1314def ADLPWriteResGroup114 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05]> {
1315  let Latency = 9;
1316  let NumMicroOps = 2;
1317}
1318def : InstRW<[ADLPWriteResGroup114], (instregex "^MMX_CVT(T?)PS2PIrr$")>;
1319
1320def ADLPWriteResGroup115 : SchedWriteRes<[ADLPPort00, ADLPPort04_09, ADLPPort07_08]> {
1321  let ReleaseAtCycles = [2, 1, 1];
1322  let Latency = 12;
1323  let NumMicroOps = 4;
1324}
1325def : InstRW<[ADLPWriteResGroup115], (instregex "^MMX_MASKMOVQ((64)?)$")>;
1326
1327def ADLPWriteResGroup116 : SchedWriteRes<[ADLPPort04_09, ADLPPort07_08]> {
1328  let Latency = 18;
1329  let NumMicroOps = 2;
1330}
1331def : InstRW<[ADLPWriteResGroup116], (instrs MMX_MOVD64mr)>;
1332
1333def ADLPWriteResGroup117 : SchedWriteRes<[ADLPPort02_03_11]> {
1334  let Latency = 8;
1335}
1336def : InstRW<[ADLPWriteResGroup117], (instregex "^MMX_MOV(D|Q)64rm$",
1337                                                "^VBROADCAST(F|I)128rm$",
1338                                                "^VBROADCASTS(D|S)Yrm$",
1339                                                "^VMOV(D|SH|SL)DUPYrm$",
1340                                                "^VPBROADCAST(D|Q)Yrm$")>;
1341def : InstRW<[ADLPWriteResGroup117], (instrs MMX_MOVD64to64rm)>;
1342
1343def ADLPWriteResGroup118 : SchedWriteRes<[ADLPPort00_01_05, ADLPPort00_05]> {
1344  let Latency = 3;
1345  let NumMicroOps = 2;
1346}
1347def : InstRW<[ADLPWriteResGroup118], (instregex "^MMX_MOV(DQ|FR64)2Qrr$")>;
1348
1349def ADLPWriteResGroup119 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05]> {
1350  let Latency = 3;
1351  let NumMicroOps = 2;
1352}
1353def : InstRW<[ADLPWriteResGroup119], (instregex "^MMX_MOVQ2(DQ|FR64)rr$")>;
1354
1355def ADLPWriteResGroup120 : SchedWriteRes<[ADLPPort02_03_11, ADLPPort05]> {
1356  let ReleaseAtCycles = [1, 2];
1357  let Latency = 12;
1358  let NumMicroOps = 3;
1359}
1360def : InstRW<[ADLPWriteResGroup120, ReadAfterVecLd], (instregex "^MMX_PACKSS(DW|WB)rm$")>;
1361def : InstRW<[ADLPWriteResGroup120, ReadAfterVecLd], (instrs MMX_PACKUSWBrm)>;
1362
1363def ADLPWriteResGroup121 : SchedWriteRes<[ADLPPort05]> {
1364  let ReleaseAtCycles = [2];
1365  let Latency = 4;
1366  let NumMicroOps = 2;
1367}
1368def : InstRW<[ADLPWriteResGroup121], (instregex "^MMX_PACKSS(DW|WB)rr$")>;
1369def : InstRW<[ADLPWriteResGroup121], (instrs MMX_PACKUSWBrr)>;
1370def : InstRW<[ADLPWriteResGroup121, ReadDefault, ReadInt2Fpu], (instrs MMX_PINSRWrr)>;
1371
1372def ADLPWriteResGroup122 : SchedWriteRes<[ADLPPort00_05, ADLPPort02_03_11]> {
1373  let Latency = 9;
1374  let NumMicroOps = 2;
1375}
1376def : InstRW<[ADLPWriteResGroup122, ReadAfterVecLd], (instregex "^MMX_P(ADD|SUB)(B|D|Q|W)rm$")>;
1377
1378def ADLPWriteResGroup123 : SchedWriteRes<[ADLPPort00, ADLPPort02_03_11, ADLPPort05]> {
1379  let ReleaseAtCycles = [1, 1, 2];
1380  let Latency = 11;
1381  let NumMicroOps = 4;
1382}
1383def : InstRW<[ADLPWriteResGroup123, ReadAfterVecLd], (instregex "^MMX_PH(ADD|SUB)SWrm$")>;
1384
1385def ADLPWriteResGroup124 : SchedWriteRes<[ADLPPort00, ADLPPort05]> {
1386  let ReleaseAtCycles = [1, 2];
1387  let Latency = 3;
1388  let NumMicroOps = 3;
1389}
1390def : InstRW<[ADLPWriteResGroup124], (instregex "^MMX_PH(ADD|SUB)SWrr$")>;
1391
1392def ADLPWriteResGroup125 : SchedWriteRes<[ADLPPort02_03_11, ADLPPort05]> {
1393  let Latency = 9;
1394  let NumMicroOps = 2;
1395}
1396def : InstRW<[ADLPWriteResGroup125], (instregex "^VPBROADCAST(B|W)Yrm$")>;
1397def : InstRW<[ADLPWriteResGroup125, ReadAfterLd], (instrs MMX_PINSRWrm)>;
1398def : InstRW<[ADLPWriteResGroup125, ReadAfterVecYLd], (instrs VPALIGNRYrmi)>;
1399
1400def ADLPWriteResGroup126 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort02_03_11]> {
1401  let Latency = 5;
1402  let NumMicroOps = 2;
1403}
1404def : InstRW<[ADLPWriteResGroup126], (instregex "^MOV16ao(16|32|64)$")>;
1405
1406def ADLPWriteResGroup127 : SchedWriteRes<[ADLPPort01, ADLPPort04_09, ADLPPort07_08]> {
1407  let Latency = 12;
1408  let NumMicroOps = 3;
1409}
1410def : InstRW<[ADLPWriteResGroup127], (instregex "^PUSH(F|G)S(16|32)$")>;
1411def : InstRW<[ADLPWriteResGroup127], (instrs MOV16ms,
1412                                             MOVBE32mr)>;
1413
1414def ADLPWriteResGroup128 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort01]> {
1415  let NumMicroOps = 2;
1416}
1417def : InstRW<[ADLPWriteResGroup128], (instregex "^MOV(16|32|64)rs$",
1418                                                "^S(TR|LDT)16r$")>;
1419
1420def ADLPWriteResGroup129 : SchedWriteRes<[ADLPPort02_03_11]>;
1421def : InstRW<[ADLPWriteResGroup129], (instregex "^MOV32ao(16|32|64)$")>;
1422def : InstRW<[ADLPWriteResGroup129], (instrs MOV64ao64)>;
1423
1424def ADLPWriteResGroup130 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort04_09, ADLPPort07_08]> {
1425  let NumMicroOps = 3;
1426}
1427def : InstRW<[ADLPWriteResGroup130], (instregex "^MOV(8|32)o(16|32)a$",
1428                                                "^MOV(8|32|64)o64a$")>;
1429
1430def ADLPWriteResGroup131 : SchedWriteRes<[ADLPPort00_01_05_06_10]> {
1431  let Latency = 0;
1432}
1433def : InstRW<[ADLPWriteResGroup131], (instregex "^MOV32rr((_REV)?)$",
1434                                                "^MOVZX(32|64)rr8$")>;
1435def : InstRW<[ADLPWriteResGroup131], (instrs MOVZX32rr8_NOREX)>;
1436
1437def ADLPWriteResGroup132 : SchedWriteRes<[ADLPPort02_03_11]> {
1438  let Latency = 5;
1439}
1440def : InstRW<[ADLPWriteResGroup132], (instrs MOV64ao32)>;
1441
1442def ADLPWriteResGroup133 : SchedWriteRes<[ADLPPort00_01, ADLPPort00_01_05, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort01_05_10, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
1443  let ReleaseAtCycles = [1, 2, 4, 16, 7, 2, 2, 12, 2];
1444  let Latency = 217;
1445  let NumMicroOps = 48;
1446}
1447def : InstRW<[ADLPWriteResGroup133], (instrs MOV64dr)>;
1448
1449def ADLPWriteResGroup134 : SchedWriteRes<[ADLPPort04_09, ADLPPort07_08]> {
1450  let Latency = 12;
1451  let NumMicroOps = 2;
1452}
1453def : InstRW<[ADLPWriteResGroup134], (instrs MOV64o32a)>;
1454
1455def ADLPWriteResGroup135 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort05]> {
1456  let Latency = AlderlakePModel.MaxLatency;
1457  let NumMicroOps = 3;
1458}
1459def : InstRW<[ADLPWriteResGroup135], (instrs MOV64rc)>;
1460
1461def ADLPWriteResGroup136 : SchedWriteRes<[ADLPPort00_01_05, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort01_05_10, ADLPPort05]> {
1462  let ReleaseAtCycles = [3, 4, 8, 4, 2, 3];
1463  let Latency = 181;
1464  let NumMicroOps = 24;
1465}
1466def : InstRW<[ADLPWriteResGroup136], (instrs MOV64rd)>;
1467
1468def ADLPWriteResGroup137 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort02_03_11]> {
1469  let NumMicroOps = 2;
1470}
1471def : InstRW<[ADLPWriteResGroup137], (instregex "^MOV8ao(16|32|64)$")>;
1472
1473def ADLPWriteResGroup138 : SchedWriteRes<[ADLPPort04_09, ADLPPort07_08]> {
1474  let Latency = 13;
1475  let NumMicroOps = 2;
1476}
1477def : InstRW<[ADLPWriteResGroup138], (instregex "^MOV8m(i|r)$")>;
1478def : InstRW<[ADLPWriteResGroup138], (instrs MOV8mr_NOREX)>;
1479
1480def ADLPWriteResGroup139 : SchedWriteRes<[ADLPPort00_06, ADLPPort04_09, ADLPPort07_08]> {
1481  let Latency = 12;
1482  let NumMicroOps = 3;
1483}
1484def : InstRW<[ADLPWriteResGroup139], (instrs MOVBE16mr)>;
1485
1486def ADLPWriteResGroup140 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort02_03_11]> {
1487  let Latency = 7;
1488  let NumMicroOps = 3;
1489}
1490def : InstRW<[ADLPWriteResGroup140], (instrs MOVBE16rm)>;
1491
1492def ADLPWriteResGroup141 : SchedWriteRes<[ADLPPort01, ADLPPort02_03_11]> {
1493  let Latency = 6;
1494  let NumMicroOps = 2;
1495}
1496def : InstRW<[ADLPWriteResGroup141], (instrs MOVBE32rm)>;
1497
1498def ADLPWriteResGroup142 : SchedWriteRes<[ADLPPort00_06, ADLPPort01, ADLPPort04_09, ADLPPort07_08]> {
1499  let Latency = 12;
1500  let NumMicroOps = 4;
1501}
1502def : InstRW<[ADLPWriteResGroup142], (instrs MOVBE64mr,
1503                                             PUSHF16,
1504                                             SLDT16m,
1505                                             STRm)>;
1506
1507def ADLPWriteResGroup143 : SchedWriteRes<[ADLPPort00_06, ADLPPort01, ADLPPort02_03_11]> {
1508  let Latency = 7;
1509  let NumMicroOps = 3;
1510}
1511def : InstRW<[ADLPWriteResGroup143], (instrs MOVBE64rm)>;
1512
1513def ADLPWriteResGroup144 : SchedWriteRes<[ADLPPort00_06, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08]> {
1514  let NumMicroOps = 4;
1515}
1516def : InstRW<[ADLPWriteResGroup144], (instregex "^MOVDIR64B(16|32|64)$")>;
1517
1518def ADLPWriteResGroup145 : SchedWriteRes<[ADLPPort04_09, ADLPPort07_08]> {
1519  let Latency = 511;
1520  let NumMicroOps = 2;
1521}
1522def : InstRW<[ADLPWriteResGroup145], (instrs MOVDIRI32)>;
1523
1524def ADLPWriteResGroup146 : SchedWriteRes<[ADLPPort04_09, ADLPPort07_08]> {
1525  let Latency = 514;
1526  let NumMicroOps = 2;
1527}
1528def : InstRW<[ADLPWriteResGroup146], (instrs MOVDIRI64)>;
1529
1530def ADLPWriteResGroup147 : SchedWriteRes<[ADLPPort01_05, ADLPPort02_03_11]> {
1531  let Latency = 8;
1532  let NumMicroOps = 2;
1533}
1534def : InstRW<[ADLPWriteResGroup147, ReadAfterVecXLd], (instregex "^(V?)MOVLP(D|S)rm$",
1535                                                                 "^(V?)SHUFP(D|S)rmi$")>;
1536
1537def ADLPWriteResGroup148 : SchedWriteRes<[ADLPPort04_09, ADLPPort07_08]> {
1538  let Latency = 512;
1539  let NumMicroOps = 2;
1540}
1541def : InstRW<[ADLPWriteResGroup148], (instrs MOVNTDQmr)>;
1542
1543def ADLPWriteResGroup149 : SchedWriteRes<[ADLPPort04_09, ADLPPort07_08]> {
1544  let Latency = 518;
1545  let NumMicroOps = 2;
1546}
1547def : InstRW<[ADLPWriteResGroup149], (instrs MOVNTImr)>;
1548
1549def ADLPWriteResGroup150 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08]> {
1550  let ReleaseAtCycles = [4, 1, 1, 1];
1551  let Latency = 8;
1552  let NumMicroOps = 7;
1553}
1554def : InstRW<[ADLPWriteResGroup150], (instrs MOVSB)>;
1555
1556def ADLPWriteResGroup151 : SchedWriteRes<[ADLPPort00_01_05]>;
1557def : InstRW<[ADLPWriteResGroup151], (instregex "^(V?)MOVS(D|S)rr((_REV)?)$",
1558                                                "^(V?)P(ADD|SUB)(B|D|Q|W)rr$",
1559                                                "^VP(ADD|SUB)(B|D|Q|W)Yrr$")>;
1560def : InstRW<[ADLPWriteResGroup151], (instrs VPBLENDDrri)>;
1561
1562def ADLPWriteResGroup152 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08]> {
1563  let ReleaseAtCycles = [4, 1, 1, 1];
1564  let Latency = 7;
1565  let NumMicroOps = 7;
1566}
1567def : InstRW<[ADLPWriteResGroup152], (instregex "^MOVS(L|Q|W)$")>;
1568
1569def ADLPWriteResGroup153 : SchedWriteRes<[ADLPPort02_03_11]> {
1570  let Latency = 6;
1571}
1572def : InstRW<[ADLPWriteResGroup153], (instregex "^MOVSX(16|32|64)rm(16|32)$",
1573                                                "^MOVSX(32|64)rm8$")>;
1574def : InstRW<[ADLPWriteResGroup153], (instrs MOVSX32rm8_NOREX)>;
1575
1576def ADLPWriteResGroup154 : SchedWriteRes<[ADLPPort01_05_10, ADLPPort02_03_11]> {
1577  let Latency = 6;
1578  let NumMicroOps = 2;
1579}
1580def : InstRW<[ADLPWriteResGroup154], (instrs MOVSX16rm8)>;
1581
1582def ADLPWriteResGroup155 : SchedWriteRes<[ADLPPort01_05_10]>;
1583def : InstRW<[ADLPWriteResGroup155], (instregex "^MOVSX(16|32|64)rr(8|16|32)$")>;
1584def : InstRW<[ADLPWriteResGroup155], (instrs MOVSX32rr8_NOREX)>;
1585
1586def ADLPWriteResGroup156 : SchedWriteRes<[ADLPPort00, ADLPPort02_03]> {
1587  let Latency = 11;
1588  let NumMicroOps = 2;
1589}
1590def : InstRW<[ADLPWriteResGroup156], (instregex "^MUL_F(32|64)m$")>;
1591
1592def ADLPWriteResGroup157 : SchedWriteRes<[ADLPPort00, ADLPPort02_03, ADLPPort05]> {
1593  let Latency = 14;
1594  let NumMicroOps = 3;
1595}
1596def : InstRW<[ADLPWriteResGroup157], (instregex "^MUL_FI(16|32)m$")>;
1597
1598def ADLPWriteResGroup158 : SchedWriteRes<[ADLPPort00]> {
1599  let Latency = 4;
1600}
1601def : InstRW<[ADLPWriteResGroup158], (instregex "^MUL_F(P?)rST0$")>;
1602def : InstRW<[ADLPWriteResGroup158], (instrs MUL_FST0r)>;
1603
1604def ADLPWriteResGroup159 : SchedWriteRes<[ADLPPort00_01_05_06, ADLPPort05, ADLPPort06]> {
1605  let ReleaseAtCycles = [7, 1, 2];
1606  let Latency = 20;
1607  let NumMicroOps = 10;
1608}
1609def : InstRW<[ADLPWriteResGroup159], (instrs MWAITrr)>;
1610
1611def ADLPWriteResGroup160 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_05, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
1612  let ReleaseAtCycles = [6, 4, 1, 28, 15, 7, 1, 16, 1];
1613  let Latency = 35;
1614  let NumMicroOps = 79;
1615}
1616def : InstRW<[ADLPWriteResGroup160], (instrs OUT16ir)>;
1617
1618def ADLPWriteResGroup161 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
1619  let ReleaseAtCycles = [6, 6, 27, 15, 7, 1, 16, 1];
1620  let Latency = 35;
1621  let NumMicroOps = 79;
1622}
1623def : InstRW<[ADLPWriteResGroup161], (instrs OUT16rr)>;
1624
1625def ADLPWriteResGroup162 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_05, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
1626  let ReleaseAtCycles = [6, 4, 1, 30, 15, 9, 1, 18, 1];
1627  let Latency = 35;
1628  let NumMicroOps = 85;
1629}
1630def : InstRW<[ADLPWriteResGroup162], (instrs OUT32ir)>;
1631
1632def ADLPWriteResGroup163 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
1633  let ReleaseAtCycles = [6, 6, 29, 15, 9, 1, 18, 1];
1634  let Latency = 35;
1635  let NumMicroOps = 85;
1636}
1637def : InstRW<[ADLPWriteResGroup163], (instrs OUT32rr)>;
1638
1639def ADLPWriteResGroup164 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_05, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
1640  let ReleaseAtCycles = [5, 5, 1, 25, 15, 5, 1, 15, 1];
1641  let Latency = 35;
1642  let NumMicroOps = 73;
1643}
1644def : InstRW<[ADLPWriteResGroup164], (instrs OUT8ir)>;
1645
1646def ADLPWriteResGroup165 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
1647  let ReleaseAtCycles = [5, 5, 26, 15, 5, 1, 15, 1];
1648  let Latency = 35;
1649  let NumMicroOps = 73;
1650}
1651def : InstRW<[ADLPWriteResGroup165], (instrs OUT8rr)>;
1652
1653def ADLPWriteResGroup166 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
1654  let ReleaseAtCycles = [7, 6, 25, 16, 7, 1, 17, 1];
1655  let Latency = AlderlakePModel.MaxLatency;
1656  let NumMicroOps = 80;
1657}
1658def : InstRW<[ADLPWriteResGroup166], (instrs OUTSB)>;
1659
1660def ADLPWriteResGroup167 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
1661  let ReleaseAtCycles = [7, 6, 28, 16, 10, 1, 20, 1];
1662  let Latency = AlderlakePModel.MaxLatency;
1663  let NumMicroOps = 89;
1664}
1665def : InstRW<[ADLPWriteResGroup167], (instrs OUTSL)>;
1666
1667def ADLPWriteResGroup168 : SchedWriteRes<[ADLPPort00, ADLPPort00_01, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
1668  let ReleaseAtCycles = [6, 1, 5, 27, 16, 8, 1, 18, 1];
1669  let Latency = AlderlakePModel.MaxLatency;
1670  let NumMicroOps = 83;
1671}
1672def : InstRW<[ADLPWriteResGroup168], (instrs OUTSW)>;
1673
1674def ADLPWriteResGroup169 : SchedWriteRes<[ADLPPort02_03_11, ADLPPort05]> {
1675  let Latency = 10;
1676  let NumMicroOps = 2;
1677}
1678def : InstRW<[ADLPWriteResGroup169, ReadAfterVecXLd], (instregex "^(V?)PACK(S|U)S(DW|WB)rm$",
1679                                                                 "^(V?)PCMPGTQrm$")>;
1680
1681def ADLPWriteResGroup170 : SchedWriteRes<[ADLPPort05]> {
1682  let Latency = 3;
1683}
1684def : InstRW<[ADLPWriteResGroup170], (instregex "^(V?)PACK(S|U)S(DW|WB)rr$",
1685                                                "^(V?)PCMPGTQrr$",
1686                                                "^VPACK(S|U)S(DW|WB)Yrr$")>;
1687def : InstRW<[ADLPWriteResGroup170], (instrs VPCMPGTQYrr)>;
1688
1689def ADLPWriteResGroup171 : SchedWriteRes<[ADLPPort00_01_05, ADLPPort02_03_11]> {
1690  let Latency = 8;
1691  let NumMicroOps = 2;
1692}
1693def : InstRW<[ADLPWriteResGroup171, ReadAfterVecXLd], (instregex "^(V?)P(ADD|SUB)(B|D|Q|W)rm$")>;
1694def : InstRW<[ADLPWriteResGroup171, ReadAfterVecXLd], (instrs VPBLENDDrmi)>;
1695
1696def ADLPWriteResGroup172 : SchedWriteRes<[ADLPPort02_03_11, ADLPPort05]> {
1697  let Latency = 8;
1698  let NumMicroOps = 2;
1699}
1700def : InstRW<[ADLPWriteResGroup172], (instregex "^VPBROADCAST(B|W)rm$")>;
1701def : InstRW<[ADLPWriteResGroup172, ReadAfterVecXLd], (instregex "^(V?)PALIGNRrmi$")>;
1702
1703def ADLPWriteResGroup173 : SchedWriteRes<[ADLPPort05]>;
1704def : InstRW<[ADLPWriteResGroup173], (instregex "^(V?)PALIGNRrri$",
1705                                                "^VPBROADCAST(B|D|Q|W)rr$")>;
1706def : InstRW<[ADLPWriteResGroup173], (instrs VPALIGNRYrri)>;
1707
1708def ADLPWriteResGroup174 : SchedWriteRes<[ADLPPort00_06, ADLPPort05]> {
1709  let Latency = 4;
1710  let NumMicroOps = 2;
1711}
1712def : InstRW<[ADLPWriteResGroup174], (instrs PAUSE)>;
1713
1714def ADLPWriteResGroup175 : SchedWriteRes<[ADLPPort01, ADLPPort02_03_11]> {
1715  let Latency = 8;
1716  let NumMicroOps = 2;
1717}
1718def : InstRW<[ADLPWriteResGroup175, ReadAfterLd], (instregex "^P(DEP|EXT)(32|64)rm$")>;
1719
1720def ADLPWriteResGroup176 : SchedWriteRes<[ADLPPort01_05, ADLPPort04_09, ADLPPort07_08]> {
1721  let Latency = 12;
1722  let NumMicroOps = 3;
1723}
1724def : InstRW<[ADLPWriteResGroup176], (instregex "^(V?)PEXTR(D|Q)mr$")>;
1725
1726def ADLPWriteResGroup177 : SchedWriteRes<[ADLPPort00_01, ADLPPort01_05, ADLPPort02_03_11]> {
1727  let ReleaseAtCycles = [1, 2, 1];
1728  let Latency = 9;
1729  let NumMicroOps = 4;
1730}
1731def : InstRW<[ADLPWriteResGroup177, ReadAfterVecXLd], (instregex "^(V?)PH(ADD|SUB)SWrm$")>;
1732
1733def ADLPWriteResGroup178 : SchedWriteRes<[ADLPPort00_01, ADLPPort01_05]> {
1734  let ReleaseAtCycles = [1, 2];
1735  let Latency = 2;
1736  let NumMicroOps = 3;
1737}
1738def : InstRW<[ADLPWriteResGroup178], (instregex "^(V?)PH(ADD|SUB)SWrr$",
1739                                                "^VPH(ADD|SUB)SWYrr$")>;
1740
1741def ADLPWriteResGroup179 : SchedWriteRes<[ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08]> {
1742  let Latency = 12;
1743  let NumMicroOps = 3;
1744}
1745def : InstRW<[ADLPWriteResGroup179], (instregex "^POP(16|32|64)rmm$",
1746                                                "^PUSH(16|32)rmm$")>;
1747
1748def ADLPWriteResGroup180 : SchedWriteRes<[ADLPPort02_03]> {
1749  let Latency = 5;
1750}
1751def : InstRW<[ADLPWriteResGroup180], (instregex "^POPA(16|32)$",
1752                                                "^PREFETCHIT(0|1)$")>;
1753def : InstRW<[ADLPWriteResGroup180], (instrs POPF32)>;
1754
1755def ADLPWriteResGroup181 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11]> {
1756  let ReleaseAtCycles = [6, 2, 1, 1];
1757  let Latency = 5;
1758  let NumMicroOps = 10;
1759}
1760def : InstRW<[ADLPWriteResGroup181], (instrs POPF16)>;
1761
1762def ADLPWriteResGroup182 : SchedWriteRes<[ADLPPort00_06, ADLPPort01, ADLPPort02_03_11]> {
1763  let ReleaseAtCycles = [2, 1, 1];
1764  let Latency = 5;
1765  let NumMicroOps = 7;
1766}
1767def : InstRW<[ADLPWriteResGroup182], (instrs POPF64)>;
1768
1769def ADLPWriteResGroup183 : SchedWriteRes<[ADLPPort02_03_11]> {
1770  let Latency = 0;
1771}
1772def : InstRW<[ADLPWriteResGroup183], (instregex "^PREFETCHT(0|1|2)$")>;
1773def : InstRW<[ADLPWriteResGroup183], (instrs PREFETCHNTA)>;
1774
1775def ADLPWriteResGroup184 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort02_03_11, ADLPPort06]> {
1776  let ReleaseAtCycles = [1, 1, 2];
1777  let Latency = AlderlakePModel.MaxLatency;
1778  let NumMicroOps = 4;
1779}
1780def : InstRW<[ADLPWriteResGroup184], (instregex "^PTWRITE((64)?)m$")>;
1781
1782def ADLPWriteResGroup185 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort06]> {
1783  let ReleaseAtCycles = [1, 2];
1784  let Latency = AlderlakePModel.MaxLatency;
1785  let NumMicroOps = 3;
1786}
1787def : InstRW<[ADLPWriteResGroup185], (instrs PTWRITE64r)>;
1788
1789def ADLPWriteResGroup186 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort06]> {
1790  let ReleaseAtCycles = [2, 2];
1791  let Latency = AlderlakePModel.MaxLatency;
1792  let NumMicroOps = 4;
1793}
1794def : InstRW<[ADLPWriteResGroup186], (instrs PTWRITEr)>;
1795
1796def ADLPWriteResGroup187 : SchedWriteRes<[ADLPPort04_09, ADLPPort07_08]> {
1797  let NumMicroOps = 2;
1798}
1799def : InstRW<[ADLPWriteResGroup187], (instregex "^PUSH64r((mr)?)$")>;
1800
1801def ADLPWriteResGroup188 : SchedWriteRes<[ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08]> {
1802  let NumMicroOps = 3;
1803}
1804def : InstRW<[ADLPWriteResGroup188], (instrs PUSH64rmm)>;
1805
1806def ADLPWriteResGroup189 : SchedWriteRes<[ADLPPort02_03_07, ADLPPort04]>;
1807def : InstRW<[ADLPWriteResGroup189], (instregex "^PUSHA(16|32)$",
1808                                                "^ST_F(32|64)m$")>;
1809def : InstRW<[ADLPWriteResGroup189], (instrs PUSHF32)>;
1810
1811def ADLPWriteResGroup190 : SchedWriteRes<[ADLPPort00_06, ADLPPort01, ADLPPort04_09, ADLPPort07_08]> {
1812  let Latency = 4;
1813  let NumMicroOps = 4;
1814}
1815def : InstRW<[ADLPWriteResGroup190], (instrs PUSHF64)>;
1816
1817def ADLPWriteResGroup191 : SchedWriteRes<[ADLPPort01, ADLPPort04_09, ADLPPort07_08]> {
1818  let NumMicroOps = 3;
1819}
1820def : InstRW<[ADLPWriteResGroup191], (instregex "^PUSH(F|G)S64$")>;
1821
1822def ADLPWriteResGroup192 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01]> {
1823  let ReleaseAtCycles = [2, 3, 2];
1824  let Latency = 8;
1825  let NumMicroOps = 7;
1826}
1827def : InstRW<[ADLPWriteResGroup192], (instregex "^RC(L|R)(16|32|64)rCL$")>;
1828
1829def ADLPWriteResGroup193 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06]> {
1830  let ReleaseAtCycles = [1, 2];
1831  let Latency = 13;
1832  let NumMicroOps = 3;
1833}
1834def : InstRW<[ADLPWriteResGroup193, WriteRMW], (instregex "^RC(L|R)8m(1|i)$")>;
1835
1836def ADLPWriteResGroup194 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01]> {
1837  let ReleaseAtCycles = [1, 5, 2];
1838  let Latency = 20;
1839  let NumMicroOps = 8;
1840}
1841def : InstRW<[ADLPWriteResGroup194, WriteRMW], (instrs RCL8mCL)>;
1842
1843def ADLPWriteResGroup195 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01]> {
1844  let ReleaseAtCycles = [2, 5, 2];
1845  let Latency = 7;
1846  let NumMicroOps = 9;
1847}
1848def : InstRW<[ADLPWriteResGroup195], (instrs RCL8rCL)>;
1849
1850def ADLPWriteResGroup196 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01]> {
1851  let ReleaseAtCycles = [2, 4, 3];
1852  let Latency = 20;
1853  let NumMicroOps = 9;
1854}
1855def : InstRW<[ADLPWriteResGroup196, WriteRMW], (instrs RCR8mCL)>;
1856
1857def ADLPWriteResGroup197 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01]> {
1858  let ReleaseAtCycles = [3, 4, 3];
1859  let Latency = 9;
1860  let NumMicroOps = 10;
1861}
1862def : InstRW<[ADLPWriteResGroup197], (instrs RCR8rCL)>;
1863
1864def ADLPWriteResGroup198 : SchedWriteRes<[ADLPPort00_01, ADLPPort00_01_05, ADLPPort00_05, ADLPPort00_05_06, ADLPPort00_06, ADLPPort01, ADLPPort01_05, ADLPPort01_05_10, ADLPPort05]> {
1865  let ReleaseAtCycles = [1, 6, 1, 10, 20, 8, 5, 1, 2];
1866  let Latency = AlderlakePModel.MaxLatency;
1867  let NumMicroOps = 54;
1868}
1869def : InstRW<[ADLPWriteResGroup198], (instrs RDMSR)>;
1870
1871def ADLPWriteResGroup199 : SchedWriteRes<[ADLPPort01]> {
1872  let Latency = AlderlakePModel.MaxLatency;
1873}
1874def : InstRW<[ADLPWriteResGroup199], (instrs RDPID64)>;
1875
1876def ADLPWriteResGroup200 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01]> {
1877  let Latency = AlderlakePModel.MaxLatency;
1878  let NumMicroOps = 3;
1879}
1880def : InstRW<[ADLPWriteResGroup200], (instrs RDPKRUr)>;
1881
1882def ADLPWriteResGroup201 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort05]> {
1883  let ReleaseAtCycles = [9, 6, 2, 1];
1884  let Latency = AlderlakePModel.MaxLatency;
1885  let NumMicroOps = 18;
1886}
1887def : InstRW<[ADLPWriteResGroup201], (instrs RDPMC)>;
1888
1889def ADLPWriteResGroup202 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_05_06, ADLPPort00_06, ADLPPort01, ADLPPort01_05, ADLPPort02_03_11, ADLPPort05]> {
1890  let ReleaseAtCycles = [2, 3, 2, 5, 7, 3, 1, 2];
1891  let Latency = 1386;
1892  let NumMicroOps = 25;
1893}
1894def : InstRW<[ADLPWriteResGroup202], (instrs RDRAND16r)>;
1895
1896def ADLPWriteResGroup203 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06_10, ADLPPort00_05_06, ADLPPort00_06, ADLPPort01, ADLPPort01_05, ADLPPort02_03_11, ADLPPort05]> {
1897  let ReleaseAtCycles = [2, 3, 2, 5, 7, 3, 1, 2];
1898  let Latency = AlderlakePModel.MaxLatency;
1899  let NumMicroOps = 25;
1900}
1901def : InstRW<[ADLPWriteResGroup203], (instregex "^RDRAND(32|64)r$")>;
1902
1903def ADLPWriteResGroup204 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05, ADLPPort00_05_06, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort05]> {
1904  let ReleaseAtCycles = [2, 3, 3, 5, 7, 1, 4];
1905  let Latency = 1381;
1906  let NumMicroOps = 25;
1907}
1908def : InstRW<[ADLPWriteResGroup204], (instrs RDSEED16r)>;
1909
1910def ADLPWriteResGroup205 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05, ADLPPort00_05_06, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort05]> {
1911  let ReleaseAtCycles = [2, 3, 3, 5, 7, 1, 4];
1912  let Latency = AlderlakePModel.MaxLatency;
1913  let NumMicroOps = 25;
1914}
1915def : InstRW<[ADLPWriteResGroup205], (instregex "^RDSEED(32|64)r$")>;
1916
1917def ADLPWriteResGroup206 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort05]> {
1918  let ReleaseAtCycles = [5, 6, 3, 1];
1919  let Latency = 18;
1920  let NumMicroOps = 15;
1921}
1922def : InstRW<[ADLPWriteResGroup206], (instrs RDTSC)>;
1923
1924def ADLPWriteResGroup207 : SchedWriteRes<[ADLPPort00, ADLPPort00_01, ADLPPort00_01_05, ADLPPort00_05_06, ADLPPort00_06, ADLPPort01, ADLPPort05]> {
1925  let ReleaseAtCycles = [2, 2, 1, 2, 7, 4, 3];
1926  let Latency = 42;
1927  let NumMicroOps = 21;
1928}
1929def : InstRW<[ADLPWriteResGroup207], (instrs RDTSCP)>;
1930
1931def ADLPWriteResGroup208 : SchedWriteRes<[ADLPPort00_06, ADLPPort02_03_11]> {
1932  let Latency = 7;
1933  let NumMicroOps = 2;
1934}
1935def : InstRW<[ADLPWriteResGroup208], (instrs RET64)>;
1936
1937def ADLPWriteResGroup209 : SchedWriteRes<[ADLPPort00_06, ADLPPort02_03_11]> {
1938  let ReleaseAtCycles = [2, 1];
1939  let Latency = 6;
1940  let NumMicroOps = 3;
1941}
1942def : InstRW<[ADLPWriteResGroup209], (instregex "^RETI(16|32|64)$")>;
1943
1944def ADLPWriteResGroup210 : SchedWriteRes<[]>;
1945def : InstRW<[ADLPWriteResGroup210], (instrs REX64_PREFIX)>;
1946
1947def ADLPWriteResGroup211 : SchedWriteRes<[ADLPPort00_06]> {
1948  let ReleaseAtCycles = [2];
1949  let Latency = 12;
1950  let NumMicroOps = 2;
1951}
1952def : InstRW<[ADLPWriteResGroup211, WriteRMW], (instregex "^RO(L|R)(16|32|64)m(1|i|CL)$")>;
1953
1954def ADLPWriteResGroup212 : SchedWriteRes<[ADLPPort00_06]> {
1955  let ReleaseAtCycles = [2];
1956  let NumMicroOps = 2;
1957}
1958def : InstRW<[ADLPWriteResGroup212], (instregex "^RO(L|R)(8|16|32|64)r(1|i)$")>;
1959
1960def ADLPWriteResGroup213 : SchedWriteRes<[ADLPPort00_06]> {
1961  let ReleaseAtCycles = [2];
1962  let Latency = 13;
1963  let NumMicroOps = 2;
1964}
1965def : InstRW<[ADLPWriteResGroup213, WriteRMW], (instregex "^RO(L|R)8m(1|i)$",
1966                                                          "^(RO|SH)L8mCL$",
1967                                                          "^(RO|SA|SH)R8mCL$")>;
1968
1969def ADLPWriteResGroup214 : SchedWriteRes<[ADLPPort00_06]> {
1970  let ReleaseAtCycles = [2];
1971  let Latency = 4;
1972  let NumMicroOps = 2;
1973}
1974def : InstRW<[ADLPWriteResGroup214], (instrs SAHF)>;
1975
1976def ADLPWriteResGroup215 : SchedWriteRes<[ADLPPort00_06]> {
1977  let Latency = 13;
1978}
1979def : InstRW<[ADLPWriteResGroup215, WriteRMW], (instregex "^S(A|H)R8m(1|i)$",
1980                                                          "^SHL8m(1|i)$")>;
1981
1982def ADLPWriteResGroup216 : SchedWriteRes<[ADLPPort00_06, ADLPPort02_03_11]> {
1983  let Latency = 8;
1984  let NumMicroOps = 2;
1985}
1986def : InstRW<[ADLPWriteResGroup216, ReadAfterLd, ReadDefault, ReadDefault, ReadDefault, ReadDefault, ReadDefault], (instregex "^S(A|H)RX(32|64)rm$",
1987                                                                                                                              "^SHLX(32|64)rm$")>;
1988
1989def ADLPWriteResGroup217 : SchedWriteRes<[ADLPPort00_06]> {
1990  let Latency = 3;
1991}
1992def : InstRW<[ADLPWriteResGroup217], (instregex "^S(A|H)RX(32|64)rr$",
1993                                                "^SHLX(32|64)rr$")>;
1994
1995def ADLPWriteResGroup218 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort04_09, ADLPPort07_08]> {
1996  let ReleaseAtCycles = [2, 2, 1, 1, 1];
1997  let Latency = AlderlakePModel.MaxLatency;
1998  let NumMicroOps = 7;
1999}
2000def : InstRW<[ADLPWriteResGroup218], (instrs SERIALIZE)>;
2001
2002def ADLPWriteResGroup219 : SchedWriteRes<[ADLPPort04_09, ADLPPort07_08]> {
2003  let Latency = 2;
2004  let NumMicroOps = 2;
2005}
2006def : InstRW<[ADLPWriteResGroup219], (instrs SFENCE)>;
2007
2008def ADLPWriteResGroup220 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort01, ADLPPort04_09, ADLPPort07_08]> {
2009  let ReleaseAtCycles = [1, 2, 2, 2];
2010  let Latency = 21;
2011  let NumMicroOps = 7;
2012}
2013def : InstRW<[ADLPWriteResGroup220], (instregex "^S(G|I)DT64m$")>;
2014
2015def ADLPWriteResGroup221 : SchedWriteRes<[ADLPPort00_01_05, ADLPPort02_03_11, ADLPPort05]> {
2016  let Latency = 9;
2017  let NumMicroOps = 3;
2018}
2019def : InstRW<[ADLPWriteResGroup221, ReadAfterVecXLd], (instrs SHA1MSG1rm)>;
2020
2021def ADLPWriteResGroup222 : SchedWriteRes<[ADLPPort00_01_05, ADLPPort05]> {
2022  let Latency = 2;
2023  let NumMicroOps = 2;
2024}
2025def : InstRW<[ADLPWriteResGroup222], (instrs SHA1MSG1rr)>;
2026
2027def ADLPWriteResGroup223 : SchedWriteRes<[ADLPPort00_01, ADLPPort00_01_05, ADLPPort00_06, ADLPPort01_05, ADLPPort02_03_11]> {
2028  let ReleaseAtCycles = [2, 2, 1, 2, 1];
2029  let Latency = 13;
2030  let NumMicroOps = 8;
2031}
2032def : InstRW<[ADLPWriteResGroup223, ReadAfterVecXLd], (instrs SHA1MSG2rm)>;
2033
2034def ADLPWriteResGroup224 : SchedWriteRes<[ADLPPort00_01, ADLPPort00_01_05, ADLPPort00_06, ADLPPort01_05]> {
2035  let ReleaseAtCycles = [2, 2, 1, 2];
2036  let Latency = 6;
2037  let NumMicroOps = 7;
2038}
2039def : InstRW<[ADLPWriteResGroup224], (instrs SHA1MSG2rr)>;
2040
2041def ADLPWriteResGroup225 : SchedWriteRes<[ADLPPort00_01, ADLPPort00_01_05, ADLPPort01_05, ADLPPort02_03_11]> {
2042  let Latency = 8;
2043  let NumMicroOps = 4;
2044}
2045def : InstRW<[ADLPWriteResGroup225, ReadAfterVecXLd], (instrs SHA1NEXTErm)>;
2046
2047def ADLPWriteResGroup226 : SchedWriteRes<[ADLPPort00_01, ADLPPort00_01_05, ADLPPort01_05]> {
2048  let Latency = 3;
2049  let NumMicroOps = 3;
2050}
2051def : InstRW<[ADLPWriteResGroup226], (instrs SHA1NEXTErr)>;
2052
2053def ADLPWriteResGroup227 : SchedWriteRes<[ADLPPort02_03_11, ADLPPort05]> {
2054  let Latency = 13;
2055  let NumMicroOps = 2;
2056}
2057def : InstRW<[ADLPWriteResGroup227, ReadAfterVecXLd], (instrs SHA1RNDS4rmi,
2058                                                              SHA256RNDS2rm)>;
2059
2060def ADLPWriteResGroup228 : SchedWriteRes<[ADLPPort05]> {
2061  let Latency = 6;
2062}
2063def : InstRW<[ADLPWriteResGroup228], (instrs SHA1RNDS4rri,
2064                                             SHA256RNDS2rr)>;
2065
2066def ADLPWriteResGroup229 : SchedWriteRes<[ADLPPort00_01, ADLPPort00_01_05, ADLPPort00_06, ADLPPort02_03_11, ADLPPort05]> {
2067  let ReleaseAtCycles = [3, 2, 1, 1, 1];
2068  let Latency = 12;
2069  let NumMicroOps = 8;
2070}
2071def : InstRW<[ADLPWriteResGroup229, ReadAfterVecXLd], (instrs SHA256MSG1rm)>;
2072
2073def ADLPWriteResGroup230 : SchedWriteRes<[ADLPPort00_01, ADLPPort00_01_05, ADLPPort00_06, ADLPPort05]> {
2074  let ReleaseAtCycles = [3, 2, 1, 1];
2075  let Latency = 5;
2076  let NumMicroOps = 7;
2077}
2078def : InstRW<[ADLPWriteResGroup230], (instrs SHA256MSG1rr)>;
2079
2080def ADLPWriteResGroup231 : SchedWriteRes<[ADLPPort02_03_11, ADLPPort05]> {
2081  let ReleaseAtCycles = [1, 2];
2082  let Latency = 13;
2083  let NumMicroOps = 3;
2084}
2085def : InstRW<[ADLPWriteResGroup231, ReadAfterVecXLd], (instrs SHA256MSG2rm)>;
2086
2087def ADLPWriteResGroup232 : SchedWriteRes<[ADLPPort05]> {
2088  let ReleaseAtCycles = [2];
2089  let Latency = 6;
2090  let NumMicroOps = 2;
2091}
2092def : InstRW<[ADLPWriteResGroup232], (instrs SHA256MSG2rr)>;
2093
2094def ADLPWriteResGroup233 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort07_08]> {
2095  let Latency = 13;
2096  let NumMicroOps = 5;
2097}
2098def : InstRW<[ADLPWriteResGroup233], (instrs SHRD16mri8)>;
2099
2100def ADLPWriteResGroup234 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort01]> {
2101  let Latency = 6;
2102  let NumMicroOps = 2;
2103}
2104def : InstRW<[ADLPWriteResGroup234], (instregex "^SLDT(32|64)r$")>;
2105
2106def ADLPWriteResGroup235 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort05]> {
2107  let NumMicroOps = 2;
2108}
2109def : InstRW<[ADLPWriteResGroup235], (instrs SMSW16r)>;
2110
2111def ADLPWriteResGroup236 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort05]> {
2112  let Latency = AlderlakePModel.MaxLatency;
2113  let NumMicroOps = 2;
2114}
2115def : InstRW<[ADLPWriteResGroup236], (instregex "^SMSW(32|64)r$")>;
2116
2117def ADLPWriteResGroup237 : SchedWriteRes<[ADLPPort00, ADLPPort02_03_11]> {
2118  let Latency = 24;
2119  let NumMicroOps = 2;
2120}
2121def : InstRW<[ADLPWriteResGroup237, ReadAfterVecLd], (instregex "^(V?)SQRTSDm_Int$")>;
2122
2123def ADLPWriteResGroup238 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06]> {
2124  let Latency = 6;
2125  let NumMicroOps = 2;
2126}
2127def : InstRW<[ADLPWriteResGroup238], (instrs STD)>;
2128
2129def ADLPWriteResGroup239 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01]> {
2130  let ReleaseAtCycles = [1, 4, 1];
2131  let Latency = AlderlakePModel.MaxLatency;
2132  let NumMicroOps = 6;
2133}
2134def : InstRW<[ADLPWriteResGroup239], (instrs STI)>;
2135
2136def ADLPWriteResGroup240 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort04_09, ADLPPort07_08]> {
2137  let ReleaseAtCycles = [2, 1, 1];
2138  let Latency = 8;
2139  let NumMicroOps = 4;
2140}
2141def : InstRW<[ADLPWriteResGroup240], (instrs STOSB)>;
2142
2143def ADLPWriteResGroup241 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort04_09, ADLPPort07_08]> {
2144  let ReleaseAtCycles = [2, 1, 1];
2145  let Latency = 7;
2146  let NumMicroOps = 4;
2147}
2148def : InstRW<[ADLPWriteResGroup241], (instregex "^STOS(L|Q|W)$")>;
2149
2150def ADLPWriteResGroup242 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort01]> {
2151  let Latency = 5;
2152  let NumMicroOps = 2;
2153}
2154def : InstRW<[ADLPWriteResGroup242], (instregex "^STR(32|64)r$")>;
2155
2156def ADLPWriteResGroup243 : SchedWriteRes<[ADLPPort00]> {
2157  let Latency = 2;
2158}
2159def : InstRW<[ADLPWriteResGroup243], (instregex "^(TST|XAM)_F$")>;
2160def : InstRW<[ADLPWriteResGroup243], (instrs UCOM_FPPr)>;
2161
2162def ADLPWriteResGroup244 : SchedWriteRes<[ADLPPort00_01_05, ADLPPort02_03_11]> {
2163  let ReleaseAtCycles = [3, 1];
2164  let Latency = 9;
2165  let NumMicroOps = 4;
2166}
2167def : InstRW<[ADLPWriteResGroup244, ReadAfterVecXLd, ReadAfterVecXLd, ReadDefault, ReadDefault, ReadDefault, ReadDefault, ReadDefault], (instregex "^VBLENDVP(D|S)rmr$")>;
2168def : InstRW<[ADLPWriteResGroup244, ReadAfterVecXLd, ReadAfterVecXLd, ReadDefault, ReadDefault, ReadDefault, ReadDefault, ReadDefault], (instrs VPBLENDVBrmr)>;
2169
2170def ADLPWriteResGroup245 : SchedWriteRes<[ADLPPort00_01_05]> {
2171  let ReleaseAtCycles = [3];
2172  let Latency = 3;
2173  let NumMicroOps = 3;
2174}
2175def : InstRW<[ADLPWriteResGroup245], (instregex "^VBLENDVP(D|S)rrr$")>;
2176def : InstRW<[ADLPWriteResGroup245], (instrs VPBLENDVBrrr)>;
2177
2178def ADLPWriteResGroup246 : SchedWriteRes<[ADLPPort00, ADLPPort01, ADLPPort02_03_11]> {
2179  let ReleaseAtCycles = [6, 7, 18];
2180  let Latency = 81;
2181  let NumMicroOps = 31;
2182}
2183def : InstRW<[ADLPWriteResGroup246], (instrs VERRm)>;
2184
2185def ADLPWriteResGroup247 : SchedWriteRes<[ADLPPort00, ADLPPort01, ADLPPort02_03_11]> {
2186  let ReleaseAtCycles = [6, 7, 17];
2187  let Latency = 74;
2188  let NumMicroOps = 30;
2189}
2190def : InstRW<[ADLPWriteResGroup247], (instrs VERRr)>;
2191
2192def ADLPWriteResGroup248 : SchedWriteRes<[ADLPPort00, ADLPPort01, ADLPPort02_03_11]> {
2193  let ReleaseAtCycles = [5, 8, 21];
2194  let Latency = 81;
2195  let NumMicroOps = 34;
2196}
2197def : InstRW<[ADLPWriteResGroup248], (instrs VERWm)>;
2198
2199def ADLPWriteResGroup249 : SchedWriteRes<[ADLPPort00, ADLPPort01, ADLPPort02_03_11]> {
2200  let ReleaseAtCycles = [5, 8, 20];
2201  let Latency = 74;
2202  let NumMicroOps = 33;
2203}
2204def : InstRW<[ADLPWriteResGroup249], (instrs VERWr)>;
2205
2206def ADLPWriteResGroup250 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05, ADLPPort01_05, ADLPPort02_03_11]> {
2207  let ReleaseAtCycles = [1, 1, 2, 4];
2208  let Latency = 29;
2209  let NumMicroOps = 8;
2210}
2211def : InstRW<[ADLPWriteResGroup250, WriteVecMaskedGatherWriteback], (instregex "^VGATHER(D|Q)PDYrm$",
2212                                                                               "^VPGATHER(D|Q)QYrm$")>;
2213def : InstRW<[ADLPWriteResGroup250, WriteVecMaskedGatherWriteback], (instrs VGATHERQPSYrm,
2214                                                                            VPGATHERQDYrm)>;
2215
2216def ADLPWriteResGroup251 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05, ADLPPort01_05, ADLPPort02_03_11]> {
2217  let ReleaseAtCycles = [1, 1, 1, 2];
2218  let Latency = 20;
2219  let NumMicroOps = 5;
2220}
2221def : InstRW<[ADLPWriteResGroup251, WriteVecMaskedGatherWriteback], (instregex "^VGATHER(D|Q)PDrm$",
2222                                                                               "^VPGATHER(D|Q)Qrm$")>;
2223def : InstRW<[ADLPWriteResGroup251, WriteVecMaskedGatherWriteback], (instrs VGATHERQPSrm,
2224                                                                            VPGATHERQDrm)>;
2225
2226def ADLPWriteResGroup252 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05, ADLPPort01_05, ADLPPort02_03_11]> {
2227  let ReleaseAtCycles = [1, 1, 2, 8];
2228  let Latency = 30;
2229  let NumMicroOps = 12;
2230}
2231def : InstRW<[ADLPWriteResGroup252, WriteVecMaskedGatherWriteback], (instrs VGATHERDPSYrm,
2232                                                                            VPGATHERDDYrm)>;
2233
2234def ADLPWriteResGroup253 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05, ADLPPort01_05, ADLPPort02_03_11]> {
2235  let ReleaseAtCycles = [1, 1, 2, 4];
2236  let Latency = 28;
2237  let NumMicroOps = 8;
2238}
2239def : InstRW<[ADLPWriteResGroup253, WriteVecMaskedGatherWriteback], (instrs VGATHERDPSrm,
2240                                                                            VPGATHERDDrm)>;
2241
2242def ADLPWriteResGroup254 : SchedWriteRes<[ADLPPort01_05, ADLPPort05]> {
2243  let ReleaseAtCycles = [1, 2];
2244  let Latency = 5;
2245  let NumMicroOps = 3;
2246}
2247def : InstRW<[ADLPWriteResGroup254], (instregex "^VH(ADD|SUB)P(D|S)rr$")>;
2248
2249def ADLPWriteResGroup255 : SchedWriteRes<[ADLPPort00_01_05, ADLPPort02_03_11]> {
2250  let Latency = 9;
2251  let NumMicroOps = 2;
2252}
2253def : InstRW<[ADLPWriteResGroup255, ReadAfterVecYLd], (instregex "^VINSERT(F|I)128rm$",
2254                                                                 "^VP(ADD|SUB)(B|D|Q|W)Yrm$")>;
2255
2256def ADLPWriteResGroup256 : SchedWriteRes<[ADLPPort00, ADLPPort00_06, ADLPPort02_03_11]> {
2257  let Latency = 7;
2258  let NumMicroOps = 3;
2259}
2260def : InstRW<[ADLPWriteResGroup256], (instrs VLDMXCSR)>;
2261
2262def ADLPWriteResGroup257 : SchedWriteRes<[ADLPPort00_01_05_06, ADLPPort01, ADLPPort01_05, ADLPPort02_03, ADLPPort02_03_07, ADLPPort04, ADLPPort05, ADLPPort06]> {
2263  let ReleaseAtCycles = [8, 1, 1, 1, 1, 1, 2, 3];
2264  let Latency = 40;
2265  let NumMicroOps = 18;
2266}
2267def : InstRW<[ADLPWriteResGroup257], (instrs VMCLEARm)>;
2268
2269def ADLPWriteResGroup258 : SchedWriteRes<[ADLPPort00]> {
2270  let Latency = 5;
2271}
2272def : InstRW<[ADLPWriteResGroup258], (instregex "^VMOVMSKP(D|S)Yrr$")>;
2273
2274def ADLPWriteResGroup259 : SchedWriteRes<[ADLPPort04_09, ADLPPort07_08]> {
2275  let Latency = 521;
2276  let NumMicroOps = 2;
2277}
2278def : InstRW<[ADLPWriteResGroup259], (instrs VMOVNTDQmr)>;
2279
2280def ADLPWriteResGroup260 : SchedWriteRes<[ADLPPort04_09, ADLPPort07_08]> {
2281  let Latency = 473;
2282  let NumMicroOps = 2;
2283}
2284def : InstRW<[ADLPWriteResGroup260], (instrs VMOVNTPDmr)>;
2285
2286def ADLPWriteResGroup261 : SchedWriteRes<[ADLPPort04_09, ADLPPort07_08]> {
2287  let Latency = 494;
2288  let NumMicroOps = 2;
2289}
2290def : InstRW<[ADLPWriteResGroup261], (instrs VMOVNTPSYmr)>;
2291
2292def ADLPWriteResGroup262 : SchedWriteRes<[ADLPPort04_09, ADLPPort07_08]> {
2293  let Latency = 470;
2294  let NumMicroOps = 2;
2295}
2296def : InstRW<[ADLPWriteResGroup262], (instrs VMOVNTPSmr)>;
2297
2298def ADLPWriteResGroup263 : SchedWriteRes<[ADLPPort02_03_11, ADLPPort05]> {
2299  let Latency = 11;
2300  let NumMicroOps = 2;
2301}
2302def : InstRW<[ADLPWriteResGroup263, ReadAfterVecYLd], (instregex "^VPACK(S|U)S(DW|WB)Yrm$")>;
2303def : InstRW<[ADLPWriteResGroup263, ReadAfterVecYLd], (instrs VPCMPGTQYrm)>;
2304def : InstRW<[ADLPWriteResGroup263, ReadAfterVecXLd], (instrs VPCLMULQDQYrmi)>;
2305
2306def ADLPWriteResGroup264 : SchedWriteRes<[ADLPPort01_05, ADLPPort02_03_11]> {
2307  let Latency = 9;
2308  let NumMicroOps = 2;
2309}
2310def : InstRW<[ADLPWriteResGroup264, ReadAfterVecYLd], (instregex "^VSHUFP(D|S)Yrmi$")>;
2311def : InstRW<[ADLPWriteResGroup264, ReadAfterVecYLd], (instrs VPBLENDWYrmi)>;
2312
2313def ADLPWriteResGroup266 : SchedWriteRes<[ADLPPort00_01, ADLPPort01_05, ADLPPort02_03_11]> {
2314  let ReleaseAtCycles = [1, 2, 1];
2315  let Latency = 10;
2316  let NumMicroOps = 4;
2317}
2318def : InstRW<[ADLPWriteResGroup266, ReadAfterVecYLd], (instregex "^VPH(ADD|SUB)SWYrm$")>;
2319
2320def ADLPWriteResGroup267 : SchedWriteRes<[ADLPPort00_01_05, ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort01_05_10]> {
2321  let ReleaseAtCycles = [1, 2, 3, 3, 1];
2322  let Latency = 16;
2323  let NumMicroOps = 10;
2324}
2325def : InstRW<[ADLPWriteResGroup267], (instrs VZEROALL)>;
2326
2327def ADLPWriteResGroup268 : SchedWriteRes<[ADLPPort00_01_05_06]> {
2328  let ReleaseAtCycles = [2];
2329  let Latency = 2;
2330  let NumMicroOps = 2;
2331}
2332def : InstRW<[ADLPWriteResGroup268], (instrs WAIT)>;
2333
2334def ADLPWriteResGroup269 : SchedWriteRes<[ADLPPort00, ADLPPort00_01, ADLPPort00_05, ADLPPort00_06, ADLPPort01, ADLPPort01_05, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
2335  let ReleaseAtCycles = [8, 6, 19, 63, 21, 15, 1, 10, 1];
2336  let Latency = AlderlakePModel.MaxLatency;
2337  let NumMicroOps = 144;
2338}
2339def : InstRW<[ADLPWriteResGroup269], (instrs WRMSR)>;
2340
2341def ADLPWriteResGroup270 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06, ADLPPort01, ADLPPort05]> {
2342  let ReleaseAtCycles = [2, 1, 4, 1];
2343  let Latency = AlderlakePModel.MaxLatency;
2344  let NumMicroOps = 8;
2345}
2346def : InstRW<[ADLPWriteResGroup270], (instrs WRPKRUr)>;
2347
2348def ADLPWriteResGroup271 : SchedWriteRes<[ADLPPort00_01_05_06_10]> {
2349  let ReleaseAtCycles = [2];
2350  let Latency = 12;
2351  let NumMicroOps = 2;
2352}
2353def : InstRW<[ADLPWriteResGroup271, WriteRMW], (instregex "^XADD(16|32|64)rm$")>;
2354
2355def ADLPWriteResGroup272 : SchedWriteRes<[ADLPPort00_01_05_06_10]> {
2356  let ReleaseAtCycles = [2];
2357  let Latency = 13;
2358  let NumMicroOps = 2;
2359}
2360def : InstRW<[ADLPWriteResGroup272, WriteRMW], (instrs XADD8rm)>;
2361
2362def ADLPWriteResGroup273 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06]> {
2363  let ReleaseAtCycles = [4, 1];
2364  let Latency = 39;
2365  let NumMicroOps = 5;
2366}
2367def : InstRW<[ADLPWriteResGroup273, WriteRMW], (instregex "^XCHG(16|32)rm$")>;
2368
2369def ADLPWriteResGroup274 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06]> {
2370  let ReleaseAtCycles = [5, 1];
2371  let Latency = 39;
2372  let NumMicroOps = 6;
2373}
2374def : InstRW<[ADLPWriteResGroup274, WriteRMW], (instrs XCHG64rm)>;
2375
2376def ADLPWriteResGroup275 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_06]> {
2377  let ReleaseAtCycles = [4, 1];
2378  let Latency = 40;
2379  let NumMicroOps = 5;
2380}
2381def : InstRW<[ADLPWriteResGroup275, WriteRMW], (instrs XCHG8rm)>;
2382
2383def ADLPWriteResGroup276 : SchedWriteRes<[ADLPPort00, ADLPPort00_01_05_06, ADLPPort00_05, ADLPPort01, ADLPPort05, ADLPPort06]> {
2384  let ReleaseAtCycles = [2, 4, 2, 1, 2, 4];
2385  let Latency = 17;
2386  let NumMicroOps = 15;
2387}
2388def : InstRW<[ADLPWriteResGroup276], (instrs XCH_F)>;
2389
2390def ADLPWriteResGroup277 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort00_05_06, ADLPPort00_06, ADLPPort01]> {
2391  let ReleaseAtCycles = [7, 3, 8, 5];
2392  let Latency = 4;
2393  let NumMicroOps = 23;
2394}
2395def : InstRW<[ADLPWriteResGroup277], (instrs XGETBV)>;
2396
2397def ADLPWriteResGroup278 : SchedWriteRes<[ADLPPort00_01_05_06_10, ADLPPort02_03_11]> {
2398  let ReleaseAtCycles = [2, 1];
2399  let Latency = 7;
2400  let NumMicroOps = 3;
2401}
2402def : InstRW<[ADLPWriteResGroup278], (instrs XLAT)>;
2403
2404def ADLPWriteResGroup279 : SchedWriteRes<[ADLPPort00_01_05_06, ADLPPort01, ADLPPort02_03, ADLPPort06]> {
2405  let ReleaseAtCycles = [21, 1, 1, 8];
2406  let Latency = 37;
2407  let NumMicroOps = 31;
2408}
2409def : InstRW<[ADLPWriteResGroup279], (instregex "^XRSTOR((S|64)?)$")>;
2410def : InstRW<[ADLPWriteResGroup279], (instrs XRSTORS64)>;
2411
2412def ADLPWriteResGroup280 : SchedWriteRes<[ADLPPort00_01, ADLPPort00_05, ADLPPort00_06, ADLPPort01, ADLPPort01_05, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
2413  let ReleaseAtCycles = [14, 25, 44, 21, 21, 4, 1, 9, 1];
2414  let Latency = 42;
2415  let NumMicroOps = 140;
2416}
2417def : InstRW<[ADLPWriteResGroup280], (instrs XSAVE)>;
2418
2419def ADLPWriteResGroup281 : SchedWriteRes<[ADLPPort00_01, ADLPPort00_05, ADLPPort00_06, ADLPPort01, ADLPPort01_05, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
2420  let ReleaseAtCycles = [14, 25, 44, 21, 21, 4, 1, 9, 1];
2421  let Latency = 41;
2422  let NumMicroOps = 140;
2423}
2424def : InstRW<[ADLPWriteResGroup281], (instrs XSAVE64)>;
2425
2426def ADLPWriteResGroup282 : SchedWriteRes<[ADLPPort00, ADLPPort00_01, ADLPPort00_05, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
2427  let ReleaseAtCycles = [1, 19, 36, 52, 23, 4, 2, 12, 2];
2428  let Latency = 42;
2429  let NumMicroOps = 151;
2430}
2431def : InstRW<[ADLPWriteResGroup282], (instrs XSAVEC)>;
2432
2433def ADLPWriteResGroup283 : SchedWriteRes<[ADLPPort00, ADLPPort00_01, ADLPPort00_05, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
2434  let ReleaseAtCycles = [1, 19, 36, 53, 23, 4, 2, 12, 2];
2435  let Latency = 42;
2436  let NumMicroOps = 152;
2437}
2438def : InstRW<[ADLPWriteResGroup283], (instrs XSAVEC64)>;
2439
2440def ADLPWriteResGroup284 : SchedWriteRes<[ADLPPort00_01, ADLPPort00_05, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
2441  let ReleaseAtCycles = [25, 35, 52, 27, 4, 1, 10, 1];
2442  let Latency = 46;
2443  let NumMicroOps = 155;
2444}
2445def : InstRW<[ADLPWriteResGroup284], (instrs XSAVEOPT)>;
2446
2447def ADLPWriteResGroup285 : SchedWriteRes<[ADLPPort00_01, ADLPPort00_05, ADLPPort00_06, ADLPPort01, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
2448  let ReleaseAtCycles = [25, 35, 53, 27, 4, 1, 10, 1];
2449  let Latency = 46;
2450  let NumMicroOps = 156;
2451}
2452def : InstRW<[ADLPWriteResGroup285], (instrs XSAVEOPT64)>;
2453
2454def ADLPWriteResGroup286 : SchedWriteRes<[ADLPPort00_01, ADLPPort00_05, ADLPPort00_06, ADLPPort01, ADLPPort01_05, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
2455  let ReleaseAtCycles = [23, 32, 53, 29, 30, 4, 2, 9, 2];
2456  let Latency = 42;
2457  let NumMicroOps = 184;
2458}
2459def : InstRW<[ADLPWriteResGroup286], (instrs XSAVES)>;
2460
2461def ADLPWriteResGroup287 : SchedWriteRes<[ADLPPort00_01, ADLPPort00_05, ADLPPort00_06, ADLPPort01, ADLPPort01_05, ADLPPort02_03_11, ADLPPort04_09, ADLPPort05, ADLPPort07_08]> {
2462  let ReleaseAtCycles = [23, 33, 53, 29, 32, 4, 2, 8, 2];
2463  let Latency = 42;
2464  let NumMicroOps = 186;
2465}
2466def : InstRW<[ADLPWriteResGroup287], (instrs XSAVES64)>;
2467
2468def ADLPWriteResGroup288 : SchedWriteRes<[ADLPPort00_01_05, ADLPPort00_01_05_06_10, ADLPPort00_05_06, ADLPPort00_06, ADLPPort01, ADLPPort01_05_10, ADLPPort05]> {
2469  let ReleaseAtCycles = [4, 23, 2, 14, 8, 1, 2];
2470  let Latency = 5;
2471  let NumMicroOps = 54;
2472}
2473def : InstRW<[ADLPWriteResGroup288], (instrs XSETBV)>;
2474
2475}
2476