10b57cec5SDimitry Andric//===-- X86Schedule.td - X86 Scheduling Definitions --------*- tablegen -*-===// 20b57cec5SDimitry Andric// 30b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric// 70b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric 90b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 100b57cec5SDimitry Andric// InstrSchedModel annotations for out-of-order CPUs. 110b57cec5SDimitry Andric 120b57cec5SDimitry Andric// Instructions with folded loads need to read the memory operand immediately, 130b57cec5SDimitry Andric// but other register operands don't have to be read until the load is ready. 140b57cec5SDimitry Andric// These operands are marked with ReadAfterLd. 150b57cec5SDimitry Andricdef ReadAfterLd : SchedRead; 160b57cec5SDimitry Andricdef ReadAfterVecLd : SchedRead; 170b57cec5SDimitry Andricdef ReadAfterVecXLd : SchedRead; 180b57cec5SDimitry Andricdef ReadAfterVecYLd : SchedRead; 190b57cec5SDimitry Andric 200b57cec5SDimitry Andric// Instructions that move data between general purpose registers and vector 210b57cec5SDimitry Andric// registers may be subject to extra latency due to data bypass delays. 220b57cec5SDimitry Andric// This SchedRead describes a bypass delay caused by data being moved from the 230b57cec5SDimitry Andric// integer unit to the floating point unit. 240b57cec5SDimitry Andricdef ReadInt2Fpu : SchedRead; 250b57cec5SDimitry Andric 260b57cec5SDimitry Andric// Instructions with both a load and a store folded are modeled as a folded 270b57cec5SDimitry Andric// load + WriteRMW. 280b57cec5SDimitry Andricdef WriteRMW : SchedWrite; 290b57cec5SDimitry Andric 30*5f757f3fSDimitry Andric// Helper to set SchedWrite ExePorts/Latency/ReleaseAtCycles/NumMicroOps. 310b57cec5SDimitry Andricmulticlass X86WriteRes<SchedWrite SchedRW, 320b57cec5SDimitry Andric list<ProcResourceKind> ExePorts, 330b57cec5SDimitry Andric int Lat, list<int> Res, int UOps> { 340b57cec5SDimitry Andric def : WriteRes<SchedRW, ExePorts> { 350b57cec5SDimitry Andric let Latency = Lat; 36*5f757f3fSDimitry Andric let ReleaseAtCycles = Res; 370b57cec5SDimitry Andric let NumMicroOps = UOps; 380b57cec5SDimitry Andric } 390b57cec5SDimitry Andric} 400b57cec5SDimitry Andric 410b57cec5SDimitry Andric// Most instructions can fold loads, so almost every SchedWrite comes in two 420b57cec5SDimitry Andric// variants: With and without a folded load. 430b57cec5SDimitry Andric// An X86FoldableSchedWrite holds a reference to the corresponding SchedWrite 440b57cec5SDimitry Andric// with a folded load. 450b57cec5SDimitry Andricclass X86FoldableSchedWrite : SchedWrite { 460b57cec5SDimitry Andric // The SchedWrite to use when a load is folded into the instruction. 470b57cec5SDimitry Andric SchedWrite Folded; 480b57cec5SDimitry Andric // The SchedRead to tag register operands than don't need to be ready 490b57cec5SDimitry Andric // until the folded load has completed. 500b57cec5SDimitry Andric SchedRead ReadAfterFold; 510b57cec5SDimitry Andric} 520b57cec5SDimitry Andric 530b57cec5SDimitry Andric// Multiclass that produces a linked pair of SchedWrites. 540b57cec5SDimitry Andricmulticlass X86SchedWritePair<SchedRead ReadAfter = ReadAfterLd> { 550b57cec5SDimitry Andric // Register-Memory operation. 560b57cec5SDimitry Andric def Ld : SchedWrite; 570b57cec5SDimitry Andric // Register-Register operation. 580b57cec5SDimitry Andric def NAME : X86FoldableSchedWrite { 590b57cec5SDimitry Andric let Folded = !cast<SchedWrite>(NAME#"Ld"); 600b57cec5SDimitry Andric let ReadAfterFold = ReadAfter; 610b57cec5SDimitry Andric } 620b57cec5SDimitry Andric} 630b57cec5SDimitry Andric 640b57cec5SDimitry Andric// Helpers to mark SchedWrites as unsupported. 650b57cec5SDimitry Andricmulticlass X86WriteResUnsupported<SchedWrite SchedRW> { 660b57cec5SDimitry Andric let Unsupported = 1 in { 670b57cec5SDimitry Andric def : WriteRes<SchedRW, []>; 680b57cec5SDimitry Andric } 690b57cec5SDimitry Andric} 700b57cec5SDimitry Andricmulticlass X86WriteResPairUnsupported<X86FoldableSchedWrite SchedRW> { 710b57cec5SDimitry Andric let Unsupported = 1 in { 720b57cec5SDimitry Andric def : WriteRes<SchedRW, []>; 730b57cec5SDimitry Andric def : WriteRes<SchedRW.Folded, []>; 740b57cec5SDimitry Andric } 750b57cec5SDimitry Andric} 760b57cec5SDimitry Andric 770b57cec5SDimitry Andric// Multiclass that wraps X86FoldableSchedWrite for each vector width. 780b57cec5SDimitry Andricclass X86SchedWriteWidths<X86FoldableSchedWrite sScl, 790b57cec5SDimitry Andric X86FoldableSchedWrite s128, 800b57cec5SDimitry Andric X86FoldableSchedWrite s256, 810b57cec5SDimitry Andric X86FoldableSchedWrite s512> { 820b57cec5SDimitry Andric X86FoldableSchedWrite Scl = sScl; // Scalar float/double operations. 830b57cec5SDimitry Andric X86FoldableSchedWrite MMX = sScl; // MMX operations. 840b57cec5SDimitry Andric X86FoldableSchedWrite XMM = s128; // XMM operations. 850b57cec5SDimitry Andric X86FoldableSchedWrite YMM = s256; // YMM operations. 860b57cec5SDimitry Andric X86FoldableSchedWrite ZMM = s512; // ZMM operations. 870b57cec5SDimitry Andric} 880b57cec5SDimitry Andric 890b57cec5SDimitry Andric// Multiclass that wraps X86SchedWriteWidths for each fp vector type. 90349cc55cSDimitry Andricclass X86SchedWriteSizes<X86SchedWriteWidths sPH, 91349cc55cSDimitry Andric X86SchedWriteWidths sPS, 920b57cec5SDimitry Andric X86SchedWriteWidths sPD> { 93349cc55cSDimitry Andric X86SchedWriteWidths PH = sPH; 940b57cec5SDimitry Andric X86SchedWriteWidths PS = sPS; 950b57cec5SDimitry Andric X86SchedWriteWidths PD = sPD; 960b57cec5SDimitry Andric} 970b57cec5SDimitry Andric 980b57cec5SDimitry Andric// Multiclass that wraps move/load/store triple for a vector width. 990b57cec5SDimitry Andricclass X86SchedWriteMoveLS<SchedWrite MoveRR, 1000b57cec5SDimitry Andric SchedWrite LoadRM, 1010b57cec5SDimitry Andric SchedWrite StoreMR> { 1020b57cec5SDimitry Andric SchedWrite RR = MoveRR; 1030b57cec5SDimitry Andric SchedWrite RM = LoadRM; 1040b57cec5SDimitry Andric SchedWrite MR = StoreMR; 1050b57cec5SDimitry Andric} 1060b57cec5SDimitry Andric 1078bcb0991SDimitry Andric// Multiclass that wraps masked load/store writes for a vector width. 1088bcb0991SDimitry Andricclass X86SchedWriteMaskMove<SchedWrite LoadRM, SchedWrite StoreMR> { 1098bcb0991SDimitry Andric SchedWrite RM = LoadRM; 1108bcb0991SDimitry Andric SchedWrite MR = StoreMR; 1118bcb0991SDimitry Andric} 1128bcb0991SDimitry Andric 1130b57cec5SDimitry Andric// Multiclass that wraps X86SchedWriteMoveLS for each vector width. 1140b57cec5SDimitry Andricclass X86SchedWriteMoveLSWidths<X86SchedWriteMoveLS sScl, 1150b57cec5SDimitry Andric X86SchedWriteMoveLS s128, 1160b57cec5SDimitry Andric X86SchedWriteMoveLS s256, 1170b57cec5SDimitry Andric X86SchedWriteMoveLS s512> { 1180b57cec5SDimitry Andric X86SchedWriteMoveLS Scl = sScl; // Scalar float/double operations. 1190b57cec5SDimitry Andric X86SchedWriteMoveLS MMX = sScl; // MMX operations. 1200b57cec5SDimitry Andric X86SchedWriteMoveLS XMM = s128; // XMM operations. 1210b57cec5SDimitry Andric X86SchedWriteMoveLS YMM = s256; // YMM operations. 1220b57cec5SDimitry Andric X86SchedWriteMoveLS ZMM = s512; // ZMM operations. 1230b57cec5SDimitry Andric} 1240b57cec5SDimitry Andric 1250b57cec5SDimitry Andric// Loads, stores, and moves, not folded with other operations. 1260b57cec5SDimitry Andricdef WriteLoad : SchedWrite; 1270b57cec5SDimitry Andricdef WriteStore : SchedWrite; 1280b57cec5SDimitry Andricdef WriteStoreNT : SchedWrite; 1290b57cec5SDimitry Andricdef WriteMove : SchedWrite; 130fe6060f1SDimitry Andricdef WriteVecMaskedGatherWriteback : SchedWrite; 1310b57cec5SDimitry Andricdef WriteCopy : WriteSequence<[WriteLoad, WriteStore]>; // mem->mem copy 1320b57cec5SDimitry Andric 1330b57cec5SDimitry Andric// Arithmetic. 1340b57cec5SDimitry Andricdefm WriteALU : X86SchedWritePair; // Simple integer ALU op. 1350b57cec5SDimitry Andricdefm WriteADC : X86SchedWritePair; // Integer ALU + flags op. 1360b57cec5SDimitry Andricdef WriteALURMW : WriteSequence<[WriteALULd, WriteRMW]>; 1370b57cec5SDimitry Andricdef WriteADCRMW : WriteSequence<[WriteADCLd, WriteRMW]>; 1380b57cec5SDimitry Andricdef WriteLEA : SchedWrite; // LEA instructions can't fold loads. 1390b57cec5SDimitry Andric 1400b57cec5SDimitry Andric// Integer multiplication 1410b57cec5SDimitry Andricdefm WriteIMul8 : X86SchedWritePair; // Integer 8-bit multiplication. 1420b57cec5SDimitry Andricdefm WriteIMul16 : X86SchedWritePair; // Integer 16-bit multiplication. 1430b57cec5SDimitry Andricdefm WriteIMul16Imm : X86SchedWritePair; // Integer 16-bit multiplication by immediate. 1440b57cec5SDimitry Andricdefm WriteIMul16Reg : X86SchedWritePair; // Integer 16-bit multiplication by register. 1450b57cec5SDimitry Andricdefm WriteIMul32 : X86SchedWritePair; // Integer 32-bit multiplication. 1460b57cec5SDimitry Andricdefm WriteIMul32Imm : X86SchedWritePair; // Integer 32-bit multiplication by immediate. 1470b57cec5SDimitry Andricdefm WriteIMul32Reg : X86SchedWritePair; // Integer 32-bit multiplication by register. 1480b57cec5SDimitry Andricdefm WriteIMul64 : X86SchedWritePair; // Integer 64-bit multiplication. 1490b57cec5SDimitry Andricdefm WriteIMul64Imm : X86SchedWritePair; // Integer 64-bit multiplication by immediate. 1500b57cec5SDimitry Andricdefm WriteIMul64Reg : X86SchedWritePair; // Integer 64-bit multiplication by register. 151349cc55cSDimitry Andricdefm WriteMULX32 : X86SchedWritePair; // Integer 32-bit Multiplication without affecting flags. 152349cc55cSDimitry Andricdefm WriteMULX64 : X86SchedWritePair; // Integer 64-bit Multiplication without affecting flags. 153349cc55cSDimitry Andricdef WriteIMulH : SchedWrite; // Integer multiplication, high part (only used by the RR variant of MULX). 154349cc55cSDimitry Andricdef WriteIMulHLd : SchedWrite; // Integer multiplication, high part (only used by the RM variant of MULX). 1550b57cec5SDimitry Andric 1560b57cec5SDimitry Andricdef WriteBSWAP32 : SchedWrite; // Byte Order (Endianness) 32-bit Swap. 1570b57cec5SDimitry Andricdef WriteBSWAP64 : SchedWrite; // Byte Order (Endianness) 64-bit Swap. 1580b57cec5SDimitry Andricdefm WriteCMPXCHG : X86SchedWritePair; // Compare and set, compare and swap. 1590b57cec5SDimitry Andricdef WriteCMPXCHGRMW : SchedWrite; // Compare and set, compare and swap. 1600b57cec5SDimitry Andricdef WriteXCHG : SchedWrite; // Compare+Exchange - TODO RMW support. 1610b57cec5SDimitry Andric 1620b57cec5SDimitry Andric// Integer division. 1630b57cec5SDimitry Andricdefm WriteDiv8 : X86SchedWritePair; 1640b57cec5SDimitry Andricdefm WriteDiv16 : X86SchedWritePair; 1650b57cec5SDimitry Andricdefm WriteDiv32 : X86SchedWritePair; 1660b57cec5SDimitry Andricdefm WriteDiv64 : X86SchedWritePair; 1670b57cec5SDimitry Andricdefm WriteIDiv8 : X86SchedWritePair; 1680b57cec5SDimitry Andricdefm WriteIDiv16 : X86SchedWritePair; 1690b57cec5SDimitry Andricdefm WriteIDiv32 : X86SchedWritePair; 1700b57cec5SDimitry Andricdefm WriteIDiv64 : X86SchedWritePair; 1710b57cec5SDimitry Andric 1720b57cec5SDimitry Andricdefm WriteBSF : X86SchedWritePair; // Bit scan forward. 1730b57cec5SDimitry Andricdefm WriteBSR : X86SchedWritePair; // Bit scan reverse. 1740b57cec5SDimitry Andricdefm WritePOPCNT : X86SchedWritePair; // Bit population count. 1750b57cec5SDimitry Andricdefm WriteLZCNT : X86SchedWritePair; // Leading zero count. 1760b57cec5SDimitry Andricdefm WriteTZCNT : X86SchedWritePair; // Trailing zero count. 1770b57cec5SDimitry Andricdefm WriteCMOV : X86SchedWritePair; // Conditional move. 1780b57cec5SDimitry Andricdef WriteFCMOV : SchedWrite; // X87 conditional move. 1790b57cec5SDimitry Andricdef WriteSETCC : SchedWrite; // Set register based on condition code. 1800b57cec5SDimitry Andricdef WriteSETCCStore : SchedWrite; 1810b57cec5SDimitry Andricdef WriteLAHFSAHF : SchedWrite; // Load/Store flags in AH. 1820b57cec5SDimitry Andric 1830b57cec5SDimitry Andricdef WriteBitTest : SchedWrite; // Bit Test 1840b57cec5SDimitry Andricdef WriteBitTestImmLd : SchedWrite; 1850b57cec5SDimitry Andricdef WriteBitTestRegLd : SchedWrite; 1860b57cec5SDimitry Andric 1870b57cec5SDimitry Andricdef WriteBitTestSet : SchedWrite; // Bit Test + Set 1880b57cec5SDimitry Andricdef WriteBitTestSetImmLd : SchedWrite; 1890b57cec5SDimitry Andricdef WriteBitTestSetRegLd : SchedWrite; 1900b57cec5SDimitry Andricdef WriteBitTestSetImmRMW : WriteSequence<[WriteBitTestSetImmLd, WriteRMW]>; 1910b57cec5SDimitry Andricdef WriteBitTestSetRegRMW : WriteSequence<[WriteBitTestSetRegLd, WriteRMW]>; 1920b57cec5SDimitry Andric 1930b57cec5SDimitry Andric// Integer shifts and rotates. 1940b57cec5SDimitry Andricdefm WriteShift : X86SchedWritePair; 1950b57cec5SDimitry Andricdefm WriteShiftCL : X86SchedWritePair; 1960b57cec5SDimitry Andricdefm WriteRotate : X86SchedWritePair; 1970b57cec5SDimitry Andricdefm WriteRotateCL : X86SchedWritePair; 1980b57cec5SDimitry Andric 1990b57cec5SDimitry Andric// Double shift instructions. 2000b57cec5SDimitry Andricdef WriteSHDrri : SchedWrite; 2010b57cec5SDimitry Andricdef WriteSHDrrcl : SchedWrite; 2020b57cec5SDimitry Andricdef WriteSHDmri : SchedWrite; 2030b57cec5SDimitry Andricdef WriteSHDmrcl : SchedWrite; 2040b57cec5SDimitry Andric 2050b57cec5SDimitry Andric// BMI1 BEXTR/BLS, BMI2 BZHI 2060b57cec5SDimitry Andricdefm WriteBEXTR : X86SchedWritePair; 2070b57cec5SDimitry Andricdefm WriteBLS : X86SchedWritePair; 2080b57cec5SDimitry Andricdefm WriteBZHI : X86SchedWritePair; 2090b57cec5SDimitry Andric 2100b57cec5SDimitry Andric// Idioms that clear a register, like xorps %xmm0, %xmm0. 2110b57cec5SDimitry Andric// These can often bypass execution ports completely. 2120b57cec5SDimitry Andricdef WriteZero : SchedWrite; 2130b57cec5SDimitry Andric 2140b57cec5SDimitry Andric// Branches don't produce values, so they have no latency, but they still 2150b57cec5SDimitry Andric// consume resources. Indirect branches can fold loads. 2160b57cec5SDimitry Andricdefm WriteJump : X86SchedWritePair; 2170b57cec5SDimitry Andric 2180b57cec5SDimitry Andric// Floating point. This covers both scalar and vector operations. 2190b57cec5SDimitry Andricdef WriteFLD0 : SchedWrite; 2200b57cec5SDimitry Andricdef WriteFLD1 : SchedWrite; 2210b57cec5SDimitry Andricdef WriteFLDC : SchedWrite; 2220b57cec5SDimitry Andricdef WriteFLoad : SchedWrite; 2230b57cec5SDimitry Andricdef WriteFLoadX : SchedWrite; 2240b57cec5SDimitry Andricdef WriteFLoadY : SchedWrite; 2250b57cec5SDimitry Andricdef WriteFMaskedLoad : SchedWrite; 2260b57cec5SDimitry Andricdef WriteFMaskedLoadY : SchedWrite; 2270b57cec5SDimitry Andricdef WriteFStore : SchedWrite; 2280b57cec5SDimitry Andricdef WriteFStoreX : SchedWrite; 2290b57cec5SDimitry Andricdef WriteFStoreY : SchedWrite; 2300b57cec5SDimitry Andricdef WriteFStoreNT : SchedWrite; 2310b57cec5SDimitry Andricdef WriteFStoreNTX : SchedWrite; 2320b57cec5SDimitry Andricdef WriteFStoreNTY : SchedWrite; 2338bcb0991SDimitry Andric 2348bcb0991SDimitry Andricdef WriteFMaskedStore32 : SchedWrite; 2358bcb0991SDimitry Andricdef WriteFMaskedStore64 : SchedWrite; 2368bcb0991SDimitry Andricdef WriteFMaskedStore32Y : SchedWrite; 2378bcb0991SDimitry Andricdef WriteFMaskedStore64Y : SchedWrite; 2388bcb0991SDimitry Andric 2390b57cec5SDimitry Andricdef WriteFMove : SchedWrite; 2400b57cec5SDimitry Andricdef WriteFMoveX : SchedWrite; 2410b57cec5SDimitry Andricdef WriteFMoveY : SchedWrite; 24204eeddc0SDimitry Andricdef WriteFMoveZ : SchedWrite; 2430b57cec5SDimitry Andric 2440b57cec5SDimitry Andricdefm WriteFAdd : X86SchedWritePair<ReadAfterVecLd>; // Floating point add/sub. 2450b57cec5SDimitry Andricdefm WriteFAddX : X86SchedWritePair<ReadAfterVecXLd>; // Floating point add/sub (XMM). 2460b57cec5SDimitry Andricdefm WriteFAddY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point add/sub (YMM). 2470b57cec5SDimitry Andricdefm WriteFAddZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point add/sub (ZMM). 2480b57cec5SDimitry Andricdefm WriteFAdd64 : X86SchedWritePair<ReadAfterVecLd>; // Floating point double add/sub. 2490b57cec5SDimitry Andricdefm WriteFAdd64X : X86SchedWritePair<ReadAfterVecXLd>; // Floating point double add/sub (XMM). 2500b57cec5SDimitry Andricdefm WriteFAdd64Y : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double add/sub (YMM). 2510b57cec5SDimitry Andricdefm WriteFAdd64Z : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double add/sub (ZMM). 2520b57cec5SDimitry Andricdefm WriteFCmp : X86SchedWritePair<ReadAfterVecLd>; // Floating point compare. 2530b57cec5SDimitry Andricdefm WriteFCmpX : X86SchedWritePair<ReadAfterVecXLd>; // Floating point compare (XMM). 2540b57cec5SDimitry Andricdefm WriteFCmpY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point compare (YMM). 2550b57cec5SDimitry Andricdefm WriteFCmpZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point compare (ZMM). 2560b57cec5SDimitry Andricdefm WriteFCmp64 : X86SchedWritePair<ReadAfterVecLd>; // Floating point double compare. 2570b57cec5SDimitry Andricdefm WriteFCmp64X : X86SchedWritePair<ReadAfterVecXLd>; // Floating point double compare (XMM). 2580b57cec5SDimitry Andricdefm WriteFCmp64Y : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double compare (YMM). 2590b57cec5SDimitry Andricdefm WriteFCmp64Z : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double compare (ZMM). 2605ffd83dbSDimitry Andricdefm WriteFCom : X86SchedWritePair<ReadAfterVecLd>; // Floating point compare to flags (X87). 2615ffd83dbSDimitry Andricdefm WriteFComX : X86SchedWritePair<ReadAfterVecLd>; // Floating point compare to flags (SSE). 2620b57cec5SDimitry Andricdefm WriteFMul : X86SchedWritePair<ReadAfterVecLd>; // Floating point multiplication. 2630b57cec5SDimitry Andricdefm WriteFMulX : X86SchedWritePair<ReadAfterVecXLd>; // Floating point multiplication (XMM). 2640b57cec5SDimitry Andricdefm WriteFMulY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point multiplication (YMM). 2650b57cec5SDimitry Andricdefm WriteFMulZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point multiplication (YMM). 2660b57cec5SDimitry Andricdefm WriteFMul64 : X86SchedWritePair<ReadAfterVecLd>; // Floating point double multiplication. 2670b57cec5SDimitry Andricdefm WriteFMul64X : X86SchedWritePair<ReadAfterVecXLd>; // Floating point double multiplication (XMM). 2680b57cec5SDimitry Andricdefm WriteFMul64Y : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double multiplication (YMM). 2690b57cec5SDimitry Andricdefm WriteFMul64Z : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double multiplication (ZMM). 2700b57cec5SDimitry Andricdefm WriteFDiv : X86SchedWritePair<ReadAfterVecLd>; // Floating point division. 2710b57cec5SDimitry Andricdefm WriteFDivX : X86SchedWritePair<ReadAfterVecXLd>; // Floating point division (XMM). 2720b57cec5SDimitry Andricdefm WriteFDivY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point division (YMM). 2730b57cec5SDimitry Andricdefm WriteFDivZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point division (ZMM). 2740b57cec5SDimitry Andricdefm WriteFDiv64 : X86SchedWritePair<ReadAfterVecLd>; // Floating point double division. 2750b57cec5SDimitry Andricdefm WriteFDiv64X : X86SchedWritePair<ReadAfterVecXLd>; // Floating point double division (XMM). 2760b57cec5SDimitry Andricdefm WriteFDiv64Y : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double division (YMM). 2770b57cec5SDimitry Andricdefm WriteFDiv64Z : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double division (ZMM). 2780b57cec5SDimitry Andricdefm WriteFSqrt : X86SchedWritePair<ReadAfterVecLd>; // Floating point square root. 2790b57cec5SDimitry Andricdefm WriteFSqrtX : X86SchedWritePair<ReadAfterVecXLd>; // Floating point square root (XMM). 2800b57cec5SDimitry Andricdefm WriteFSqrtY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point square root (YMM). 2810b57cec5SDimitry Andricdefm WriteFSqrtZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point square root (ZMM). 2820b57cec5SDimitry Andricdefm WriteFSqrt64 : X86SchedWritePair<ReadAfterVecLd>; // Floating point double square root. 2830b57cec5SDimitry Andricdefm WriteFSqrt64X : X86SchedWritePair<ReadAfterVecXLd>; // Floating point double square root (XMM). 2840b57cec5SDimitry Andricdefm WriteFSqrt64Y : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double square root (YMM). 2850b57cec5SDimitry Andricdefm WriteFSqrt64Z : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double square root (ZMM). 2860b57cec5SDimitry Andricdefm WriteFSqrt80 : X86SchedWritePair<ReadAfterVecLd>; // Floating point long double square root. 2870b57cec5SDimitry Andricdefm WriteFRcp : X86SchedWritePair<ReadAfterVecLd>; // Floating point reciprocal estimate. 2880b57cec5SDimitry Andricdefm WriteFRcpX : X86SchedWritePair<ReadAfterVecXLd>; // Floating point reciprocal estimate (XMM). 2890b57cec5SDimitry Andricdefm WriteFRcpY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point reciprocal estimate (YMM). 2900b57cec5SDimitry Andricdefm WriteFRcpZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point reciprocal estimate (ZMM). 2910b57cec5SDimitry Andricdefm WriteFRsqrt : X86SchedWritePair<ReadAfterVecLd>; // Floating point reciprocal square root estimate. 2920b57cec5SDimitry Andricdefm WriteFRsqrtX: X86SchedWritePair<ReadAfterVecXLd>; // Floating point reciprocal square root estimate (XMM). 2930b57cec5SDimitry Andricdefm WriteFRsqrtY: X86SchedWritePair<ReadAfterVecYLd>; // Floating point reciprocal square root estimate (YMM). 2940b57cec5SDimitry Andricdefm WriteFRsqrtZ: X86SchedWritePair<ReadAfterVecYLd>; // Floating point reciprocal square root estimate (ZMM). 2950b57cec5SDimitry Andricdefm WriteFMA : X86SchedWritePair<ReadAfterVecLd>; // Fused Multiply Add. 2960b57cec5SDimitry Andricdefm WriteFMAX : X86SchedWritePair<ReadAfterVecXLd>; // Fused Multiply Add (XMM). 2970b57cec5SDimitry Andricdefm WriteFMAY : X86SchedWritePair<ReadAfterVecYLd>; // Fused Multiply Add (YMM). 2980b57cec5SDimitry Andricdefm WriteFMAZ : X86SchedWritePair<ReadAfterVecYLd>; // Fused Multiply Add (ZMM). 2990b57cec5SDimitry Andricdefm WriteDPPD : X86SchedWritePair<ReadAfterVecXLd>; // Floating point double dot product. 3000b57cec5SDimitry Andricdefm WriteDPPS : X86SchedWritePair<ReadAfterVecXLd>; // Floating point single dot product. 3010b57cec5SDimitry Andricdefm WriteDPPSY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point single dot product (YMM). 3020b57cec5SDimitry Andricdefm WriteFSign : X86SchedWritePair<ReadAfterVecLd>; // Floating point fabs/fchs. 3030b57cec5SDimitry Andricdefm WriteFRnd : X86SchedWritePair<ReadAfterVecXLd>; // Floating point rounding. 3040b57cec5SDimitry Andricdefm WriteFRndY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point rounding (YMM). 3050b57cec5SDimitry Andricdefm WriteFRndZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point rounding (ZMM). 3060b57cec5SDimitry Andricdefm WriteFLogic : X86SchedWritePair<ReadAfterVecXLd>; // Floating point and/or/xor logicals. 3070b57cec5SDimitry Andricdefm WriteFLogicY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point and/or/xor logicals (YMM). 3080b57cec5SDimitry Andricdefm WriteFLogicZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point and/or/xor logicals (ZMM). 3090b57cec5SDimitry Andricdefm WriteFTest : X86SchedWritePair<ReadAfterVecXLd>; // Floating point TEST instructions. 3100b57cec5SDimitry Andricdefm WriteFTestY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point TEST instructions (YMM). 3110b57cec5SDimitry Andricdefm WriteFTestZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point TEST instructions (ZMM). 3120b57cec5SDimitry Andricdefm WriteFShuffle : X86SchedWritePair<ReadAfterVecXLd>; // Floating point vector shuffles. 3130b57cec5SDimitry Andricdefm WriteFShuffleY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point vector shuffles (YMM). 3140b57cec5SDimitry Andricdefm WriteFShuffleZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point vector shuffles (ZMM). 3150b57cec5SDimitry Andricdefm WriteFVarShuffle : X86SchedWritePair<ReadAfterVecXLd>; // Floating point vector variable shuffles. 3160b57cec5SDimitry Andricdefm WriteFVarShuffleY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point vector variable shuffles (YMM). 3170b57cec5SDimitry Andricdefm WriteFVarShuffleZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point vector variable shuffles (ZMM). 3180b57cec5SDimitry Andricdefm WriteFBlend : X86SchedWritePair<ReadAfterVecXLd>; // Floating point vector blends. 3190b57cec5SDimitry Andricdefm WriteFBlendY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point vector blends (YMM). 3200b57cec5SDimitry Andricdefm WriteFBlendZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point vector blends (ZMM). 3210b57cec5SDimitry Andricdefm WriteFVarBlend : X86SchedWritePair<ReadAfterVecXLd>; // Fp vector variable blends. 3220b57cec5SDimitry Andricdefm WriteFVarBlendY : X86SchedWritePair<ReadAfterVecYLd>; // Fp vector variable blends (YMM). 3230b57cec5SDimitry Andricdefm WriteFVarBlendZ : X86SchedWritePair<ReadAfterVecYLd>; // Fp vector variable blends (YMZMM). 3240b57cec5SDimitry Andric 3250b57cec5SDimitry Andric// FMA Scheduling helper class. 3260b57cec5SDimitry Andricclass FMASC { X86FoldableSchedWrite Sched = WriteFAdd; } 3270b57cec5SDimitry Andric 3280b57cec5SDimitry Andric// Horizontal Add/Sub (float and integer) 3290b57cec5SDimitry Andricdefm WriteFHAdd : X86SchedWritePair<ReadAfterVecXLd>; 3300b57cec5SDimitry Andricdefm WriteFHAddY : X86SchedWritePair<ReadAfterVecYLd>; 3310b57cec5SDimitry Andricdefm WriteFHAddZ : X86SchedWritePair<ReadAfterVecYLd>; 3320b57cec5SDimitry Andricdefm WritePHAdd : X86SchedWritePair<ReadAfterVecLd>; 3330b57cec5SDimitry Andricdefm WritePHAddX : X86SchedWritePair<ReadAfterVecXLd>; 3340b57cec5SDimitry Andricdefm WritePHAddY : X86SchedWritePair<ReadAfterVecYLd>; 3350b57cec5SDimitry Andricdefm WritePHAddZ : X86SchedWritePair<ReadAfterVecYLd>; 3360b57cec5SDimitry Andric 3370b57cec5SDimitry Andric// Vector integer operations. 3380b57cec5SDimitry Andricdef WriteVecLoad : SchedWrite; 3390b57cec5SDimitry Andricdef WriteVecLoadX : SchedWrite; 3400b57cec5SDimitry Andricdef WriteVecLoadY : SchedWrite; 3410b57cec5SDimitry Andricdef WriteVecLoadNT : SchedWrite; 3420b57cec5SDimitry Andricdef WriteVecLoadNTY : SchedWrite; 3430b57cec5SDimitry Andricdef WriteVecMaskedLoad : SchedWrite; 3440b57cec5SDimitry Andricdef WriteVecMaskedLoadY : SchedWrite; 3450b57cec5SDimitry Andricdef WriteVecStore : SchedWrite; 3460b57cec5SDimitry Andricdef WriteVecStoreX : SchedWrite; 3470b57cec5SDimitry Andricdef WriteVecStoreY : SchedWrite; 3480b57cec5SDimitry Andricdef WriteVecStoreNT : SchedWrite; 3490b57cec5SDimitry Andricdef WriteVecStoreNTY : SchedWrite; 3505ffd83dbSDimitry Andricdef WriteVecMaskedStore32 : SchedWrite; 3515ffd83dbSDimitry Andricdef WriteVecMaskedStore64 : SchedWrite; 3525ffd83dbSDimitry Andricdef WriteVecMaskedStore32Y : SchedWrite; 3535ffd83dbSDimitry Andricdef WriteVecMaskedStore64Y : SchedWrite; 3540b57cec5SDimitry Andricdef WriteVecMove : SchedWrite; 3550b57cec5SDimitry Andricdef WriteVecMoveX : SchedWrite; 3560b57cec5SDimitry Andricdef WriteVecMoveY : SchedWrite; 35704eeddc0SDimitry Andricdef WriteVecMoveZ : SchedWrite; 3580b57cec5SDimitry Andricdef WriteVecMoveToGpr : SchedWrite; 3590b57cec5SDimitry Andricdef WriteVecMoveFromGpr : SchedWrite; 3600b57cec5SDimitry Andric 3610b57cec5SDimitry Andricdefm WriteVecALU : X86SchedWritePair<ReadAfterVecLd>; // Vector integer ALU op, no logicals. 3620b57cec5SDimitry Andricdefm WriteVecALUX : X86SchedWritePair<ReadAfterVecXLd>; // Vector integer ALU op, no logicals (XMM). 3630b57cec5SDimitry Andricdefm WriteVecALUY : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer ALU op, no logicals (YMM). 3640b57cec5SDimitry Andricdefm WriteVecALUZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer ALU op, no logicals (ZMM). 3650b57cec5SDimitry Andricdefm WriteVecLogic : X86SchedWritePair<ReadAfterVecLd>; // Vector integer and/or/xor logicals. 3660b57cec5SDimitry Andricdefm WriteVecLogicX : X86SchedWritePair<ReadAfterVecXLd>; // Vector integer and/or/xor logicals (XMM). 3670b57cec5SDimitry Andricdefm WriteVecLogicY : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer and/or/xor logicals (YMM). 3680b57cec5SDimitry Andricdefm WriteVecLogicZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer and/or/xor logicals (ZMM). 3690b57cec5SDimitry Andricdefm WriteVecTest : X86SchedWritePair<ReadAfterVecXLd>; // Vector integer TEST instructions. 3700b57cec5SDimitry Andricdefm WriteVecTestY : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer TEST instructions (YMM). 3710b57cec5SDimitry Andricdefm WriteVecTestZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer TEST instructions (ZMM). 3720b57cec5SDimitry Andricdefm WriteVecShift : X86SchedWritePair<ReadAfterVecLd>; // Vector integer shifts (default). 3730b57cec5SDimitry Andricdefm WriteVecShiftX : X86SchedWritePair<ReadAfterVecXLd>; // Vector integer shifts (XMM). 3740b57cec5SDimitry Andricdefm WriteVecShiftY : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer shifts (YMM). 3750b57cec5SDimitry Andricdefm WriteVecShiftZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer shifts (ZMM). 3760b57cec5SDimitry Andricdefm WriteVecShiftImm : X86SchedWritePair<ReadAfterVecLd>; // Vector integer immediate shifts (default). 3770b57cec5SDimitry Andricdefm WriteVecShiftImmX: X86SchedWritePair<ReadAfterVecXLd>; // Vector integer immediate shifts (XMM). 3780b57cec5SDimitry Andricdefm WriteVecShiftImmY: X86SchedWritePair<ReadAfterVecYLd>; // Vector integer immediate shifts (YMM). 3790b57cec5SDimitry Andricdefm WriteVecShiftImmZ: X86SchedWritePair<ReadAfterVecYLd>; // Vector integer immediate shifts (ZMM). 3800b57cec5SDimitry Andricdefm WriteVecIMul : X86SchedWritePair<ReadAfterVecLd>; // Vector integer multiply (default). 3810b57cec5SDimitry Andricdefm WriteVecIMulX : X86SchedWritePair<ReadAfterVecXLd>; // Vector integer multiply (XMM). 3820b57cec5SDimitry Andricdefm WriteVecIMulY : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer multiply (YMM). 3830b57cec5SDimitry Andricdefm WriteVecIMulZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer multiply (ZMM). 3840b57cec5SDimitry Andricdefm WritePMULLD : X86SchedWritePair<ReadAfterVecXLd>; // Vector PMULLD. 3850b57cec5SDimitry Andricdefm WritePMULLDY : X86SchedWritePair<ReadAfterVecYLd>; // Vector PMULLD (YMM). 3860b57cec5SDimitry Andricdefm WritePMULLDZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector PMULLD (ZMM). 3870b57cec5SDimitry Andricdefm WriteShuffle : X86SchedWritePair<ReadAfterVecLd>; // Vector shuffles. 3880b57cec5SDimitry Andricdefm WriteShuffleX : X86SchedWritePair<ReadAfterVecXLd>; // Vector shuffles (XMM). 3890b57cec5SDimitry Andricdefm WriteShuffleY : X86SchedWritePair<ReadAfterVecYLd>; // Vector shuffles (YMM). 3900b57cec5SDimitry Andricdefm WriteShuffleZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector shuffles (ZMM). 3910b57cec5SDimitry Andricdefm WriteVarShuffle : X86SchedWritePair<ReadAfterVecLd>; // Vector variable shuffles. 3920b57cec5SDimitry Andricdefm WriteVarShuffleX : X86SchedWritePair<ReadAfterVecXLd>; // Vector variable shuffles (XMM). 3930b57cec5SDimitry Andricdefm WriteVarShuffleY : X86SchedWritePair<ReadAfterVecYLd>; // Vector variable shuffles (YMM). 3940b57cec5SDimitry Andricdefm WriteVarShuffleZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector variable shuffles (ZMM). 3950b57cec5SDimitry Andricdefm WriteBlend : X86SchedWritePair<ReadAfterVecXLd>; // Vector blends. 3960b57cec5SDimitry Andricdefm WriteBlendY : X86SchedWritePair<ReadAfterVecYLd>; // Vector blends (YMM). 3970b57cec5SDimitry Andricdefm WriteBlendZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector blends (ZMM). 3980b57cec5SDimitry Andricdefm WriteVarBlend : X86SchedWritePair<ReadAfterVecXLd>; // Vector variable blends. 3990b57cec5SDimitry Andricdefm WriteVarBlendY : X86SchedWritePair<ReadAfterVecYLd>; // Vector variable blends (YMM). 4000b57cec5SDimitry Andricdefm WriteVarBlendZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector variable blends (ZMM). 4010b57cec5SDimitry Andricdefm WritePSADBW : X86SchedWritePair<ReadAfterVecLd>; // Vector PSADBW. 4020b57cec5SDimitry Andricdefm WritePSADBWX : X86SchedWritePair<ReadAfterVecXLd>; // Vector PSADBW (XMM). 4030b57cec5SDimitry Andricdefm WritePSADBWY : X86SchedWritePair<ReadAfterVecYLd>; // Vector PSADBW (YMM). 4040b57cec5SDimitry Andricdefm WritePSADBWZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector PSADBW (ZMM). 4050b57cec5SDimitry Andricdefm WriteMPSAD : X86SchedWritePair<ReadAfterVecXLd>; // Vector MPSAD. 4060b57cec5SDimitry Andricdefm WriteMPSADY : X86SchedWritePair<ReadAfterVecYLd>; // Vector MPSAD (YMM). 4070b57cec5SDimitry Andricdefm WriteMPSADZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector MPSAD (ZMM). 4080b57cec5SDimitry Andricdefm WritePHMINPOS : X86SchedWritePair<ReadAfterVecXLd>; // Vector PHMINPOS. 4090b57cec5SDimitry Andric 4100b57cec5SDimitry Andric// Vector insert/extract operations. 4110b57cec5SDimitry Andricdefm WriteVecInsert : X86SchedWritePair; // Insert gpr to vector element. 4120b57cec5SDimitry Andricdef WriteVecExtract : SchedWrite; // Extract vector element to gpr. 4130b57cec5SDimitry Andricdef WriteVecExtractSt : SchedWrite; // Extract vector element and store. 4140b57cec5SDimitry Andric 4150b57cec5SDimitry Andric// MOVMSK operations. 4160b57cec5SDimitry Andricdef WriteFMOVMSK : SchedWrite; 4170b57cec5SDimitry Andricdef WriteVecMOVMSK : SchedWrite; 4180b57cec5SDimitry Andricdef WriteVecMOVMSKY : SchedWrite; 4190b57cec5SDimitry Andricdef WriteMMXMOVMSK : SchedWrite; 4200b57cec5SDimitry Andric 4210b57cec5SDimitry Andric// Conversion between integer and float. 4220b57cec5SDimitry Andricdefm WriteCvtSD2I : X86SchedWritePair<ReadAfterVecLd>; // Double -> Integer. 4230b57cec5SDimitry Andricdefm WriteCvtPD2I : X86SchedWritePair<ReadAfterVecXLd>; // Double -> Integer (XMM). 4240b57cec5SDimitry Andricdefm WriteCvtPD2IY : X86SchedWritePair<ReadAfterVecYLd>; // Double -> Integer (YMM). 4250b57cec5SDimitry Andricdefm WriteCvtPD2IZ : X86SchedWritePair<ReadAfterVecYLd>; // Double -> Integer (ZMM). 4260b57cec5SDimitry Andric 4270b57cec5SDimitry Andricdefm WriteCvtSS2I : X86SchedWritePair<ReadAfterVecLd>; // Float -> Integer. 4280b57cec5SDimitry Andricdefm WriteCvtPS2I : X86SchedWritePair<ReadAfterVecXLd>; // Float -> Integer (XMM). 4290b57cec5SDimitry Andricdefm WriteCvtPS2IY : X86SchedWritePair<ReadAfterVecYLd>; // Float -> Integer (YMM). 4300b57cec5SDimitry Andricdefm WriteCvtPS2IZ : X86SchedWritePair<ReadAfterVecYLd>; // Float -> Integer (ZMM). 4310b57cec5SDimitry Andric 4320b57cec5SDimitry Andricdefm WriteCvtI2SD : X86SchedWritePair<ReadAfterVecLd>; // Integer -> Double. 4330b57cec5SDimitry Andricdefm WriteCvtI2PD : X86SchedWritePair<ReadAfterVecXLd>; // Integer -> Double (XMM). 4340b57cec5SDimitry Andricdefm WriteCvtI2PDY : X86SchedWritePair<ReadAfterVecYLd>; // Integer -> Double (YMM). 4350b57cec5SDimitry Andricdefm WriteCvtI2PDZ : X86SchedWritePair<ReadAfterVecYLd>; // Integer -> Double (ZMM). 4360b57cec5SDimitry Andric 4370b57cec5SDimitry Andricdefm WriteCvtI2SS : X86SchedWritePair<ReadAfterVecLd>; // Integer -> Float. 4380b57cec5SDimitry Andricdefm WriteCvtI2PS : X86SchedWritePair<ReadAfterVecXLd>; // Integer -> Float (XMM). 4390b57cec5SDimitry Andricdefm WriteCvtI2PSY : X86SchedWritePair<ReadAfterVecYLd>; // Integer -> Float (YMM). 4400b57cec5SDimitry Andricdefm WriteCvtI2PSZ : X86SchedWritePair<ReadAfterVecYLd>; // Integer -> Float (ZMM). 4410b57cec5SDimitry Andric 4420b57cec5SDimitry Andricdefm WriteCvtSS2SD : X86SchedWritePair<ReadAfterVecLd>; // Float -> Double size conversion. 4430b57cec5SDimitry Andricdefm WriteCvtPS2PD : X86SchedWritePair<ReadAfterVecXLd>; // Float -> Double size conversion (XMM). 4440b57cec5SDimitry Andricdefm WriteCvtPS2PDY : X86SchedWritePair<ReadAfterVecYLd>; // Float -> Double size conversion (YMM). 4450b57cec5SDimitry Andricdefm WriteCvtPS2PDZ : X86SchedWritePair<ReadAfterVecYLd>; // Float -> Double size conversion (ZMM). 4460b57cec5SDimitry Andric 4470b57cec5SDimitry Andricdefm WriteCvtSD2SS : X86SchedWritePair<ReadAfterVecLd>; // Double -> Float size conversion. 4480b57cec5SDimitry Andricdefm WriteCvtPD2PS : X86SchedWritePair<ReadAfterVecXLd>; // Double -> Float size conversion (XMM). 4490b57cec5SDimitry Andricdefm WriteCvtPD2PSY : X86SchedWritePair<ReadAfterVecYLd>; // Double -> Float size conversion (YMM). 4500b57cec5SDimitry Andricdefm WriteCvtPD2PSZ : X86SchedWritePair<ReadAfterVecYLd>; // Double -> Float size conversion (ZMM). 4510b57cec5SDimitry Andric 4520b57cec5SDimitry Andricdefm WriteCvtPH2PS : X86SchedWritePair<ReadAfterVecXLd>; // Half -> Float size conversion. 4530b57cec5SDimitry Andricdefm WriteCvtPH2PSY : X86SchedWritePair<ReadAfterVecYLd>; // Half -> Float size conversion (YMM). 4540b57cec5SDimitry Andricdefm WriteCvtPH2PSZ : X86SchedWritePair<ReadAfterVecYLd>; // Half -> Float size conversion (ZMM). 4550b57cec5SDimitry Andric 4560b57cec5SDimitry Andricdef WriteCvtPS2PH : SchedWrite; // // Float -> Half size conversion. 4570b57cec5SDimitry Andricdef WriteCvtPS2PHY : SchedWrite; // // Float -> Half size conversion (YMM). 4580b57cec5SDimitry Andricdef WriteCvtPS2PHZ : SchedWrite; // // Float -> Half size conversion (ZMM). 4590b57cec5SDimitry Andricdef WriteCvtPS2PHSt : SchedWrite; // // Float -> Half + store size conversion. 4600b57cec5SDimitry Andricdef WriteCvtPS2PHYSt : SchedWrite; // // Float -> Half + store size conversion (YMM). 4610b57cec5SDimitry Andricdef WriteCvtPS2PHZSt : SchedWrite; // // Float -> Half + store size conversion (ZMM). 4620b57cec5SDimitry Andric 4630b57cec5SDimitry Andric// CRC32 instruction. 4640b57cec5SDimitry Andricdefm WriteCRC32 : X86SchedWritePair<ReadAfterLd>; 4650b57cec5SDimitry Andric 4660b57cec5SDimitry Andric// Strings instructions. 4670b57cec5SDimitry Andric// Packed Compare Implicit Length Strings, Return Mask 4680b57cec5SDimitry Andricdefm WritePCmpIStrM : X86SchedWritePair<ReadAfterVecXLd>; 4690b57cec5SDimitry Andric// Packed Compare Explicit Length Strings, Return Mask 4700b57cec5SDimitry Andricdefm WritePCmpEStrM : X86SchedWritePair<ReadAfterVecXLd>; 4710b57cec5SDimitry Andric// Packed Compare Implicit Length Strings, Return Index 4720b57cec5SDimitry Andricdefm WritePCmpIStrI : X86SchedWritePair<ReadAfterVecXLd>; 4730b57cec5SDimitry Andric// Packed Compare Explicit Length Strings, Return Index 4740b57cec5SDimitry Andricdefm WritePCmpEStrI : X86SchedWritePair<ReadAfterVecXLd>; 4750b57cec5SDimitry Andric 4760b57cec5SDimitry Andric// AES instructions. 4770b57cec5SDimitry Andricdefm WriteAESDecEnc : X86SchedWritePair<ReadAfterVecXLd>; // Decryption, encryption. 4780b57cec5SDimitry Andricdefm WriteAESIMC : X86SchedWritePair<ReadAfterVecXLd>; // InvMixColumn. 4790b57cec5SDimitry Andricdefm WriteAESKeyGen : X86SchedWritePair<ReadAfterVecXLd>; // Key Generation. 4800b57cec5SDimitry Andric 4810b57cec5SDimitry Andric// Carry-less multiplication instructions. 4820b57cec5SDimitry Andricdefm WriteCLMul : X86SchedWritePair<ReadAfterVecXLd>; 4830b57cec5SDimitry Andric 4840b57cec5SDimitry Andric// EMMS/FEMMS 4850b57cec5SDimitry Andricdef WriteEMMS : SchedWrite; 4860b57cec5SDimitry Andric 4870b57cec5SDimitry Andric// Load/store MXCSR 4880b57cec5SDimitry Andricdef WriteLDMXCSR : SchedWrite; 4890b57cec5SDimitry Andricdef WriteSTMXCSR : SchedWrite; 4900b57cec5SDimitry Andric 4910b57cec5SDimitry Andric// Catch-all for expensive system instructions. 4920b57cec5SDimitry Andricdef WriteSystem : SchedWrite; 4930b57cec5SDimitry Andric 4940b57cec5SDimitry Andric// AVX2. 4950b57cec5SDimitry Andricdefm WriteFShuffle256 : X86SchedWritePair<ReadAfterVecYLd>; // Fp 256-bit width vector shuffles. 4960b57cec5SDimitry Andricdefm WriteFVarShuffle256 : X86SchedWritePair<ReadAfterVecYLd>; // Fp 256-bit width variable shuffles. 4970b57cec5SDimitry Andricdefm WriteShuffle256 : X86SchedWritePair<ReadAfterVecYLd>; // 256-bit width vector shuffles. 498fe6060f1SDimitry Andricdefm WriteVPMOV256 : X86SchedWritePair<ReadAfterVecYLd>; // 256-bit width packed vector width-changing move. 4990b57cec5SDimitry Andricdefm WriteVarShuffle256 : X86SchedWritePair<ReadAfterVecYLd>; // 256-bit width vector variable shuffles. 5000b57cec5SDimitry Andricdefm WriteVarVecShift : X86SchedWritePair<ReadAfterVecXLd>; // Variable vector shifts. 5010b57cec5SDimitry Andricdefm WriteVarVecShiftY : X86SchedWritePair<ReadAfterVecYLd>; // Variable vector shifts (YMM). 5020b57cec5SDimitry Andricdefm WriteVarVecShiftZ : X86SchedWritePair<ReadAfterVecYLd>; // Variable vector shifts (ZMM). 5030b57cec5SDimitry Andric 5040b57cec5SDimitry Andric// Old microcoded instructions that nobody use. 5050b57cec5SDimitry Andricdef WriteMicrocoded : SchedWrite; 5060b57cec5SDimitry Andric 5070b57cec5SDimitry Andric// Fence instructions. 5080b57cec5SDimitry Andricdef WriteFence : SchedWrite; 5090b57cec5SDimitry Andric 5100b57cec5SDimitry Andric// Nop, not very useful expect it provides a model for nops! 5110b57cec5SDimitry Andricdef WriteNop : SchedWrite; 5120b57cec5SDimitry Andric 5130b57cec5SDimitry Andric// Move/Load/Store wrappers. 5140b57cec5SDimitry Andricdef WriteFMoveLS 5150b57cec5SDimitry Andric : X86SchedWriteMoveLS<WriteFMove, WriteFLoad, WriteFStore>; 5160b57cec5SDimitry Andricdef WriteFMoveLSX 5170b57cec5SDimitry Andric : X86SchedWriteMoveLS<WriteFMoveX, WriteFLoadX, WriteFStoreX>; 5180b57cec5SDimitry Andricdef WriteFMoveLSY 5190b57cec5SDimitry Andric : X86SchedWriteMoveLS<WriteFMoveY, WriteFLoadY, WriteFStoreY>; 52004eeddc0SDimitry Andricdef WriteFMoveLSZ 52104eeddc0SDimitry Andric : X86SchedWriteMoveLS<WriteFMoveZ, WriteFLoadY, WriteFStoreY>; 5220b57cec5SDimitry Andricdef SchedWriteFMoveLS 5230b57cec5SDimitry Andric : X86SchedWriteMoveLSWidths<WriteFMoveLS, WriteFMoveLSX, 52404eeddc0SDimitry Andric WriteFMoveLSY, WriteFMoveLSZ>; 5250b57cec5SDimitry Andric 5260b57cec5SDimitry Andricdef WriteFMoveLSNT 5270b57cec5SDimitry Andric : X86SchedWriteMoveLS<WriteFMove, WriteFLoad, WriteFStoreNT>; 5280b57cec5SDimitry Andricdef WriteFMoveLSNTX 5290b57cec5SDimitry Andric : X86SchedWriteMoveLS<WriteFMove, WriteFLoad, WriteFStoreNTX>; 5300b57cec5SDimitry Andricdef WriteFMoveLSNTY 5310b57cec5SDimitry Andric : X86SchedWriteMoveLS<WriteFMoveY, WriteFLoadY, WriteFStoreNTY>; 5320b57cec5SDimitry Andricdef SchedWriteFMoveLSNT 5330b57cec5SDimitry Andric : X86SchedWriteMoveLSWidths<WriteFMoveLSNT, WriteFMoveLSNTX, 5340b57cec5SDimitry Andric WriteFMoveLSNTY, WriteFMoveLSNTY>; 5350b57cec5SDimitry Andric 5360b57cec5SDimitry Andricdef WriteVecMoveLS 5370b57cec5SDimitry Andric : X86SchedWriteMoveLS<WriteVecMove, WriteVecLoad, WriteVecStore>; 5380b57cec5SDimitry Andricdef WriteVecMoveLSX 5390b57cec5SDimitry Andric : X86SchedWriteMoveLS<WriteVecMoveX, WriteVecLoadX, WriteVecStoreX>; 5400b57cec5SDimitry Andricdef WriteVecMoveLSY 5410b57cec5SDimitry Andric : X86SchedWriteMoveLS<WriteVecMoveY, WriteVecLoadY, WriteVecStoreY>; 54204eeddc0SDimitry Andricdef WriteVecMoveLSZ 54304eeddc0SDimitry Andric : X86SchedWriteMoveLS<WriteVecMoveZ, WriteVecLoadY, WriteVecStoreY>; 5440b57cec5SDimitry Andricdef SchedWriteVecMoveLS 5450b57cec5SDimitry Andric : X86SchedWriteMoveLSWidths<WriteVecMoveLS, WriteVecMoveLSX, 54604eeddc0SDimitry Andric WriteVecMoveLSY, WriteVecMoveLSZ>; 5470b57cec5SDimitry Andric 5480b57cec5SDimitry Andricdef WriteVecMoveLSNT 5490b57cec5SDimitry Andric : X86SchedWriteMoveLS<WriteVecMove, WriteVecLoadNT, WriteVecStoreNT>; 5500b57cec5SDimitry Andricdef WriteVecMoveLSNTX 5510b57cec5SDimitry Andric : X86SchedWriteMoveLS<WriteVecMoveX, WriteVecLoadNT, WriteVecStoreNT>; 5520b57cec5SDimitry Andricdef WriteVecMoveLSNTY 5530b57cec5SDimitry Andric : X86SchedWriteMoveLS<WriteVecMoveY, WriteVecLoadNTY, WriteVecStoreNTY>; 5540b57cec5SDimitry Andricdef SchedWriteVecMoveLSNT 5550b57cec5SDimitry Andric : X86SchedWriteMoveLSWidths<WriteVecMoveLSNT, WriteVecMoveLSNTX, 5560b57cec5SDimitry Andric WriteVecMoveLSNTY, WriteVecMoveLSNTY>; 5570b57cec5SDimitry Andric 5588bcb0991SDimitry Andric// Conditional SIMD Packed Loads and Stores wrappers. 5598bcb0991SDimitry Andricdef WriteFMaskMove32 5608bcb0991SDimitry Andric : X86SchedWriteMaskMove<WriteFMaskedLoad, WriteFMaskedStore32>; 5618bcb0991SDimitry Andricdef WriteFMaskMove64 5628bcb0991SDimitry Andric : X86SchedWriteMaskMove<WriteFMaskedLoad, WriteFMaskedStore64>; 5638bcb0991SDimitry Andricdef WriteFMaskMove32Y 5648bcb0991SDimitry Andric : X86SchedWriteMaskMove<WriteFMaskedLoadY, WriteFMaskedStore32Y>; 5658bcb0991SDimitry Andricdef WriteFMaskMove64Y 5668bcb0991SDimitry Andric : X86SchedWriteMaskMove<WriteFMaskedLoadY, WriteFMaskedStore64Y>; 5675ffd83dbSDimitry Andricdef WriteVecMaskMove32 5685ffd83dbSDimitry Andric : X86SchedWriteMaskMove<WriteVecMaskedLoad, WriteVecMaskedStore32>; 5695ffd83dbSDimitry Andricdef WriteVecMaskMove64 5705ffd83dbSDimitry Andric : X86SchedWriteMaskMove<WriteVecMaskedLoad, WriteVecMaskedStore64>; 5715ffd83dbSDimitry Andricdef WriteVecMaskMove32Y 5725ffd83dbSDimitry Andric : X86SchedWriteMaskMove<WriteVecMaskedLoadY, WriteVecMaskedStore32Y>; 5735ffd83dbSDimitry Andricdef WriteVecMaskMove64Y 5745ffd83dbSDimitry Andric : X86SchedWriteMaskMove<WriteVecMaskedLoadY, WriteVecMaskedStore64Y>; 5758bcb0991SDimitry Andric 5760b57cec5SDimitry Andric// Vector width wrappers. 5770b57cec5SDimitry Andricdef SchedWriteFAdd 5780b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFAdd, WriteFAddX, WriteFAddY, WriteFAddZ>; 5790b57cec5SDimitry Andricdef SchedWriteFAdd64 5800b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFAdd64, WriteFAdd64X, WriteFAdd64Y, WriteFAdd64Z>; 5810b57cec5SDimitry Andricdef SchedWriteFHAdd 5820b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFHAdd, WriteFHAdd, WriteFHAddY, WriteFHAddZ>; 5830b57cec5SDimitry Andricdef SchedWriteFCmp 5840b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFCmp, WriteFCmpX, WriteFCmpY, WriteFCmpZ>; 5850b57cec5SDimitry Andricdef SchedWriteFCmp64 5860b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFCmp64, WriteFCmp64X, WriteFCmp64Y, WriteFCmp64Z>; 5870b57cec5SDimitry Andricdef SchedWriteFMul 5880b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFMul, WriteFMulX, WriteFMulY, WriteFMulZ>; 5890b57cec5SDimitry Andricdef SchedWriteFMul64 5900b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFMul64, WriteFMul64X, WriteFMul64Y, WriteFMul64Z>; 5910b57cec5SDimitry Andricdef SchedWriteFMA 5920b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFMA, WriteFMAX, WriteFMAY, WriteFMAZ>; 5930b57cec5SDimitry Andricdef SchedWriteDPPD 5940b57cec5SDimitry Andric : X86SchedWriteWidths<WriteDPPD, WriteDPPD, WriteDPPD, WriteDPPD>; 5950b57cec5SDimitry Andricdef SchedWriteDPPS 596bdd1243dSDimitry Andric : X86SchedWriteWidths<WriteDPPS, WriteDPPS, WriteDPPSY, WriteDPPSY>; 5970b57cec5SDimitry Andricdef SchedWriteFDiv 5980b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFDiv, WriteFDivX, WriteFDivY, WriteFDivZ>; 5990b57cec5SDimitry Andricdef SchedWriteFDiv64 6000b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFDiv64, WriteFDiv64X, WriteFDiv64Y, WriteFDiv64Z>; 6010b57cec5SDimitry Andricdef SchedWriteFSqrt 6020b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFSqrt, WriteFSqrtX, 6030b57cec5SDimitry Andric WriteFSqrtY, WriteFSqrtZ>; 6040b57cec5SDimitry Andricdef SchedWriteFSqrt64 6050b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFSqrt64, WriteFSqrt64X, 6060b57cec5SDimitry Andric WriteFSqrt64Y, WriteFSqrt64Z>; 6070b57cec5SDimitry Andricdef SchedWriteFRcp 6080b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFRcp, WriteFRcpX, WriteFRcpY, WriteFRcpZ>; 6090b57cec5SDimitry Andricdef SchedWriteFRsqrt 6100b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFRsqrt, WriteFRsqrtX, WriteFRsqrtY, WriteFRsqrtZ>; 6110b57cec5SDimitry Andricdef SchedWriteFRnd 6120b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFRnd, WriteFRnd, WriteFRndY, WriteFRndZ>; 6130b57cec5SDimitry Andricdef SchedWriteFLogic 6140b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFLogic, WriteFLogic, WriteFLogicY, WriteFLogicZ>; 6150b57cec5SDimitry Andricdef SchedWriteFTest 6160b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFTest, WriteFTest, WriteFTestY, WriteFTestZ>; 6170b57cec5SDimitry Andric 6180b57cec5SDimitry Andricdef SchedWriteFShuffle 6190b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFShuffle, WriteFShuffle, 6200b57cec5SDimitry Andric WriteFShuffleY, WriteFShuffleZ>; 6210b57cec5SDimitry Andricdef SchedWriteFVarShuffle 6220b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFVarShuffle, WriteFVarShuffle, 6230b57cec5SDimitry Andric WriteFVarShuffleY, WriteFVarShuffleZ>; 6240b57cec5SDimitry Andricdef SchedWriteFBlend 6250b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFBlend, WriteFBlend, WriteFBlendY, WriteFBlendZ>; 6260b57cec5SDimitry Andricdef SchedWriteFVarBlend 6270b57cec5SDimitry Andric : X86SchedWriteWidths<WriteFVarBlend, WriteFVarBlend, 6280b57cec5SDimitry Andric WriteFVarBlendY, WriteFVarBlendZ>; 6290b57cec5SDimitry Andric 6300b57cec5SDimitry Andricdef SchedWriteCvtDQ2PD 6310b57cec5SDimitry Andric : X86SchedWriteWidths<WriteCvtI2SD, WriteCvtI2PD, 6320b57cec5SDimitry Andric WriteCvtI2PDY, WriteCvtI2PDZ>; 6330b57cec5SDimitry Andricdef SchedWriteCvtDQ2PS 6340b57cec5SDimitry Andric : X86SchedWriteWidths<WriteCvtI2SS, WriteCvtI2PS, 6350b57cec5SDimitry Andric WriteCvtI2PSY, WriteCvtI2PSZ>; 6360b57cec5SDimitry Andricdef SchedWriteCvtPD2DQ 6370b57cec5SDimitry Andric : X86SchedWriteWidths<WriteCvtSD2I, WriteCvtPD2I, 6380b57cec5SDimitry Andric WriteCvtPD2IY, WriteCvtPD2IZ>; 6390b57cec5SDimitry Andricdef SchedWriteCvtPS2DQ 6400b57cec5SDimitry Andric : X86SchedWriteWidths<WriteCvtSS2I, WriteCvtPS2I, 6410b57cec5SDimitry Andric WriteCvtPS2IY, WriteCvtPS2IZ>; 6420b57cec5SDimitry Andricdef SchedWriteCvtPS2PD 6430b57cec5SDimitry Andric : X86SchedWriteWidths<WriteCvtSS2SD, WriteCvtPS2PD, 6440b57cec5SDimitry Andric WriteCvtPS2PDY, WriteCvtPS2PDZ>; 6450b57cec5SDimitry Andricdef SchedWriteCvtPD2PS 6460b57cec5SDimitry Andric : X86SchedWriteWidths<WriteCvtSD2SS, WriteCvtPD2PS, 6470b57cec5SDimitry Andric WriteCvtPD2PSY, WriteCvtPD2PSZ>; 6480b57cec5SDimitry Andric 6490b57cec5SDimitry Andricdef SchedWriteVecALU 6500b57cec5SDimitry Andric : X86SchedWriteWidths<WriteVecALU, WriteVecALUX, WriteVecALUY, WriteVecALUZ>; 6510b57cec5SDimitry Andricdef SchedWritePHAdd 6520b57cec5SDimitry Andric : X86SchedWriteWidths<WritePHAdd, WritePHAddX, WritePHAddY, WritePHAddZ>; 6530b57cec5SDimitry Andricdef SchedWriteVecLogic 6540b57cec5SDimitry Andric : X86SchedWriteWidths<WriteVecLogic, WriteVecLogicX, 6550b57cec5SDimitry Andric WriteVecLogicY, WriteVecLogicZ>; 6560b57cec5SDimitry Andricdef SchedWriteVecTest 6570b57cec5SDimitry Andric : X86SchedWriteWidths<WriteVecTest, WriteVecTest, 6580b57cec5SDimitry Andric WriteVecTestY, WriteVecTestZ>; 6590b57cec5SDimitry Andricdef SchedWriteVecShift 6600b57cec5SDimitry Andric : X86SchedWriteWidths<WriteVecShift, WriteVecShiftX, 6610b57cec5SDimitry Andric WriteVecShiftY, WriteVecShiftZ>; 6620b57cec5SDimitry Andricdef SchedWriteVecShiftImm 6630b57cec5SDimitry Andric : X86SchedWriteWidths<WriteVecShiftImm, WriteVecShiftImmX, 6640b57cec5SDimitry Andric WriteVecShiftImmY, WriteVecShiftImmZ>; 6650b57cec5SDimitry Andricdef SchedWriteVarVecShift 6660b57cec5SDimitry Andric : X86SchedWriteWidths<WriteVarVecShift, WriteVarVecShift, 6670b57cec5SDimitry Andric WriteVarVecShiftY, WriteVarVecShiftZ>; 6680b57cec5SDimitry Andricdef SchedWriteVecIMul 6690b57cec5SDimitry Andric : X86SchedWriteWidths<WriteVecIMul, WriteVecIMulX, 6700b57cec5SDimitry Andric WriteVecIMulY, WriteVecIMulZ>; 6710b57cec5SDimitry Andricdef SchedWritePMULLD 6720b57cec5SDimitry Andric : X86SchedWriteWidths<WritePMULLD, WritePMULLD, 6730b57cec5SDimitry Andric WritePMULLDY, WritePMULLDZ>; 6740b57cec5SDimitry Andricdef SchedWriteMPSAD 6750b57cec5SDimitry Andric : X86SchedWriteWidths<WriteMPSAD, WriteMPSAD, 6760b57cec5SDimitry Andric WriteMPSADY, WriteMPSADZ>; 6770b57cec5SDimitry Andricdef SchedWritePSADBW 6780b57cec5SDimitry Andric : X86SchedWriteWidths<WritePSADBW, WritePSADBWX, 6790b57cec5SDimitry Andric WritePSADBWY, WritePSADBWZ>; 6800b57cec5SDimitry Andric 681bdd1243dSDimitry Andricdef SchedWriteVecExtend 682bdd1243dSDimitry Andric : X86SchedWriteWidths<WriteShuffle, WriteShuffleX, 683bdd1243dSDimitry Andric WriteVPMOV256, WriteVPMOV256>; 684bdd1243dSDimitry Andricdef SchedWriteVecTruncate 685bdd1243dSDimitry Andric : X86SchedWriteWidths<WriteVPMOV256, WriteVPMOV256, 686bdd1243dSDimitry Andric WriteVPMOV256, WriteVPMOV256>; 6870b57cec5SDimitry Andricdef SchedWriteShuffle 6880b57cec5SDimitry Andric : X86SchedWriteWidths<WriteShuffle, WriteShuffleX, 6890b57cec5SDimitry Andric WriteShuffleY, WriteShuffleZ>; 6900b57cec5SDimitry Andricdef SchedWriteVarShuffle 6910b57cec5SDimitry Andric : X86SchedWriteWidths<WriteVarShuffle, WriteVarShuffleX, 6920b57cec5SDimitry Andric WriteVarShuffleY, WriteVarShuffleZ>; 6930b57cec5SDimitry Andricdef SchedWriteBlend 6940b57cec5SDimitry Andric : X86SchedWriteWidths<WriteBlend, WriteBlend, WriteBlendY, WriteBlendZ>; 6950b57cec5SDimitry Andricdef SchedWriteVarBlend 6960b57cec5SDimitry Andric : X86SchedWriteWidths<WriteVarBlend, WriteVarBlend, 6970b57cec5SDimitry Andric WriteVarBlendY, WriteVarBlendZ>; 6980b57cec5SDimitry Andric 6990b57cec5SDimitry Andric// Vector size wrappers. 700349cc55cSDimitry Andric// FIXME: Currently PH uses the same schedule method as PS. 701349cc55cSDimitry Andric// We may refine them later. 7020b57cec5SDimitry Andricdef SchedWriteFAddSizes 703349cc55cSDimitry Andric : X86SchedWriteSizes<SchedWriteFAdd, SchedWriteFAdd, SchedWriteFAdd64>; 7040b57cec5SDimitry Andricdef SchedWriteFCmpSizes 705349cc55cSDimitry Andric : X86SchedWriteSizes<SchedWriteFCmp, SchedWriteFCmp, SchedWriteFCmp64>; 7060b57cec5SDimitry Andricdef SchedWriteFMulSizes 707349cc55cSDimitry Andric : X86SchedWriteSizes<SchedWriteFMul, SchedWriteFMul, SchedWriteFMul64>; 7080b57cec5SDimitry Andricdef SchedWriteFDivSizes 709349cc55cSDimitry Andric : X86SchedWriteSizes<SchedWriteFDiv, SchedWriteFDiv, SchedWriteFDiv64>; 7100b57cec5SDimitry Andricdef SchedWriteFSqrtSizes 711349cc55cSDimitry Andric : X86SchedWriteSizes<SchedWriteFSqrt, SchedWriteFSqrt, SchedWriteFSqrt64>; 7120b57cec5SDimitry Andricdef SchedWriteFLogicSizes 713349cc55cSDimitry Andric : X86SchedWriteSizes<SchedWriteFLogic, SchedWriteFLogic, SchedWriteFLogic>; 7140b57cec5SDimitry Andricdef SchedWriteFShuffleSizes 715349cc55cSDimitry Andric : X86SchedWriteSizes<SchedWriteFShuffle, SchedWriteFShuffle, SchedWriteFShuffle>; 7160b57cec5SDimitry Andric 7170b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 7180b57cec5SDimitry Andric// Generic Processor Scheduler Models. 7190b57cec5SDimitry Andric 7200b57cec5SDimitry Andric// IssueWidth is analogous to the number of decode units. Core and its 7210b57cec5SDimitry Andric// descendents, including Nehalem and SandyBridge have 4 decoders. 7220b57cec5SDimitry Andric// Resources beyond the decoder operate on micro-ops and are bufferred 7230b57cec5SDimitry Andric// so adjacent micro-ops don't directly compete. 7240b57cec5SDimitry Andric// 7250b57cec5SDimitry Andric// MicroOpBufferSize > 1 indicates that RAW dependencies can be 7260b57cec5SDimitry Andric// decoded in the same cycle. The value 32 is a reasonably arbitrary 7270b57cec5SDimitry Andric// number of in-flight instructions. 7280b57cec5SDimitry Andric// 7290b57cec5SDimitry Andric// HighLatency=10 is optimistic. X86InstrInfo::isHighLatencyDef 7300b57cec5SDimitry Andric// indicates high latency opcodes. Alternatively, InstrItinData 7310b57cec5SDimitry Andric// entries may be included here to define specific operand 7320b57cec5SDimitry Andric// latencies. Since these latencies are not used for pipeline hazards, 7330b57cec5SDimitry Andric// they do not need to be exact. 7340b57cec5SDimitry Andric// 7350b57cec5SDimitry Andric// The GenericX86Model contains no instruction schedules 7360b57cec5SDimitry Andric// and disables PostRAScheduler. 7370b57cec5SDimitry Andricclass GenericX86Model : SchedMachineModel { 7380b57cec5SDimitry Andric let IssueWidth = 4; 7390b57cec5SDimitry Andric let MicroOpBufferSize = 32; 7400b57cec5SDimitry Andric let LoadLatency = 4; 7410b57cec5SDimitry Andric let HighLatency = 10; 7420b57cec5SDimitry Andric let PostRAScheduler = 0; 7430b57cec5SDimitry Andric let CompleteModel = 0; 7440b57cec5SDimitry Andric} 7450b57cec5SDimitry Andric 7460b57cec5SDimitry Andricdef GenericModel : GenericX86Model; 7470b57cec5SDimitry Andric 7480b57cec5SDimitry Andric// Define a model with the PostRAScheduler enabled. 7490b57cec5SDimitry Andricdef GenericPostRAModel : GenericX86Model { 7500b57cec5SDimitry Andric let PostRAScheduler = 1; 7510b57cec5SDimitry Andric} 752