diff options
author | Reid Kleckner <rnk@google.com> | 2017-12-18 20:58:25 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2017-12-18 20:58:25 +0000 |
commit | b198292af1b454a685e6632e32fb027338a9969f (patch) | |
tree | 9386e54e52303502466e2f005d7495c4e769a974 /utils | |
parent | 7c48f0a7688e476533ea4e6bfef444e3af17ba3e (diff) |
Revert "[AArch64][SVE] Asm" changes, they broke libjpeg_turbo
This reverts changes r320992, r320986, r320973, and r320970.
r320970 by itself breaks the test case, and the rest depend on it.
Test case will land soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321024 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/AsmMatcherEmitter.cpp | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp index f2d304bfcf5..1a820a54c60 100644 --- a/utils/TableGen/AsmMatcherEmitter.cpp +++ b/utils/TableGen/AsmMatcherEmitter.cpp @@ -2764,8 +2764,7 @@ static void emitCustomOperandParsing(raw_ostream &OS, CodeGenTarget &Target, // a better error handling. OS << "OperandMatchResultTy " << Target.getName() << ClassName << "::\n" << "MatchOperandParserImpl(OperandVector" - << " &Operands,\n StringRef Mnemonic,\n" - << " bool ParseForAllFeatures) {\n"; + << " &Operands,\n StringRef Mnemonic) {\n"; // Emit code to get the available features. OS << " // Get the current feature set.\n"; @@ -2803,9 +2802,10 @@ static void emitCustomOperandParsing(raw_ostream &OS, CodeGenTarget &Target, // Emit check that the required features are available. OS << " // check if the available features match\n"; - OS << " if (!ParseForAllFeatures && (AvailableFeatures & " - "it->RequiredFeatures) != it->RequiredFeatures)\n"; - OS << " continue;\n\n"; + OS << " if ((AvailableFeatures & it->RequiredFeatures) " + << "!= it->RequiredFeatures) {\n"; + OS << " continue;\n"; + OS << " }\n\n"; // Emit check to ensure the operand number matches. OS << " // check if the operand in question has a custom parser.\n"; @@ -2993,8 +2993,7 @@ void AsmMatcherEmitter::run(raw_ostream &OS) { if (!Info.OperandMatchInfo.empty()) { OS << " OperandMatchResultTy MatchOperandParserImpl(\n"; OS << " OperandVector &Operands,\n"; - OS << " StringRef Mnemonic,\n"; - OS << " bool ParseForAllFeatures = false);\n"; + OS << " StringRef Mnemonic);\n"; OS << " OperandMatchResultTy tryCustomParseOperand(\n"; OS << " OperandVector &Operands,\n"; @@ -3270,9 +3269,7 @@ void AsmMatcherEmitter::run(raw_ostream &OS) { OS << " for (const MatchEntry *it = MnemonicRange.first, " << "*ie = MnemonicRange.second;\n"; OS << " it != ie; ++it) {\n"; - OS << " bool HasRequiredFeatures =\n"; - OS << " (AvailableFeatures & it->RequiredFeatures) == " - "it->RequiredFeatures;\n"; + OS << " DEBUG_WITH_TYPE(\"asm-matcher\", dbgs() << \"Trying to match opcode \"\n"; OS << " << MII.getName(it->Opcode) << \"\\n\");\n"; @@ -3363,8 +3360,7 @@ void AsmMatcherEmitter::run(raw_ostream &OS) { OS << " }\n"; OS << " // If the target matcher returned a specific error code use\n"; OS << " // that, else use the one from the generic matcher.\n"; - OS << " if (TargetDiag != Match_InvalidOperand && " - "HasRequiredFeatures)\n"; + OS << " if (TargetDiag != Match_InvalidOperand)\n"; OS << " Diag = TargetDiag;\n"; OS << " }\n"; OS << " // If current formal operand wasn't matched and it is optional\n" @@ -3406,8 +3402,7 @@ void AsmMatcherEmitter::run(raw_ostream &OS) { OS << " // target predicate, that diagnostic is preferred.\n"; OS << " if (!HadMatchOtherThanPredicate &&\n"; OS << " (it == MnemonicRange.first || ErrorInfo <= ActualIdx)) {\n"; - OS << " if (HasRequiredFeatures && (ErrorInfo != ActualIdx || Diag " - "!= Match_InvalidOperand))\n"; + OS << " if (Diag != Match_InvalidOperand || ErrorInfo != ActualIdx)\n"; OS << " RetCode = Diag;\n"; OS << " ErrorInfo = ActualIdx;\n"; OS << " }\n"; @@ -3428,7 +3423,8 @@ void AsmMatcherEmitter::run(raw_ostream &OS) { OS << " }\n"; // Emit check that the required features are available. - OS << " if (!HasRequiredFeatures) {\n"; + OS << " if ((AvailableFeatures & it->RequiredFeatures) " + << "!= it->RequiredFeatures) {\n"; if (!ReportMultipleNearMisses) OS << " HadMatchOtherThanFeatures = true;\n"; OS << " uint64_t NewMissingFeatures = it->RequiredFeatures & " |