[llvm] r328432 - [X86][Haswell] Merge xmm/ymm instructions instregex entries to reduce regex matches to reduce compile time
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 24 11:36:01 PDT 2018
Author: rksimon
Date: Sat Mar 24 11:36:01 2018
New Revision: 328432
URL: http://llvm.org/viewvc/llvm-project?rev=328432&view=rev
Log:
[X86][Haswell] Merge xmm/ymm instructions instregex entries to reduce regex matches to reduce compile time
Modified:
llvm/trunk/lib/Target/X86/X86SchedHaswell.td
Modified: llvm/trunk/lib/Target/X86/X86SchedHaswell.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SchedHaswell.td?rev=328432&r1=328431&r2=328432&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SchedHaswell.td (original)
+++ llvm/trunk/lib/Target/X86/X86SchedHaswell.td Sat Mar 24 11:36:01 2018
@@ -23,7 +23,7 @@ def HaswellModel : SchedMachineModel {
// Based on the LSD (loop-stream detector) queue size and benchmarking data.
let LoopMicroOpBufferSize = 50;
- // This flag is set to allow the scheduler to assign a default model to
+ // This flag is set to allow the scheduler to assign a default model to
// unrecognized opcodes.
let CompleteModel = 0;
}
@@ -687,10 +687,8 @@ def: InstRW<[HWWriteResGroup2], (instreg
"(V?)PSRLQ(Y?)ri",
"VPSRLVQ(Y?)rr",
"(V?)PSRLW(Y?)ri",
- "VTESTPDYrr",
- "VTESTPDrr",
- "VTESTPSYrr",
- "VTESTPSrr")>;
+ "VTESTPD(Y?)rr",
+ "VTESTPS(Y?)rr")>;
def HWWriteResGroup3 : SchedWriteRes<[HWPort1]> {
let Latency = 1;
@@ -707,12 +705,7 @@ def HWWriteResGroup4 : SchedWriteRes<[HW
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[HWWriteResGroup4], (instregex "ANDNPDrr",
- "ANDNPSrr",
- "ANDPDrr",
- "ANDPSrr",
- "INSERTPSrr",
- "MMX_MOVD64rr",
+def: InstRW<[HWWriteResGroup4], (instregex "MMX_MOVD64rr",
"MMX_MOVD64to64rr",
"MMX_MOVQ2DQrr",
"MMX_PALIGNRrri",
@@ -724,167 +717,71 @@ def: InstRW<[HWWriteResGroup4], (instreg
"MMX_PUNPCKLBWirr",
"MMX_PUNPCKLDQirr",
"MMX_PUNPCKLWDirr",
- "MOV64toPQIrr",
- "MOVAPDrr",
- "MOVAPSrr",
- "MOVDDUPrr",
- "MOVDI2PDIrr",
- "MOVHLPSrr",
- "MOVLHPSrr",
- "MOVSDrr",
- "MOVSHDUPrr",
- "MOVSLDUPrr",
- "MOVSSrr",
- "MOVUPDrr",
- "MOVUPSrr",
- "ORPDrr",
- "ORPSrr",
- "PACKSSDWrr",
- "PACKSSWBrr",
- "PACKUSDWrr",
- "PACKUSWBrr",
- "PALIGNRrri",
- "PBLENDWrri",
- "PMOVSXBDrr",
- "PMOVSXBQrr",
- "PMOVSXBWrr",
- "PMOVSXDQrr",
- "PMOVSXWDrr",
- "PMOVSXWQrr",
- "PMOVZXBDrr",
- "PMOVZXBQrr",
- "PMOVZXBWrr",
- "PMOVZXDQrr",
- "PMOVZXWDrr",
- "PMOVZXWQrr",
- "PSHUFBrr",
- "PSHUFDri",
- "PSHUFHWri",
- "PSHUFLWri",
- "PSLLDQri",
- "PSRLDQri",
- "PUNPCKHBWrr",
- "PUNPCKHDQrr",
- "PUNPCKHQDQrr",
- "PUNPCKHWDrr",
- "PUNPCKLBWrr",
- "PUNPCKLDQrr",
- "PUNPCKLQDQrr",
- "PUNPCKLWDrr",
- "SHUFPDrri",
- "SHUFPSrri",
- "UNPCKHPDrr",
- "UNPCKHPSrr",
- "UNPCKLPDrr",
- "UNPCKLPSrr",
- "VANDNPDYrr",
- "VANDNPDrr",
- "VANDNPSYrr",
- "VANDNPSrr",
- "VANDPDYrr",
- "VANDPDrr",
- "VANDPSYrr",
- "VANDPSrr",
+ "(V?)ANDNPD(Y?)rr",
+ "(V?)ANDNPS(Y?)rr",
+ "(V?)ANDPD(Y?)rr",
+ "(V?)ANDPS(Y?)rr",
"VBROADCASTSSrr",
- "VINSERTPSrr",
- "VMOV64toPQIrr",
- "VMOVAPDYrr",
- "VMOVAPDrr",
- "VMOVAPSYrr",
- "VMOVAPSrr",
- "VMOVDDUPYrr",
- "VMOVDDUPrr",
- "VMOVDI2PDIrr",
- "VMOVHLPSrr",
- "VMOVLHPSrr",
- "VMOVSDrr",
- "VMOVSHDUPYrr",
- "VMOVSHDUPrr",
- "VMOVSLDUPYrr",
- "VMOVSLDUPrr",
- "VMOVSSrr",
- "VMOVUPDYrr",
- "VMOVUPDrr",
- "VMOVUPSYrr",
- "VMOVUPSrr",
- "VORPDYrr",
- "VORPDrr",
- "VORPSYrr",
- "VORPSrr",
- "VPACKSSDWYrr",
- "VPACKSSDWrr",
- "VPACKSSWBYrr",
- "VPACKSSWBrr",
- "VPACKUSDWYrr",
- "VPACKUSDWrr",
- "VPACKUSWBYrr",
- "VPACKUSWBrr",
- "VPALIGNRYrri",
- "VPALIGNRrri",
- "VPBLENDWYrri",
- "VPBLENDWrri",
+ "(V?)INSERTPSrr",
+ "(V?)MOV64toPQIrr",
+ "(V?)MOVAPD(Y?)rr",
+ "(V?)MOVAPS(Y?)rr",
+ "(V?)MOVDDUP(Y?)rr",
+ "(V?)MOVDI2PDIrr",
+ "(V?)MOVHLPSrr",
+ "(V?)MOVLHPSrr",
+ "(V?)MOVSDrr",
+ "(V?)MOVSHDUP(Y?)rr",
+ "(V?)MOVSLDUP(Y?)rr",
+ "(V?)MOVSSrr",
+ "(V?)MOVUPD(Y?)rr",
+ "(V?)MOVUPS(Y?)rr",
+ "(V?)ORPD(Y?)rr",
+ "(V?)ORPS(Y?)rr",
+ "(V?)PACKSSDW(Y?)rr",
+ "(V?)PACKSSWB(Y?)rr",
+ "(V?)PACKUSDW(Y?)rr",
+ "(V?)PACKUSWB(Y?)rr",
+ "(V?)PALIGNR(Y?)rri",
+ "(V?)PBLENDW(Y?)rri",
"VPBROADCASTDrr",
"VPBROADCASTQrr",
- "VPERMILPDYri",
- "VPERMILPDYrr",
- "VPERMILPDri",
- "VPERMILPDrr",
- "VPERMILPSYri",
- "VPERMILPSYrr",
- "VPERMILPSri",
- "VPERMILPSrr",
- "VPMOVSXBDrr",
- "VPMOVSXBQrr",
- "VPMOVSXBWrr",
- "VPMOVSXDQrr",
- "VPMOVSXWDrr",
- "VPMOVSXWQrr",
- "VPMOVZXBDrr",
- "VPMOVZXBQrr",
- "VPMOVZXBWrr",
- "VPMOVZXDQrr",
- "VPMOVZXWDrr",
- "VPMOVZXWQrr",
- "VPSHUFBYrr",
- "VPSHUFBrr",
- "VPSHUFDYri",
- "VPSHUFDri",
- "VPSHUFHWYri",
- "VPSHUFHWri",
- "VPSHUFLWYri",
- "VPSHUFLWri",
- "VPSLLDQYri",
- "VPSLLDQri",
- "VPSRLDQYri",
- "VPSRLDQri",
- "VPUNPCKHBWYrr",
- "VPUNPCKHBWrr",
- "VPUNPCKHDQYrr",
- "VPUNPCKHDQrr",
- "VPUNPCKHQDQYrr",
- "VPUNPCKHQDQrr",
- "VPUNPCKHWDYrr",
- "VPUNPCKHWDrr",
- "VPUNPCKLBWYrr",
- "VPUNPCKLBWrr",
- "VPUNPCKLDQYrr",
- "VPUNPCKLDQrr",
- "VPUNPCKLQDQYrr",
- "VPUNPCKLQDQrr",
- "VPUNPCKLWDYrr",
- "VPUNPCKLWDrr",
- "VSHUFPDYrri",
- "VSHUFPDrri",
- "VSHUFPSYrri",
- "VSHUFPSrri",
- "VUNPCKHPDYrr",
- "VUNPCKHPDrr",
- "VUNPCKHPSYrr",
- "VUNPCKHPSrr",
- "VUNPCKLPDYrr",
- "VUNPCKLPDrr",
- "VUNPCKLPSYrr",
- "VUNPCKLPSrr",
+ "VPERMILPD(Y?)ri",
+ "VPERMILPD(Y?)rr",
+ "VPERMILPS(Y?)ri",
+ "VPERMILPS(Y?)rr",
+ "(V?)PMOVSXBDrr",
+ "(V?)PMOVSXBQrr",
+ "(V?)PMOVSXBWrr",
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SDrr",
- "PMAXSWrr",
- "PMAXUBrr",
- "PMAXUDrr",
- "PMAXUWrr",
- "PMINSBrr",
- "PMINSDrr",
- "PMINSWrr",
- "PMINUBrr",
- "PMINUDrr",
- "PMINUWrr",
- "PSIGNBrr",
- "PSIGNDrr",
- "PSIGNWrr",
- "PSUBBrr",
- "PSUBDrr",
- "PSUBQrr",
- "PSUBSBrr",
- "PSUBSWrr",
- "PSUBUSBrr",
- "PSUBUSWrr",
- "PSUBWrr",
- "VPABSBYrr",
- "VPABSBrr",
- "VPABSDYrr",
- "VPABSDrr",
- "VPABSWYrr",
- "VPABSWrr",
- "VPADDBYrr",
- "VPADDBrr",
- "VPADDDYrr",
- "VPADDDrr",
- "VPADDQYrr",
- "VPADDQrr",
- "VPADDSBYrr",
- "VPADDSBrr",
- "VPADDSWYrr",
- "VPADDSWrr",
- "VPADDUSBYrr",
- "VPADDUSBrr",
- "VPADDUSWYrr",
- "VPADDUSWrr",
- "VPADDWYrr",
- "VPADDWrr",
- "VPAVGBYrr",
- "VPAVGBrr",
- "VPAVGWYrr",
- "VPAVGWrr",
- "VPCMPEQBYrr",
- "VPCMPEQBrr",
- "VPCMPEQDYrr",
- "VPCMPEQDrr",
- "VPCMPEQQYrr",
- "VPCMPEQQrr",
- "VPCMPEQWYrr",
- "VPCMPEQWrr",
- "VPCMPGTBYrr",
- "VPCMPGTBrr",
- "VPCMPGTDYrr",
- "VPCMPGTDrr",
- "VPCMPGTWYrr",
- "VPCMPGTWrr",
- "VPMAXSBYrr",
- "VPMAXSBrr",
- "VPMAXSDYrr",
- "VPMAXSDrr",
- "VPMAXSWYrr",
- "VPMAXSWrr",
- "VPMAXUBYrr",
- "VPMAXUBrr",
- "VPMAXUDYrr",
- "VPMAXUDrr",
- "VPMAXUWYrr",
- "VPMAXUWrr",
- "VPMINSBYrr",
- "VPMINSBrr",
- "VPMINSDYrr",
- "VPMINSDrr",
- "VPMINSWYrr",
- "VPMINSWrr",
- "VPMINUBYrr",
- "VPMIN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?)PMINUW(Y?)rr",
+ "(V?)PSIGNB(Y?)rr",
+ "(V?)PSIGND(Y?)rr",
+ "(V?)PSIGNW(Y?)rr",
+ "(V?)PSUBB(Y?)rr",
+ "(V?)PSUBD(Y?)rr",
+ "(V?)PSUBQ(Y?)rr",
+ "(V?)PSUBSB(Y?)rr",
+ "(V?)PSUBSW(Y?)rr",
+ "(V?)PSUBUSB(Y?)rr",
+ "(V?)PSUBUSW(Y?)rr",
+ "(V?)PSUBW(Y?)rr")>;
def HWWriteResGroup9 : SchedWriteRes<[HWPort015]> {
let Latency = 1;
@@ -1717,12 +1528,9 @@ def: InstRW<[HWWriteResGroup27], (instre
"BLENDVPSrr0",
"MMX_PINSRWrr",
"PBLENDVBrr0",
- "VBLENDVPDYrr",
- "VBLENDVPDrr",
- "VBLENDVPSYrr",
- "VBLENDVPSrr",
- "VPBLENDVBYrr",
- "VPBLENDVBrr",
+ "VBLENDVPD(Y?)rr",
+ "VBLENDVPS(Y?)rr",
+ "VPBLENDVB(Y?)rr",
"(V?)PINSRBrr",
"(V?)PINSRDrr",
"(V?)PINSRQrr",
@@ -2158,12 +1966,9 @@ def HWWriteResGroup55 : SchedWriteRes<[H
let NumMicroOps = 3;
let ResourceCycles = [2,1];
}
-def: InstRW<[HWWriteResGroup55], (instregex "VPSLLVDYrr",
- "VPSLLVDrr",
- "VPSRAVDYrr",
- "VPSRAVDrr",
- "VPSRLVDYrr",
- "VPSRLVDrr")>;
+def: InstRW<[HWWriteResGroup55], (instregex "VPSLLVD(Y?)rr",
+ "VPSRAVD(Y?)rr",
+ "VPSRLVD(Y?)rr")>;
def HWWriteResGroup56 : SchedWriteRes<[HWPort5,HWPort15]> {
let Latency = 3;
@@ -2513,14 +2318,10 @@ def HWWriteResGroup84 : SchedWriteRes<[H
let NumMicroOps = 4;
let ResourceCycles = [1,1,1,1];
}
-def: InstRW<[HWWriteResGroup84], (instregex "VMASKMOVPDYmr",
- "VMASKMOVPDmr",
- "VMASKMOVPSYmr",
- "VMASKMOVPSmr",
- "VPMASKMOVDYmr",
- "VPMASKMOVDmr",
- "VPMASKMOVQYmr",
- "VPMASKMOVQmr")>;
+def: InstRW<[HWWriteResGroup84], (instregex "VMASKMOVPD(Y?)mr",
+ "VMASKMOVPS(Y?)mr",
+ "VPMASKMOVD(Y?)mr",
+ "VPMASKMOVQ(Y?)mr")>;
def HWWriteResGroup85 : SchedWriteRes<[HWPort1,HWPort4,HWPort5,HWPort237]> {
let Latency = 5;
More information about the llvm-commits
mailing list