X86SchedAlderlakeP.td 105 KB

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