Index: lib/Target/X86/X86ScheduleBtVer2.td =================================================================== --- lib/Target/X86/X86ScheduleBtVer2.td +++ lib/Target/X86/X86ScheduleBtVer2.td @@ -609,57 +609,36 @@ SchedVar, [JWriteZeroLatency]>, SchedVar, [WriteALU]> ]>; -def : InstRW<[JWriteZeroIdiom], (instrs SUB32rr, SUB64rr, - XOR32rr, XOR64rr)>; +def : InstRW<[JWriteZeroIdiom], (instregex "(SUB|XOR)(32|64)rr")>; def JWriteFZeroIdiom : SchedWriteVariant<[ SchedVar, [JWriteZeroLatency]>, SchedVar, [WriteFLogic]> ]>; -def : InstRW<[JWriteFZeroIdiom], (instrs XORPSrr, VXORPSrr, XORPDrr, VXORPDrr, - ANDNPSrr, VANDNPSrr, - ANDNPDrr, VANDNPDrr)>; +def : InstRW<[JWriteFZeroIdiom], (instregex "(V?)(XOR|ANDN)P(S|D)rr")>; def JWriteVZeroIdiomLogic : SchedWriteVariant<[ SchedVar, [JWriteZeroLatency]>, SchedVar, [WriteVecLogic]> ]>; -def : InstRW<[JWriteVZeroIdiomLogic], (instrs MMX_PXORirr, MMX_PANDNirr)>; +def : InstRW<[JWriteVZeroIdiomLogic], (instregex "MMX_P(XOR|ANDN)irr")>; def JWriteVZeroIdiomLogicX : SchedWriteVariant<[ SchedVar, [JWriteZeroLatency]>, SchedVar, [WriteVecLogicX]> ]>; -def : InstRW<[JWriteVZeroIdiomLogicX], (instrs PXORrr, VPXORrr, - PANDNrr, VPANDNrr)>; +def : InstRW<[JWriteVZeroIdiomLogicX], (instregex "(V?)P(XOR|ANDN)rr")>; def JWriteVZeroIdiomALU : SchedWriteVariant<[ SchedVar, [JWriteZeroLatency]>, SchedVar, [WriteVecALU]> ]>; -def : InstRW<[JWriteVZeroIdiomALU], (instrs MMX_PSUBBirr, MMX_PSUBDirr, - MMX_PSUBQirr, MMX_PSUBWirr, - MMX_PCMPEQBirr, - MMX_PCMPEQDirr, - MMX_PCMPEQWirr, - MMX_PCMPGTBirr, - MMX_PCMPGTDirr, - MMX_PCMPGTWirr)>; +def : InstRW<[JWriteVZeroIdiomALU], (instregex "MMX_P(SUB(B|D|Q|W)|(CMP(EQ|GT)(B|D|W)))irr")>; def JWriteVZeroIdiomALUX : SchedWriteVariant<[ SchedVar, [JWriteZeroLatency]>, SchedVar, [WriteVecALUX]> ]>; -def : InstRW<[JWriteVZeroIdiomALUX], (instrs PSUBBrr, VPSUBBrr, - PSUBDrr, VPSUBDrr, - PSUBQrr, VPSUBQrr, - PSUBWrr, VPSUBWrr, - PCMPEQBrr, VPCMPEQBrr, - PCMPEQDrr, VPCMPEQDrr, - PCMPEQQrr, VPCMPEQQrr, - PCMPEQWrr, VPCMPEQWrr, - PCMPGTBrr, VPCMPGTBrr, - PCMPGTDrr, VPCMPGTDrr, - PCMPGTQrr, VPCMPGTQrr, - PCMPGTWrr, VPCMPGTWrr)>; +def : InstRW<[JWriteVZeroIdiomALUX], (instregex "(V?)P(SUB(B|D|Q|W)|(CMP(EQ|GT)(B|D|Q|W)))rr")>; + } // SchedModel