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