diff --git a/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp b/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp index 96b464a2f13d..7b46eec12d05 100644 --- a/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -1055,11 +1055,6 @@ bool X86AsmParser::ParseRegister(unsigned &RegNo, return Error(StartLoc, "register %" + Tok.getString() + " is only available in 64-bit mode", SMRange(StartLoc, EndLoc)); - } else if (!getSTI().getFeatureBits()[X86::FeatureAVX512]) { - if (X86II::is32ExtendedReg(RegNo)) - return Error(StartLoc, "register %" - + Tok.getString() + " is only available with AVX512", - SMRange(StartLoc, EndLoc)); } // Parse "%st" as "%st(0)" and "%st(1)", which is multiple tokens. @@ -1793,8 +1788,7 @@ std::unique_ptr X86AsmParser::ParseIntelOperand() { Start = Tok.getLoc(); // Rounding mode operand. - if (getSTI().getFeatureBits()[X86::FeatureAVX512] && - getLexer().is(AsmToken::LCurly)) + if (getLexer().is(AsmToken::LCurly)) return ParseRoundingModeOp(Start); // Register operand. @@ -1897,9 +1891,7 @@ std::unique_ptr X86AsmParser::ParseATTOperand() { } case AsmToken::LCurly:{ SMLoc Start = Parser.getTok().getLoc(); - if (getSTI().getFeatureBits()[X86::FeatureAVX512]) - return ParseRoundingModeOp(Start); - return ErrorOperand(Start, "Unexpected '{' in expression"); + return ParseRoundingModeOp(Start); } } } @@ -1929,82 +1921,80 @@ bool X86AsmParser::ParseZ(std::unique_ptr &Z, bool X86AsmParser::HandleAVX512Operand(OperandVector &Operands, const MCParsedAsmOperand &Op) { MCAsmParser &Parser = getParser(); - if(getSTI().getFeatureBits()[X86::FeatureAVX512]) { - if (getLexer().is(AsmToken::LCurly)) { - // Eat "{" and mark the current place. - const SMLoc consumedToken = consumeToken(); - // Distinguish {1to} from {%k}. - if(getLexer().is(AsmToken::Integer)) { - // Parse memory broadcasting ({1to}). - if (getLexer().getTok().getIntVal() != 1) - return TokError("Expected 1to at this point"); - Parser.Lex(); // Eat "1" of 1to8 - if (!getLexer().is(AsmToken::Identifier) || - !getLexer().getTok().getIdentifier().startswith("to")) - return TokError("Expected 1to at this point"); - // Recognize only reasonable suffixes. - const char *BroadcastPrimitive = - StringSwitch(getLexer().getTok().getIdentifier()) - .Case("to2", "{1to2}") - .Case("to4", "{1to4}") - .Case("to8", "{1to8}") - .Case("to16", "{1to16}") - .Default(nullptr); - if (!BroadcastPrimitive) - return TokError("Invalid memory broadcast primitive."); - Parser.Lex(); // Eat "toN" of 1toN - if (!getLexer().is(AsmToken::RCurly)) - return TokError("Expected } at this point"); - Parser.Lex(); // Eat "}" - Operands.push_back(X86Operand::CreateToken(BroadcastPrimitive, - consumedToken)); - // No AVX512 specific primitives can pass - // after memory broadcasting, so return. - return false; - } else { - // Parse either {k}{z}, {z}{k}, {k} or {z} - // last one have no meaning, but GCC accepts it - // Currently, we're just pass a '{' mark - std::unique_ptr Z; - if (ParseZ(Z, consumedToken)) - return true; - // Reaching here means that parsing of the allegadly '{z}' mark yielded - // no errors. - // Query for the need of further parsing for a {%k} mark - if (!Z || getLexer().is(AsmToken::LCurly)) { - SMLoc StartLoc = Z ? consumeToken() : consumedToken; - // Parse an op-mask register mark ({%k}), which is now to be - // expected - unsigned RegNo; - SMLoc RegLoc; - if (!ParseRegister(RegNo, RegLoc, StartLoc) && - X86MCRegisterClasses[X86::VK1RegClassID].contains(RegNo)) { - if (RegNo == X86::K0) - return Error(RegLoc, "Register k0 can't be used as write mask"); - if (!getLexer().is(AsmToken::RCurly)) - return Error(getLexer().getLoc(), "Expected } at this point"); - Operands.push_back(X86Operand::CreateToken("{", StartLoc)); - Operands.push_back( - X86Operand::CreateReg(RegNo, StartLoc, StartLoc)); - Operands.push_back(X86Operand::CreateToken("}", consumeToken())); - } else + if (getLexer().is(AsmToken::LCurly)) { + // Eat "{" and mark the current place. + const SMLoc consumedToken = consumeToken(); + // Distinguish {1to} from {%k}. + if(getLexer().is(AsmToken::Integer)) { + // Parse memory broadcasting ({1to}). + if (getLexer().getTok().getIntVal() != 1) + return TokError("Expected 1to at this point"); + Parser.Lex(); // Eat "1" of 1to8 + if (!getLexer().is(AsmToken::Identifier) || + !getLexer().getTok().getIdentifier().startswith("to")) + return TokError("Expected 1to at this point"); + // Recognize only reasonable suffixes. + const char *BroadcastPrimitive = + StringSwitch(getLexer().getTok().getIdentifier()) + .Case("to2", "{1to2}") + .Case("to4", "{1to4}") + .Case("to8", "{1to8}") + .Case("to16", "{1to16}") + .Default(nullptr); + if (!BroadcastPrimitive) + return TokError("Invalid memory broadcast primitive."); + Parser.Lex(); // Eat "toN" of 1toN + if (!getLexer().is(AsmToken::RCurly)) + return TokError("Expected } at this point"); + Parser.Lex(); // Eat "}" + Operands.push_back(X86Operand::CreateToken(BroadcastPrimitive, + consumedToken)); + // No AVX512 specific primitives can pass + // after memory broadcasting, so return. + return false; + } else { + // Parse either {k}{z}, {z}{k}, {k} or {z} + // last one have no meaning, but GCC accepts it + // Currently, we're just pass a '{' mark + std::unique_ptr Z; + if (ParseZ(Z, consumedToken)) + return true; + // Reaching here means that parsing of the allegadly '{z}' mark yielded + // no errors. + // Query for the need of further parsing for a {%k} mark + if (!Z || getLexer().is(AsmToken::LCurly)) { + SMLoc StartLoc = Z ? consumeToken() : consumedToken; + // Parse an op-mask register mark ({%k}), which is now to be + // expected + unsigned RegNo; + SMLoc RegLoc; + if (!ParseRegister(RegNo, RegLoc, StartLoc) && + X86MCRegisterClasses[X86::VK1RegClassID].contains(RegNo)) { + if (RegNo == X86::K0) + return Error(RegLoc, "Register k0 can't be used as write mask"); + if (!getLexer().is(AsmToken::RCurly)) + return Error(getLexer().getLoc(), "Expected } at this point"); + Operands.push_back(X86Operand::CreateToken("{", StartLoc)); + Operands.push_back( + X86Operand::CreateReg(RegNo, StartLoc, StartLoc)); + Operands.push_back(X86Operand::CreateToken("}", consumeToken())); + } else + return Error(getLexer().getLoc(), + "Expected an op-mask register at this point"); + // {%k} mark is found, inquire for {z} + if (getLexer().is(AsmToken::LCurly) && !Z) { + // Have we've found a parsing error, or found no (expected) {z} mark + // - report an error + if (ParseZ(Z, consumeToken()) || !Z) return Error(getLexer().getLoc(), - "Expected an op-mask register at this point"); - // {%k} mark is found, inquire for {z} - if (getLexer().is(AsmToken::LCurly) && !Z) { - // Have we've found a parsing error, or found no (expected) {z} mark - // - report an error - if (ParseZ(Z, consumeToken()) || !Z) - return Error(getLexer().getLoc(), - "Expected a {z} mark at this point"); + "Expected a {z} mark at this point"); - } - // '{z}' on its own is meaningless, hence should be ignored. - // on the contrary - have it been accompanied by a K register, - // allow it. - if (Z) - Operands.push_back(std::move(Z)); } + // '{z}' on its own is meaningless, hence should be ignored. + // on the contrary - have it been accompanied by a K register, + // allow it. + if (Z) + Operands.push_back(std::move(Z)); } } } diff --git a/llvm/test/MC/X86/AVX512F_512-32.s b/llvm/test/MC/X86/AVX512F_512-32.s index f5086a3989e6..fdab24f4c73b 100644 --- a/llvm/test/MC/X86/AVX512F_512-32.s +++ b/llvm/test/MC/X86/AVX512F_512-32.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple i386-unknown-unknown -mcpu=skx --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple i386-unknown-unknown --show-encoding %s | FileCheck %s // CHECK: vaddpd 4096(%edx,%eax), %zmm2, %zmm2 // CHECK: encoding: [0x62,0xf1,0xed,0x48,0x58,0x54,0x02,0x40] diff --git a/llvm/test/MC/X86/AVX512F_512-64.s b/llvm/test/MC/X86/AVX512F_512-64.s index fc0d5c065aaf..753b8b11157f 100644 --- a/llvm/test/MC/X86/AVX512F_512-64.s +++ b/llvm/test/MC/X86/AVX512F_512-64.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=skx --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s // CHECK: vaddpd 4096(%rdx,%rax,4), %zmm19, %zmm19 // CHECK: encoding: [0x62,0xe1,0xe5,0x40,0x58,0x5c,0x82,0x40] diff --git a/llvm/test/MC/X86/X86_64-pku.s b/llvm/test/MC/X86/X86_64-pku.s index 8f8b227fa0c2..c1504c6f5d1d 100644 --- a/llvm/test/MC/X86/X86_64-pku.s +++ b/llvm/test/MC/X86/X86_64-pku.s @@ -1,8 +1,8 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mattr=+pku --show-encoding < %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s // CHECK: rdpkru // CHECK: encoding: [0x0f,0x01,0xee] rdpkru // CHECK: wrpkru // CHECK: encoding: [0x0f,0x01,0xef] - wrpkru \ No newline at end of file + wrpkru diff --git a/llvm/test/MC/X86/avx512-encodings.s b/llvm/test/MC/X86/avx512-encodings.s index 5f420280cfc1..8e2193089521 100644 --- a/llvm/test/MC/X86/avx512-encodings.s +++ b/llvm/test/MC/X86/avx512-encodings.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl --show-encoding < %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s // CHECK: vaddpd %zmm6, %zmm27, %zmm8 // CHECK: encoding: [0x62,0x71,0xa5,0x40,0x58,0xc6] diff --git a/llvm/test/MC/X86/avx512-err.s b/llvm/test/MC/X86/avx512-err.s index 329d851cd5db..31d5f4f6f1d3 100644 --- a/llvm/test/MC/X86/avx512-err.s +++ b/llvm/test/MC/X86/avx512-err.s @@ -1,4 +1,4 @@ -// RUN: not llvm-mc %s -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512dq -mattr=+avx512f --show-encoding -o /dev/null 2>&1 | FileCheck --check-prefix=ERR %s +// RUN: not llvm-mc %s -triple x86_64-unknown-unknown --show-encoding -o /dev/null 2>&1 | FileCheck --check-prefix=ERR %s // ERR: Register k0 can't be used as write mask vpcmpd $1, %zmm24, %zmm7, %k5{%k0} diff --git a/llvm/test/MC/X86/avx512bitalg-encoding.s b/llvm/test/MC/X86/avx512bitalg-encoding.s index e926ab0b110b..f8b507adfc09 100644 --- a/llvm/test/MC/X86/avx512bitalg-encoding.s +++ b/llvm/test/MC/X86/avx512bitalg-encoding.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512bitalg --show-encoding < %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s // CHECK: vpopcntb %zmm23, %zmm21 // CHECK: encoding: [0x62,0xa2,0x7d,0x48,0x54,0xef] diff --git a/llvm/test/MC/X86/avx512bw-encoding.s b/llvm/test/MC/X86/avx512bw-encoding.s index aaf001a0f3ce..317f7ae89739 100644 --- a/llvm/test/MC/X86/avx512bw-encoding.s +++ b/llvm/test/MC/X86/avx512bw-encoding.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=skx --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s // CHECK: vpblendmb %zmm25, %zmm18, %zmm17 // CHECK: encoding: [0x62,0x82,0x6d,0x40,0x66,0xc9] diff --git a/llvm/test/MC/X86/avx512gfni-encoding.s b/llvm/test/MC/X86/avx512gfni-encoding.s index 4dd75213cfb4..975595deef58 100644 --- a/llvm/test/MC/X86/avx512gfni-encoding.s +++ b/llvm/test/MC/X86/avx512gfni-encoding.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mattr=+gfni,+avx512f,+avx512bw --show-encoding < %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s // CHECK: vgf2p8affineinvqb $7, %zmm2, %zmm20, %zmm1 // CHECK: encoding: [0x62,0xf3,0xdd,0x40,0xcf,0xca,0x07] diff --git a/llvm/test/MC/X86/avx512ifma-encoding.s b/llvm/test/MC/X86/avx512ifma-encoding.s index 644fd1dd02c0..ae1e3c89e1d5 100644 --- a/llvm/test/MC/X86/avx512ifma-encoding.s +++ b/llvm/test/MC/X86/avx512ifma-encoding.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512ifma --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s vpmadd52luq %zmm4, %zmm5, %zmm6 //CHECK: vpmadd52luq %zmm4, %zmm5, %zmm6 diff --git a/llvm/test/MC/X86/avx512ifmavl-encoding.s b/llvm/test/MC/X86/avx512ifmavl-encoding.s index 1620772df3eb..9871a2e1b94f 100644 --- a/llvm/test/MC/X86/avx512ifmavl-encoding.s +++ b/llvm/test/MC/X86/avx512ifmavl-encoding.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512ifma -mattr=+avx512vl --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s vpmadd52luq %xmm4, %xmm5, %xmm6 {%k7} //CHECK: vpmadd52luq %xmm4, %xmm5, %xmm6 {%k7} diff --git a/llvm/test/MC/X86/avx512vaes-encoding.s b/llvm/test/MC/X86/avx512vaes-encoding.s index d0c1ea9f956d..e688413a8aa3 100644 --- a/llvm/test/MC/X86/avx512vaes-encoding.s +++ b/llvm/test/MC/X86/avx512vaes-encoding.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+vaes --show-encoding < %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s // CHECK: vaesenc %zmm3, %zmm2, %zmm21 // CHECK: encoding: [0x62,0xe2,0x6d,0x48,0xdc,0xeb] diff --git a/llvm/test/MC/X86/avx512vbmi-encoding.s b/llvm/test/MC/X86/avx512vbmi-encoding.s index 040947301d68..bf11e1999d25 100644 --- a/llvm/test/MC/X86/avx512vbmi-encoding.s +++ b/llvm/test/MC/X86/avx512vbmi-encoding.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=skx -mattr=+avx512vl -mattr=+avx512vbmi --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s vpermb %xmm28, %xmm29, %xmm30 {%k7} //CHECK: vpermb %xmm28, %xmm29, %xmm30 {%k7} diff --git a/llvm/test/MC/X86/avx512vbmi2-encoding.s b/llvm/test/MC/X86/avx512vbmi2-encoding.s index bd0c8c80b850..200a24022f11 100644 --- a/llvm/test/MC/X86/avx512vbmi2-encoding.s +++ b/llvm/test/MC/X86/avx512vbmi2-encoding.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vbmi2 --show-encoding < %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s // CHECK: vpexpandb %zmm3, %zmm1 // CHECK: encoding: [0x62,0xf2,0x7d,0x48,0x62,0xcb] diff --git a/llvm/test/MC/X86/avx512vbmi2vl-encoding.s b/llvm/test/MC/X86/avx512vbmi2vl-encoding.s index c916338de016..94c8bff89ac3 100644 --- a/llvm/test/MC/X86/avx512vbmi2vl-encoding.s +++ b/llvm/test/MC/X86/avx512vbmi2vl-encoding.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vbmi2 -mattr=+avx512vl --show-encoding < %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s // CHECK: vpexpandb %xmm3, %xmm1 // CHECK: encoding: [0x62,0xf2,0x7d,0x08,0x62,0xcb] diff --git a/llvm/test/MC/X86/avx512vl-encoding.s b/llvm/test/MC/X86/avx512vl-encoding.s index 42b412cc50d6..01cca33369f1 100644 --- a/llvm/test/MC/X86/avx512vl-encoding.s +++ b/llvm/test/MC/X86/avx512vl-encoding.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=skx --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s // CHECK: vblendmpd %xmm19, %xmm20, %xmm27 // CHECK: encoding: [0x62,0x22,0xdd,0x00,0x65,0xdb] diff --git a/llvm/test/MC/X86/avx512vl_bitalg-encoding.s b/llvm/test/MC/X86/avx512vl_bitalg-encoding.s index f6f4e7f989d0..6e5892c4ef00 100644 --- a/llvm/test/MC/X86/avx512vl_bitalg-encoding.s +++ b/llvm/test/MC/X86/avx512vl_bitalg-encoding.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vl,+avx512bitalg --show-encoding < %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s // CHECK: vpopcntb %xmm23, %xmm21 // CHECK: encoding: [0x62,0xa2,0x7d,0x08,0x54,0xef] diff --git a/llvm/test/MC/X86/avx512vl_gfni-encoding.s b/llvm/test/MC/X86/avx512vl_gfni-encoding.s index 706ce90c7b84..a44211332de6 100644 --- a/llvm/test/MC/X86/avx512vl_gfni-encoding.s +++ b/llvm/test/MC/X86/avx512vl_gfni-encoding.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mattr=+gfni,+avx512vl,+avx512bw --show-encoding < %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s // CHECK: vgf2p8affineinvqb $7, %xmm2, %xmm20, %xmm1 // CHECK: encoding: [0x62,0xf3,0xdd,0x00,0xcf,0xca,0x07] diff --git a/llvm/test/MC/X86/avx512vl_vaes-encoding.s b/llvm/test/MC/X86/avx512vl_vaes-encoding.s index 1ae1d0c8685f..ade414f1ed6a 100644 --- a/llvm/test/MC/X86/avx512vl_vaes-encoding.s +++ b/llvm/test/MC/X86/avx512vl_vaes-encoding.s @@ -1,4 +1,4 @@ -//RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=skx -mattr=+vaes --show-encoding < %s | FileCheck %s +//RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s // CHECK: vaesenc %xmm3, %xmm2, %xmm21 // CHECK: encoding: [0x62,0xe2,0x6d,0x08,0xdc,0xeb] diff --git a/llvm/test/MC/X86/avx512vl_vnni-encoding.s b/llvm/test/MC/X86/avx512vl_vnni-encoding.s index 9c38803f7f28..04ace0495e8a 100644 --- a/llvm/test/MC/X86/avx512vl_vnni-encoding.s +++ b/llvm/test/MC/X86/avx512vl_vnni-encoding.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vnni,+avx512vl --show-encoding < %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s // CHECK: vpdpbusd %xmm3, %xmm2, %xmm1 // CHECK: encoding: [0x62,0xf2,0x6d,0x08,0x50,0xcb] diff --git a/llvm/test/MC/X86/avx512vlvpclmul.s b/llvm/test/MC/X86/avx512vlvpclmul.s index 1201764171e5..d411798bdc76 100644 --- a/llvm/test/MC/X86/avx512vlvpclmul.s +++ b/llvm/test/MC/X86/avx512vlvpclmul.s @@ -1,4 +1,4 @@ -//RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=skx -mattr=+vpclmulqdq --show-encoding < %s | FileCheck %s +//RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s // CHECK: vpclmulqdq $1, %xmm3, %xmm22, %xmm1 // CHECK: encoding: [0x62,0xf3,0x4d,0x00,0x44,0xcb,0x01] diff --git a/llvm/test/MC/X86/avx512vnni-encoding.s b/llvm/test/MC/X86/avx512vnni-encoding.s index f12930ee23f6..3ece620cdd83 100644 --- a/llvm/test/MC/X86/avx512vnni-encoding.s +++ b/llvm/test/MC/X86/avx512vnni-encoding.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vnni --show-encoding < %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s // CHECK: vpdpbusd %zmm3, %zmm2, %zmm1 // CHECK: encoding: [0x62,0xf2,0x6d,0x48,0x50,0xcb] diff --git a/llvm/test/MC/X86/avx512vpclmul.s b/llvm/test/MC/X86/avx512vpclmul.s index c2f352695816..2a05b56cb3d7 100644 --- a/llvm/test/MC/X86/avx512vpclmul.s +++ b/llvm/test/MC/X86/avx512vpclmul.s @@ -1,4 +1,4 @@ -//RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+vpclmulqdq --show-encoding < %s | FileCheck %s +//RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s // CHECK: vpclmulqdq $1, %zmm3, %zmm22, %zmm1 // CHECK: encoding: [0x62,0xf3,0x4d,0x40,0x44,0xcb,0x01] diff --git a/llvm/test/MC/X86/avx_vaes-encoding.s b/llvm/test/MC/X86/avx_vaes-encoding.s index e170d4384749..40f45e6e3894 100644 --- a/llvm/test/MC/X86/avx_vaes-encoding.s +++ b/llvm/test/MC/X86/avx_vaes-encoding.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mattr=vaes --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s // CHECK: vaesenc %ymm3, %ymm2, %ymm1 // CHECK: encoding: [0xc4,0xe2,0x6d,0xdc,0xcb] diff --git a/llvm/test/MC/X86/cet-encoding.s b/llvm/test/MC/X86/cet-encoding.s index d1bbc704b827..10c3c3ddabbe 100644 --- a/llvm/test/MC/X86/cet-encoding.s +++ b/llvm/test/MC/X86/cet-encoding.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mattr=+shstk -mattr=+ibt --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s // CHECK: incsspd %r13d // CHECK: # encoding: [0xf3,0x41,0x0f,0xae,0xed] diff --git a/llvm/test/MC/X86/gather.s b/llvm/test/MC/X86/gather.s index 0af6173688d5..4a2509e62f79 100644 --- a/llvm/test/MC/X86/gather.s +++ b/llvm/test/MC/X86/gather.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mattr=avx512f -show-encoding %s > %t 2> %t.err +// RUN: llvm-mc -triple x86_64-unknown-unknown -show-encoding %s > %t 2> %t.err // RUN: FileCheck < %t %s // RUN: FileCheck --check-prefix=CHECK-STDERR < %t.err %s diff --git a/llvm/test/MC/X86/gfni-encoding.s b/llvm/test/MC/X86/gfni-encoding.s index 754220471a34..669c130b83fa 100644 --- a/llvm/test/MC/X86/gfni-encoding.s +++ b/llvm/test/MC/X86/gfni-encoding.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mattr=+gfni --show-encoding < %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding < %s | FileCheck %s // CHECK: gf2p8affineinvqb $7, %xmm2, %xmm1 // CHECK: encoding: [0x66,0x0f,0x3a,0xcf,0xca,0x07] diff --git a/llvm/test/MC/X86/intel-syntax-avx512-error.s b/llvm/test/MC/X86/intel-syntax-avx512-error.s index 6e9925f4d7a7..3454e3752a17 100644 --- a/llvm/test/MC/X86/intel-syntax-avx512-error.s +++ b/llvm/test/MC/X86/intel-syntax-avx512-error.s @@ -1,4 +1,4 @@ -// RUN: not llvm-mc %s -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512f -x86-asm-syntax=intel -output-asm-variant=1 -o /dev/null 2>&1 | FileCheck %s +// RUN: not llvm-mc %s -triple x86_64-unknown-unknown -x86-asm-syntax=intel -output-asm-variant=1 -o /dev/null 2>&1 | FileCheck %s // Validate that only OpMask/Zero mark may immediately follow destination vfmsub213ps zmm8{rn-sae} {k2}, zmm8, zmm8 diff --git a/llvm/test/MC/X86/intel-syntax-avx512.s b/llvm/test/MC/X86/intel-syntax-avx512.s index 528920ef4c3e..d8ad3c442617 100644 --- a/llvm/test/MC/X86/intel-syntax-avx512.s +++ b/llvm/test/MC/X86/intel-syntax-avx512.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel -output-asm-variant=1 -mcpu=knl --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s // CHECK: vaddps zmm1, zmm1, zmmword ptr [rax] // CHECK: encoding: [0x62,0xf1,0x74,0x48,0x58,0x08] diff --git a/llvm/test/MC/X86/intel-syntax-unsized-memory.s b/llvm/test/MC/X86/intel-syntax-unsized-memory.s index c9d8e2a5f7c8..c938d76498ee 100644 --- a/llvm/test/MC/X86/intel-syntax-unsized-memory.s +++ b/llvm/test/MC/X86/intel-syntax-unsized-memory.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel -mcpu=knl %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel %s | FileCheck %s // Check that we deduce unsized memory operands in the general, unambiguous, case. // We can't deduce xword memory operands, because there is no instruction diff --git a/llvm/test/MC/X86/intel-syntax-x86-64-avx512f_vl.s b/llvm/test/MC/X86/intel-syntax-x86-64-avx512f_vl.s index 0e812ddaa784..b98d230fad2f 100644 --- a/llvm/test/MC/X86/intel-syntax-x86-64-avx512f_vl.s +++ b/llvm/test/MC/X86/intel-syntax-x86-64-avx512f_vl.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vl,+avx512dq -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s // CHECK: vcmppd k3, xmm27, xmm23, 171 // CHECK: encoding: [0x62,0xb1,0xa5,0x00,0xc2,0xdf,0xab] diff --git a/llvm/test/MC/X86/intel-syntax-x86-avx512dq_vl.s b/llvm/test/MC/X86/intel-syntax-x86-avx512dq_vl.s index 9fa08380a4b1..7693caba4501 100644 --- a/llvm/test/MC/X86/intel-syntax-x86-avx512dq_vl.s +++ b/llvm/test/MC/X86/intel-syntax-x86-avx512dq_vl.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vl -mattr=+avx512dq -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s // CHECK: vcvtps2qq xmm2 {k2} {z}, qword ptr [rcx + 128] // CHECK: encoding: [0x62,0xf1,0x7d,0x8a,0x7b,0x51,0x10] @@ -47,7 +47,6 @@ // CHECK: vcvttps2uqq xmm1, qword ptr [rcx + 128] // CHECK: encoding: [0x62,0xf1,0x7d,0x08,0x78,0x49,0x10] vcvttps2uqq xmm1, qword ptr [rcx + 128] -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vl -mattr=+avx512dq -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s // CHECK: vcvtps2qq xmm2 {k2} {z}, qword ptr [rcx + 128] // CHECK: encoding: [0x62,0xf1,0x7d,0x8a,0x7b,0x51,0x10] diff --git a/llvm/test/MC/X86/intel-syntax-x86-avx512vbmi_vl.s b/llvm/test/MC/X86/intel-syntax-x86-avx512vbmi_vl.s index f4809382e181..758b0938c796 100644 --- a/llvm/test/MC/X86/intel-syntax-x86-avx512vbmi_vl.s +++ b/llvm/test/MC/X86/intel-syntax-x86-avx512vbmi_vl.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vl,+avx512vbmi -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s // CHECK: vpmultishiftqb xmm1, xmm2, qword ptr [rcx]{1to2} // CHECK: encoding: [0x62,0xf2,0xed,0x18,0x83,0x09] diff --git a/llvm/test/MC/X86/mpx-encodings.s b/llvm/test/MC/X86/mpx-encodings.s index 7688879e8aa4..3aaab2c54ecd 100644 --- a/llvm/test/MC/X86/mpx-encodings.s +++ b/llvm/test/MC/X86/mpx-encodings.s @@ -1,8 +1,8 @@ -// RUN: llvm-mc -triple x86_64-- -mattr=+mpx --show-encoding %s |\ +// RUN: llvm-mc -triple x86_64-- --show-encoding %s |\ // RUN: FileCheck %s --check-prefixes=CHECK,ENCODING -// RUN: llvm-mc -triple x86_64-- -mattr=+mpx -filetype=obj %s |\ -// RUN: llvm-objdump -d - -mattr=+mpx | FileCheck %s +// RUN: llvm-mc -triple x86_64-- -filetype=obj %s |\ +// RUN: llvm-objdump -d - | FileCheck %s // CHECK: bndmk (%rax), %bnd0 // ENCODING: encoding: [0xf3,0x48,0x0f,0x1b,0x00] diff --git a/llvm/test/MC/X86/vpclmulqdq.s b/llvm/test/MC/X86/vpclmulqdq.s index f2c88ddd1980..a48d531e83d5 100644 --- a/llvm/test/MC/X86/vpclmulqdq.s +++ b/llvm/test/MC/X86/vpclmulqdq.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mattr=+vpclmulqdq --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s // CHECK: vpclmulqdq $17, %ymm3, %ymm2, %ymm1 // CHECK: encoding: [0xc4,0xe3,0x6d,0x44,0xcb,0x11] diff --git a/llvm/test/MC/X86/x86-64-avx512bw.s b/llvm/test/MC/X86/x86-64-avx512bw.s index e1f42161103f..1cc0f80e84b2 100644 --- a/llvm/test/MC/X86/x86-64-avx512bw.s +++ b/llvm/test/MC/X86/x86-64-avx512bw.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512bw --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s // CHECK: vpaddb %zmm23, %zmm24, %zmm19 // CHECK: encoding: [0x62,0xa1,0x3d,0x40,0xfc,0xdf] diff --git a/llvm/test/MC/X86/x86-64-avx512bw_vl.s b/llvm/test/MC/X86/x86-64-avx512bw_vl.s index 191cff2258f8..05059d6a2513 100644 --- a/llvm/test/MC/X86/x86-64-avx512bw_vl.s +++ b/llvm/test/MC/X86/x86-64-avx512bw_vl.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512bw -mattr=+avx512vl --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s // CHECK: vpaddb %xmm22, %xmm17, %xmm26 // CHECK: encoding: [0x62,0x21,0x75,0x00,0xfc,0xd6] diff --git a/llvm/test/MC/X86/x86-64-avx512cd.s b/llvm/test/MC/X86/x86-64-avx512cd.s index 49c5ccfa3637..54cbdcb05643 100644 --- a/llvm/test/MC/X86/x86-64-avx512cd.s +++ b/llvm/test/MC/X86/x86-64-avx512cd.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512cd --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s // CHECK: vplzcntq %zmm22, %zmm21 // CHECK: encoding: [0x62,0xa2,0xfd,0x48,0x44,0xee] @@ -359,7 +359,6 @@ // CHECK: vpconflictd (%rcx){1to16}, %zmm25 // CHECK: encoding: [0x62,0x62,0x7d,0x58,0xc4,0x09] vpconflictd (%rcx){1to16}, %zmm25 -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512cd --show-encoding %s | FileCheck %s // CHECK: vpconflictd 4064(%rdx), %zmm25 // CHECK: encoding: [0x62,0x62,0x7d,0x48,0xc4,0x8a,0xe0,0x0f,0x00,0x00] diff --git a/llvm/test/MC/X86/x86-64-avx512cd_vl.s b/llvm/test/MC/X86/x86-64-avx512cd_vl.s index ddaeae69a92c..8919f9b06c83 100644 --- a/llvm/test/MC/X86/x86-64-avx512cd_vl.s +++ b/llvm/test/MC/X86/x86-64-avx512cd_vl.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512cd -mattr=+avx512vl --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s // CHECK: vplzcntq %xmm20, %xmm18 // CHECK: encoding: [0x62,0xa2,0xfd,0x08,0x44,0xd4] diff --git a/llvm/test/MC/X86/x86-64-avx512dq.s b/llvm/test/MC/X86/x86-64-avx512dq.s index ed46ae7c5997..91014a7cb439 100644 --- a/llvm/test/MC/X86/x86-64-avx512dq.s +++ b/llvm/test/MC/X86/x86-64-avx512dq.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512dq --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s // CHECK: vpmullq %zmm18, %zmm24, %zmm18 // CHECK: encoding: [0x62,0xa2,0xbd,0x40,0x40,0xd2] diff --git a/llvm/test/MC/X86/x86-64-avx512dq_vl.s b/llvm/test/MC/X86/x86-64-avx512dq_vl.s index eef6b0cf33e2..59f0ad0ff8a4 100644 --- a/llvm/test/MC/X86/x86-64-avx512dq_vl.s +++ b/llvm/test/MC/X86/x86-64-avx512dq_vl.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512dq -mattr=+avx512vl --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s // CHECK: vpmullq %xmm22, %xmm17, %xmm26 // CHECK: encoding: [0x62,0x22,0xf5,0x00,0x40,0xd6] diff --git a/llvm/test/MC/X86/x86-64-avx512f_vl.s b/llvm/test/MC/X86/x86-64-avx512f_vl.s index 8031c097a1e5..b960f061cff8 100644 --- a/llvm/test/MC/X86/x86-64-avx512f_vl.s +++ b/llvm/test/MC/X86/x86-64-avx512f_vl.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=knl -mattr=+avx512vl --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s // CHECK: vaddpd %xmm19, %xmm29, %xmm20 // CHECK: encoding: [0x62,0xa1,0x95,0x00,0x58,0xe3] diff --git a/llvm/test/MC/X86/x86-64-avx512vpopcntdq.s b/llvm/test/MC/X86/x86-64-avx512vpopcntdq.s index 925d2c6308e4..2f74be79167d 100644 --- a/llvm/test/MC/X86/x86-64-avx512vpopcntdq.s +++ b/llvm/test/MC/X86/x86-64-avx512vpopcntdq.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-unknown-unknown -mattr=+avx512vpopcntdq --show-encoding %s | FileCheck %s +// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s // CHECK: vpopcntq %zmm25, %zmm20 // CHECK: encoding: [0x62,0x82,0xfd,0x48,0x55,0xe1] diff --git a/llvm/test/MC/X86/x86_errors.s b/llvm/test/MC/X86/x86_errors.s index ad8a8a7a23dd..5050af355cb7 100644 --- a/llvm/test/MC/X86/x86_errors.s +++ b/llvm/test/MC/X86/x86_errors.s @@ -11,10 +11,6 @@ cmp $0, 0(%eax) // 32: error: register %rax is only available in 64-bit mode addl $0, 0(%rax) -// 32: error: register %xmm16 is only available in 64-bit mode -// 64: error: register %xmm16 is only available with AVX512 -vaddps %xmm16, %xmm0, %xmm0 - // 32: test.s:8:2: error: invalid instruction mnemonic 'movi' # 8 "test.s"