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
|
||||
|
||||
|
|
|
@ -315,9 +315,10 @@ 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<WriteMMXMOVMSK, [BWPort0]> { let Latency = 1; }
|
||||
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.
|
||||
def : WriteRes<WriteAESDecEnc, [BWPort5]> { // Decryption, encryption.
|
||||
|
|
|
@ -308,9 +308,10 @@ 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<WriteMMXMOVMSK, [HWPort0]> { let Latency = 1; }
|
||||
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.
|
||||
def : WriteRes<WriteAESDecEnc, [HWPort5]> {
|
||||
|
|
|
@ -287,9 +287,10 @@ def : WriteRes<WritePCmpEStrILd, [SBPort015, SBPort23]> {
|
|||
}
|
||||
|
||||
// MOVMSK Instructions.
|
||||
def : WriteRes<WriteFMOVMSK, [SBPort0]> { let Latency = 2; }
|
||||
def : WriteRes<WriteVecMOVMSK, [SBPort0]> { let Latency = 2; }
|
||||
def : WriteRes<WriteMMXMOVMSK, [SBPort0]> { let Latency = 1; }
|
||||
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.
|
||||
def : WriteRes<WriteAESDecEnc, [SBPort5,SBPort015]> {
|
||||
|
|
|
@ -310,9 +310,10 @@ 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<WriteMMXMOVMSK, [SKLPort0]> { let Latency = 2; }
|
||||
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.
|
||||
def : WriteRes<WriteAESDecEnc, [SKLPort0]> { // Decryption, encryption.
|
||||
|
|
|
@ -311,9 +311,10 @@ 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<WriteMMXMOVMSK, [SKXPort0]> { let Latency = 2; }
|
||||
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.
|
||||
def : WriteRes<WriteAESDecEnc, [SKXPort0]> { // Decryption, encryption.
|
||||
|
|
|
@ -182,9 +182,10 @@ def WriteVecExtract : SchedWrite; // Extract vector element to gpr.
|
|||
def WriteVecExtractSt : SchedWrite; // Extract vector element and store.
|
||||
|
||||
// MOVMSK operations.
|
||||
def WriteFMOVMSK : SchedWrite;
|
||||
def WriteVecMOVMSK : SchedWrite;
|
||||
def WriteMMXMOVMSK : SchedWrite;
|
||||
def WriteFMOVMSK : SchedWrite;
|
||||
def WriteVecMOVMSK : SchedWrite;
|
||||
def WriteVecMOVMSKY : SchedWrite;
|
||||
def WriteMMXMOVMSK : SchedWrite;
|
||||
|
||||
// Conversion between integer and float.
|
||||
defm WriteCvtF2I : X86SchedWritePair; // Float -> Integer.
|
||||
|
|
|
@ -308,9 +308,10 @@ defm : AtomWriteResPair<WritePCmpEStrM, [AtomPort01], [AtomPort01]>; // NOTE: Do
|
|||
// MOVMSK Instructions.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
def : WriteRes<WriteFMOVMSK, [AtomPort0]> { let Latency = 3; let ResourceCycles = [3]; }
|
||||
def : WriteRes<WriteVecMOVMSK, [AtomPort0]> { let Latency = 3; let ResourceCycles = [3]; }
|
||||
def : WriteRes<WriteMMXMOVMSK, [AtomPort0]> { let Latency = 3; let ResourceCycles = [3]; }
|
||||
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]; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// AES Instructions.
|
||||
|
|
|
@ -460,9 +460,10 @@ defm : JWriteResFpuPair<WritePCmpEStrM, [JFPU1, JSAGU, JLAGU, JVALU, JVALU1, JFP
|
|||
// MOVMSK Instructions.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
def : WriteRes<WriteFMOVMSK, [JFPU0, JFPA, JALU0]> { let Latency = 3; }
|
||||
def : WriteRes<WriteVecMOVMSK, [JFPU0, JFPA, JALU0]> { let Latency = 3; }
|
||||
def : WriteRes<WriteMMXMOVMSK, [JFPU0, JFPA, JALU0]> { let Latency = 3; }
|
||||
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; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// AES Instructions.
|
||||
|
|
|
@ -255,9 +255,10 @@ 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<WriteMMXMOVMSK, [SLM_FPC_RSV1]> { let Latency = 4; }
|
||||
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.
|
||||
def : WriteRes<WriteAESDecEnc, [SLM_FPC_RSV0]> {
|
||||
|
|
|
@ -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