forked from OSchip/llvm-project
[X86] Add WriteVecMOVMSKY scheduler class
llvm-svn: 331525
This commit is contained in:
parent
af79e30ad5
commit
bf4c8c0ff2
|
@ -3855,25 +3855,26 @@ defm PINSRW : sse2_pinsrw, PD;
|
|||
// SSE2 - Packed Mask Creation
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
let ExeDomain = SSEPackedInt, SchedRW = [WriteVecMOVMSK] in {
|
||||
let ExeDomain = SSEPackedInt in {
|
||||
|
||||
def VPMOVMSKBrr : VPDI<0xD7, MRMSrcReg, (outs GR32orGR64:$dst),
|
||||
(ins VR128:$src),
|
||||
"pmovmskb\t{$src, $dst|$dst, $src}",
|
||||
[(set GR32orGR64:$dst, (X86movmsk (v16i8 VR128:$src)))]>,
|
||||
VEX, VEX_WIG;
|
||||
Sched<[WriteVecMOVMSK]>, VEX, VEX_WIG;
|
||||
|
||||
let Predicates = [HasAVX2] in {
|
||||
def VPMOVMSKBYrr : VPDI<0xD7, MRMSrcReg, (outs GR32orGR64:$dst),
|
||||
(ins VR256:$src),
|
||||
"pmovmskb\t{$src, $dst|$dst, $src}",
|
||||
[(set GR32orGR64:$dst, (X86movmsk (v32i8 VR256:$src)))]>,
|
||||
VEX, VEX_L, VEX_WIG;
|
||||
Sched<[WriteVecMOVMSKY]>, VEX, VEX_L, VEX_WIG;
|
||||
}
|
||||
|
||||
def PMOVMSKBrr : PDI<0xD7, MRMSrcReg, (outs GR32orGR64:$dst), (ins VR128:$src),
|
||||
"pmovmskb\t{$src, $dst|$dst, $src}",
|
||||
[(set GR32orGR64:$dst, (X86movmsk (v16i8 VR128:$src)))]>;
|
||||
[(set GR32orGR64:$dst, (X86movmsk (v16i8 VR128:$src)))]>,
|
||||
Sched<[WriteVecMOVMSK]>;
|
||||
|
||||
} // ExeDomain = SSEPackedInt
|
||||
|
||||
|
|
|
@ -317,6 +317,7 @@ def : WriteRes<WritePCmpEStrILd, [BWPort0, BWPort5, BWPort23, BWPort0156]> {
|
|||
// MOVMSK Instructions.
|
||||
def : WriteRes<WriteFMOVMSK, [BWPort0]> { let Latency = 3; }
|
||||
def : WriteRes<WriteVecMOVMSK, [BWPort0]> { let Latency = 3; }
|
||||
def : WriteRes<WriteVecMOVMSKY, [BWPort0]> { let Latency = 3; }
|
||||
def : WriteRes<WriteMMXMOVMSK, [BWPort0]> { let Latency = 1; }
|
||||
|
||||
// AES instructions.
|
||||
|
|
|
@ -310,6 +310,7 @@ def : WriteRes<WritePCmpEStrILd, [HWPort0, HWPort5, HWPort23, HWPort0156]> {
|
|||
// MOVMSK Instructions.
|
||||
def : WriteRes<WriteFMOVMSK, [HWPort0]> { let Latency = 3; }
|
||||
def : WriteRes<WriteVecMOVMSK, [HWPort0]> { let Latency = 3; }
|
||||
def : WriteRes<WriteVecMOVMSKY, [HWPort0]> { let Latency = 3; }
|
||||
def : WriteRes<WriteMMXMOVMSK, [HWPort0]> { let Latency = 1; }
|
||||
|
||||
// AES Instructions.
|
||||
|
|
|
@ -289,6 +289,7 @@ def : WriteRes<WritePCmpEStrILd, [SBPort015, SBPort23]> {
|
|||
// MOVMSK Instructions.
|
||||
def : WriteRes<WriteFMOVMSK, [SBPort0]> { let Latency = 2; }
|
||||
def : WriteRes<WriteVecMOVMSK, [SBPort0]> { let Latency = 2; }
|
||||
def : WriteRes<WriteVecMOVMSKY, [SBPort0]> { let Latency = 2; }
|
||||
def : WriteRes<WriteMMXMOVMSK, [SBPort0]> { let Latency = 1; }
|
||||
|
||||
// AES Instructions.
|
||||
|
|
|
@ -312,6 +312,7 @@ def : WriteRes<WritePCmpEStrILd, [SKLPort0, SKLPort5, SKLPort23, SKLPort0156]> {
|
|||
// MOVMSK Instructions.
|
||||
def : WriteRes<WriteFMOVMSK, [SKLPort0]> { let Latency = 2; }
|
||||
def : WriteRes<WriteVecMOVMSK, [SKLPort0]> { let Latency = 2; }
|
||||
def : WriteRes<WriteVecMOVMSKY, [SKLPort0]> { let Latency = 2; }
|
||||
def : WriteRes<WriteMMXMOVMSK, [SKLPort0]> { let Latency = 2; }
|
||||
|
||||
// AES instructions.
|
||||
|
|
|
@ -313,6 +313,7 @@ def : WriteRes<WritePCmpEStrILd, [SKXPort0, SKXPort5, SKXPort23, SKXPort0156]> {
|
|||
// MOVMSK Instructions.
|
||||
def : WriteRes<WriteFMOVMSK, [SKXPort0]> { let Latency = 2; }
|
||||
def : WriteRes<WriteVecMOVMSK, [SKXPort0]> { let Latency = 2; }
|
||||
def : WriteRes<WriteVecMOVMSKY, [SKXPort0]> { let Latency = 2; }
|
||||
def : WriteRes<WriteMMXMOVMSK, [SKXPort0]> { let Latency = 2; }
|
||||
|
||||
// AES instructions.
|
||||
|
|
|
@ -184,6 +184,7 @@ def WriteVecExtractSt : SchedWrite; // Extract vector element and store.
|
|||
// MOVMSK operations.
|
||||
def WriteFMOVMSK : SchedWrite;
|
||||
def WriteVecMOVMSK : SchedWrite;
|
||||
def WriteVecMOVMSKY : SchedWrite;
|
||||
def WriteMMXMOVMSK : SchedWrite;
|
||||
|
||||
// Conversion between integer and float.
|
||||
|
|
|
@ -310,6 +310,7 @@ defm : AtomWriteResPair<WritePCmpEStrM, [AtomPort01], [AtomPort01]>; // NOTE: Do
|
|||
|
||||
def : WriteRes<WriteFMOVMSK, [AtomPort0]> { let Latency = 3; let ResourceCycles = [3]; }
|
||||
def : WriteRes<WriteVecMOVMSK, [AtomPort0]> { let Latency = 3; let ResourceCycles = [3]; }
|
||||
def : WriteRes<WriteVecMOVMSKY, [AtomPort0]> { let Latency = 3; let ResourceCycles = [3]; }
|
||||
def : WriteRes<WriteMMXMOVMSK, [AtomPort0]> { let Latency = 3; let ResourceCycles = [3]; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -462,6 +462,7 @@ defm : JWriteResFpuPair<WritePCmpEStrM, [JFPU1, JSAGU, JLAGU, JVALU, JVALU1, JFP
|
|||
|
||||
def : WriteRes<WriteFMOVMSK, [JFPU0, JFPA, JALU0]> { let Latency = 3; }
|
||||
def : WriteRes<WriteVecMOVMSK, [JFPU0, JFPA, JALU0]> { let Latency = 3; }
|
||||
def : WriteRes<WriteVecMOVMSKY, [JFPU0, JFPA, JALU0]> { let Latency = 3; }
|
||||
def : WriteRes<WriteMMXMOVMSK, [JFPU0, JFPA, JALU0]> { let Latency = 3; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -257,6 +257,7 @@ def : WriteRes<WritePCmpEStrILd, [SLM_FPC_RSV0, SLM_MEC_RSV]> {
|
|||
// MOVMSK Instructions.
|
||||
def : WriteRes<WriteFMOVMSK, [SLM_FPC_RSV1]> { let Latency = 4; }
|
||||
def : WriteRes<WriteVecMOVMSK, [SLM_FPC_RSV1]> { let Latency = 4; }
|
||||
def : WriteRes<WriteVecMOVMSKY, [SLM_FPC_RSV1]> { let Latency = 4; }
|
||||
def : WriteRes<WriteMMXMOVMSK, [SLM_FPC_RSV1]> { let Latency = 4; }
|
||||
|
||||
// AES Instructions.
|
||||
|
|
|
@ -279,8 +279,14 @@ def : WriteRes<WriteVecExtractSt, [ZnAGU, ZnFPU12, ZnFPU2]> {
|
|||
|
||||
// MOVMSK Instructions.
|
||||
def : WriteRes<WriteFMOVMSK, [ZnFPU2]>;
|
||||
def : WriteRes<WriteVecMOVMSK, [ZnFPU2]>;
|
||||
def : WriteRes<WriteMMXMOVMSK, [ZnFPU2]>;
|
||||
def : WriteRes<WriteVecMOVMSK, [ZnFPU2]>;
|
||||
|
||||
def : WriteRes<WriteVecMOVMSKY, [ZnFPU2]> {
|
||||
let NumMicroOps = 2;
|
||||
let Latency = 2;
|
||||
let ResourceCycles = [2];
|
||||
}
|
||||
|
||||
// AES Instructions.
|
||||
defm : ZnWriteResFpuPair<WriteAESDecEnc, [ZnFPU01], 4>;
|
||||
|
@ -995,14 +1001,6 @@ def : InstRW<[WriteMicrocoded],
|
|||
// m, v,v.
|
||||
def : InstRW<[WriteMicrocoded], (instregex "VPMASKMOV(D|Q)(Y?)mr")>;
|
||||
|
||||
// PMOVMSKBY.
|
||||
def ZnWritePMOVMSKBY : SchedWriteRes<[ZnFPU2]> {
|
||||
let NumMicroOps = 2;
|
||||
let Latency = 2;
|
||||
let ResourceCycles = [2];
|
||||
}
|
||||
def : InstRW<[ZnWritePMOVMSKBY], (instregex "(V|MMX_)?PMOVMSKBYrr")>;
|
||||
|
||||
// VPBROADCAST B/W.
|
||||
// x, m8/16.
|
||||
def ZnWriteVPBROADCAST128Ld : SchedWriteRes<[ZnAGU, ZnFPU12]> {
|
||||
|
|
Loading…
Reference in New Issue