From 5f528dcc0adbf273e9c372a80f0997a255ef8de2 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 31 Jan 2017 06:49:55 +0000 Subject: [PATCH] [AVX-512] Don't both looking into the AVX512DQ execution domain fixing tables if AVX512DQ isn't supported since we can't do any conversion anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293608 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86InstrInfo.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/Target/X86/X86InstrInfo.cpp b/lib/Target/X86/X86InstrInfo.cpp index 2d2b48554dd..8569360a6a1 100644 --- a/lib/Target/X86/X86InstrInfo.cpp +++ b/lib/Target/X86/X86InstrInfo.cpp @@ -8977,14 +8977,17 @@ X86InstrInfo::getExecutionDomain(const MachineInstr &MI) const { validDomains = Subtarget.hasAVX2() ? 0xe : 0x6; } else if (lookupAVX512(opcode, domain, ReplaceableInstrsAVX512)) { validDomains = 0xe; - } else if (lookupAVX512(opcode, domain, ReplaceableInstrsAVX512DQ)) { - validDomains = Subtarget.hasDQI() ? 0xe : 0x8; - } else if (const uint16_t *table = lookupAVX512(opcode, domain, + } else if (Subtarget.hasDQI() && lookupAVX512(opcode, domain, + ReplaceableInstrsAVX512DQ)) { + validDomains = 0xe; + } else if (Subtarget.hasDQI()) { + if (const uint16_t *table = lookupAVX512(opcode, domain, ReplaceableInstrsAVX512DQMasked)) { - if (domain == 1 || (domain == 3 && table[3] == opcode)) - validDomains = Subtarget.hasDQI() ? 0xa : 0x8; - else - validDomains = Subtarget.hasDQI() ? 0xc : 0x8; + if (domain == 1 || (domain == 3 && table[3] == opcode)) + validDomains = 0xa; + else + validDomains = 0xc; + } } } return std::make_pair(domain, validDomains); -- 2.50.1