[llvm] [RISCV] Report all near-miss reasons in the AsmParser (PR #205721)
Mark Zhuang via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 08:24:41 PDT 2026
https://github.com/zqb-all updated https://github.com/llvm/llvm-project/pull/205721
>From 63d86029a8730d1ff8067b2dbc13286fd9b5c595 Mon Sep 17 00:00:00 2001
From: Mark Zhuang <mark.zhuang at spacemit.com>
Date: Wed, 24 Jun 2026 00:51:18 -0600
Subject: [PATCH 1/8] [RISCV] Report all near-miss reasons in the AsmParser
Set ReportMultipleNearMisses and switch RISCVAsmParser to the shared
near-miss reporting used by ARM, so a failed match lists every reason
instead of just the first one.
Assisted-by: claude-opus
---
.../Target/RISCV/AsmParser/RISCVAsmParser.cpp | 571 +++++++------
llvm/lib/Target/RISCV/RISCV.td | 1 +
llvm/test/MC/RISCV/XTHeadBa-invalid.s | 4 +-
llvm/test/MC/RISCV/corev/XCValu-invalid.s | 62 +-
.../test/MC/RISCV/corev/XCVbitmanip-invalid.s | 52 +-
llvm/test/MC/RISCV/corev/XCVmac-invalid.s | 44 +-
llvm/test/MC/RISCV/corev/XCVmem-invalid.s | 136 ++--
llvm/test/MC/RISCV/corev/XCVsimd-invalid.s | 755 +++++++++---------
llvm/test/MC/RISCV/function-call-invalid.s | 2 +-
llvm/test/MC/RISCV/insn-invalid.s | 10 +-
llvm/test/MC/RISCV/insn_c-invalid.s | 8 +-
llvm/test/MC/RISCV/insn_xqci-invalid.s | 16 +-
llvm/test/MC/RISCV/priv-invalid.s | 30 +-
llvm/test/MC/RISCV/rv32c-invalid.s | 14 +-
llvm/test/MC/RISCV/rv32d-invalid.s | 4 +-
llvm/test/MC/RISCV/rv32dc-invalid.s | 4 +-
llvm/test/MC/RISCV/rv32f-invalid.s | 4 +-
llvm/test/MC/RISCV/rv32fc-invalid.s | 4 +-
llvm/test/MC/RISCV/rv32h-invalid.s | 5 +-
llvm/test/MC/RISCV/rv32i-aliases-invalid.s | 134 +++-
llvm/test/MC/RISCV/rv32i-invalid.s | 32 +-
llvm/test/MC/RISCV/rv32q-invalid.s | 4 +-
llvm/test/MC/RISCV/rv32xqccmp-invalid.s | 8 +-
llvm/test/MC/RISCV/rv32xtheadbs-invalid.s | 2 +-
.../test/MC/RISCV/rv32xtheadmempair-invalid.s | 24 +-
llvm/test/MC/RISCV/rv32zalrsc-invalid.s | 2 +-
llvm/test/MC/RISCV/rv32zba-invalid.s | 6 +-
llvm/test/MC/RISCV/rv32zbb-invalid.s | 30 +-
llvm/test/MC/RISCV/rv32zbc-invalid.s | 6 +-
llvm/test/MC/RISCV/rv32zbkc-invalid.s | 4 +-
llvm/test/MC/RISCV/rv32zbkx-invalid.s | 4 +-
llvm/test/MC/RISCV/rv32zbs-invalid.s | 16 +-
llvm/test/MC/RISCV/rv32zclsd-invalid.s | 12 +-
llvm/test/MC/RISCV/rv32zcmop-invalid.s | 6 +-
llvm/test/MC/RISCV/rv32zcmp-invalid.s | 6 +-
llvm/test/MC/RISCV/rv32zdinx-invalid.s | 4 +-
llvm/test/MC/RISCV/rv32zfh-invalid.s | 8 +-
llvm/test/MC/RISCV/rv32zfinx-invalid.s | 4 +-
llvm/test/MC/RISCV/rv32zhinx-invalid.s | 4 +-
llvm/test/MC/RISCV/rv32zhinxmin-invalid.s | 4 +-
llvm/test/MC/RISCV/rv32zimop-invalid.s | 4 +-
llvm/test/MC/RISCV/rv64c-invalid.s | 12 +-
llvm/test/MC/RISCV/rv64d-invalid.s | 12 +-
llvm/test/MC/RISCV/rv64f-invalid.s | 8 +-
llvm/test/MC/RISCV/rv64h-invalid.s | 4 +-
llvm/test/MC/RISCV/rv64i-aliases-invalid.s | 124 ++-
llvm/test/MC/RISCV/rv64p-invalid.s | 6 +-
llvm/test/MC/RISCV/rv64q-invalid.s | 8 +-
llvm/test/MC/RISCV/rv64xqccmp-invalid.s | 4 +-
.../test/MC/RISCV/rv64xtheadfmemidx-invalid.s | 6 +-
llvm/test/MC/RISCV/rv64xtheadmemidx-invalid.s | 10 +-
.../test/MC/RISCV/rv64xtheadmempair-invalid.s | 16 +-
llvm/test/MC/RISCV/rv64zalrsc-invalid.s | 2 +-
llvm/test/MC/RISCV/rv64zba-invalid.s | 10 +-
llvm/test/MC/RISCV/rv64zbb-invalid.s | 12 +-
llvm/test/MC/RISCV/rv64zbs-invalid.s | 16 +-
llvm/test/MC/RISCV/rv64zcmp-invalid.s | 4 +-
llvm/test/MC/RISCV/rv64zdinx-invalid.s | 6 +-
llvm/test/MC/RISCV/rv64zfh-invalid.s | 8 +-
llvm/test/MC/RISCV/rv64zfinx-invalid.s | 6 +-
llvm/test/MC/RISCV/rv64zhinx-invalid.s | 6 +-
llvm/test/MC/RISCV/rv64zhinxmin-invalid.s | 10 +-
llvm/test/MC/RISCV/rva-aliases-invalid.s | 46 +-
llvm/test/MC/RISCV/rvc-hints-invalid.s | 4 +-
llvm/test/MC/RISCV/rve-invalid.s | 6 +-
llvm/test/MC/RISCV/rvi-pseudos-invalid.s | 8 +-
llvm/test/MC/RISCV/rvv/invalid-alt.s | 4 +-
llvm/test/MC/RISCV/rvv/invalid.s | 23 +-
llvm/test/MC/RISCV/rvv/xsfmm-invalid.s | 8 +-
llvm/test/MC/RISCV/rvv/zvfbdota32f-invalid.s | 4 +-
llvm/test/MC/RISCV/rvv/zvfqwbdota8f-invalid.s | 4 +-
.../test/MC/RISCV/rvv/zvfwbdota16bf-invalid.s | 4 +-
llvm/test/MC/RISCV/rvv/zvqwbdota-invalid.s | 4 +-
llvm/test/MC/RISCV/rvv/zvvfmm-invalid.s | 22 +-
llvm/test/MC/RISCV/rvv/zvvmm-invalid.s | 8 +-
llvm/test/MC/RISCV/rvv/zvvmtls-invalid.s | 4 +-
llvm/test/MC/RISCV/rvv/zvvmttls-invalid.s | 4 +-
llvm/test/MC/RISCV/rvy/rvy-basic-invalid.s | 8 +-
llvm/test/MC/RISCV/rvzfbfmin-invalid.s | 4 +-
llvm/test/MC/RISCV/rvzfhmin-invalid.s | 4 +-
llvm/test/MC/RISCV/rvzicbop-invalid.s | 4 +-
llvm/test/MC/RISCV/rvzicond-invalid.s | 6 +-
llvm/test/MC/RISCV/rvzihintntl-invalid.s | 16 +-
llvm/test/MC/RISCV/rvzihintntlc-invalid.s | 16 +-
llvm/test/MC/RISCV/smrnmi-invalid.s | 2 +-
llvm/test/MC/RISCV/tlsdesc.s | 14 +-
llvm/test/MC/RISCV/xandesperf-invalid.s | 4 +-
llvm/test/MC/RISCV/xmips-invalid.s | 12 +-
llvm/test/MC/RISCV/xqci-access-pseudos.s | 60 +-
llvm/test/MC/RISCV/xqcia-invalid.s | 102 +--
llvm/test/MC/RISCV/xqciac-invalid.s | 6 +-
llvm/test/MC/RISCV/xqcibi-invalid.s | 48 +-
llvm/test/MC/RISCV/xqcibm-invalid.s | 250 +++---
llvm/test/MC/RISCV/xqcicli-invalid.s | 84 +-
llvm/test/MC/RISCV/xqcicm-invalid.s | 26 +-
llvm/test/MC/RISCV/xqcics-invalid.s | 16 +-
llvm/test/MC/RISCV/xqcicsr-invalid.s | 8 +-
llvm/test/MC/RISCV/xqciint-invalid.s | 40 +-
llvm/test/MC/RISCV/xqciio-invalid.s | 10 +-
llvm/test/MC/RISCV/xqcilb-invalid.s | 4 +-
llvm/test/MC/RISCV/xqcili-invalid.s | 12 +-
llvm/test/MC/RISCV/xqcilia-invalid.s | 32 +-
llvm/test/MC/RISCV/xqcilo-invalid.s | 32 +-
llvm/test/MC/RISCV/xqcilo-pseudos-invalid.s | 60 +-
llvm/test/MC/RISCV/xqcilsm-invalid.s | 24 +-
llvm/test/MC/RISCV/xqcisim-invalid.s | 50 +-
llvm/test/MC/RISCV/xqcisls-invalid.s | 64 +-
llvm/test/MC/RISCV/xqcisync-invalid.s | 36 +-
llvm/test/MC/RISCV/xsifive-invalid.s | 8 +-
llvm/test/MC/RISCV/xtheadcmo-invalid.s | 16 +-
llvm/test/MC/RISCV/xtheadcondmov-invalid.s | 8 +-
llvm/test/MC/RISCV/xtheadmac-invalid.s | 4 +-
llvm/test/MC/RISCV/xtheadsync-invalid.s | 10 +-
113 files changed, 1926 insertions(+), 1667 deletions(-)
diff --git a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
index cfc943d3fe25f..057eca5e83654 100644
--- a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+++ b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
@@ -16,6 +16,7 @@
#include "TargetInfo/RISCVTargetInfo.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallBitVector.h"
+#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringExtras.h"
@@ -37,11 +38,13 @@
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
+#include "llvm/Support/Debug.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/RISCVAttributes.h"
#include "llvm/TargetParser/RISCVISAInfo.h"
#include <limits>
+#include <map>
#include <optional>
using namespace llvm;
@@ -98,12 +101,22 @@ class RISCVAsmParser : public MCTargetAsmParser {
unsigned validateTargetOperandClass(MCParsedAsmOperand &Op,
unsigned Kind) override;
- bool generateImmOutOfRangeError(OperandVector &Operands, uint64_t ErrorInfo,
- int64_t Lower, int64_t Upper,
- const Twine &Msg);
bool generateImmOutOfRangeError(SMLoc ErrorLoc, int64_t Lower, int64_t Upper,
const Twine &Msg);
+ struct NearMissMessage {
+ SMLoc Loc;
+ std::string Message;
+ };
+
+ std::string getCustomOperandDiag(unsigned MatchError);
+
+ void FilterNearMisses(SmallVectorImpl<NearMissInfo> &NearMissesIn,
+ SmallVectorImpl<NearMissMessage> &NearMissesOut,
+ SMLoc IDLoc, OperandVector &Operands);
+ void ReportNearMisses(SmallVectorImpl<NearMissInfo> &NearMisses, SMLoc IDLoc,
+ OperandVector &Operands);
+
bool matchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
OperandVector &Operands, MCStreamer &Out,
uint64_t &ErrorInfo,
@@ -1460,350 +1473,376 @@ bool RISCVAsmParser::generateImmOutOfRangeError(
return Error(ErrorLoc, Msg + " [" + Twine(Lower) + ", " + Twine(Upper) + "]");
}
-bool RISCVAsmParser::generateImmOutOfRangeError(
- OperandVector &Operands, uint64_t ErrorInfo, int64_t Lower, int64_t Upper,
- const Twine &Msg = "immediate must be an integer in the range") {
- SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc();
- return generateImmOutOfRangeError(ErrorLoc, Lower, Upper, Msg);
-}
-
-bool RISCVAsmParser::matchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
- OperandVector &Operands,
- MCStreamer &Out,
- uint64_t &ErrorInfo,
- bool MatchingInlineAsm) {
- MCInst Inst;
- FeatureBitset MissingFeatures;
-
- auto Result = MatchInstructionImpl(Operands, Inst, ErrorInfo, MissingFeatures,
- MatchingInlineAsm);
- switch (Result) {
- default:
- break;
- case Match_Success:
- if (validateInstruction(Inst, Operands))
- return true;
- return processInstruction(Inst, IDLoc, Operands, Out);
- case Match_MissingFeature: {
- assert(MissingFeatures.any() && "Unknown missing features!");
- bool FirstFeature = true;
- std::string Msg = "instruction requires the following:";
- for (unsigned i = 0, e = MissingFeatures.size(); i != e; ++i) {
- if (MissingFeatures[i]) {
- Msg += FirstFeature ? " " : ", ";
- Msg += getSubtargetFeatureName(i);
- FirstFeature = false;
- }
- }
- return Error(IDLoc, Msg);
- }
- case Match_MnemonicFail: {
- FeatureBitset FBS = ComputeAvailableFeatures(getSTI().getFeatureBits());
- std::string Suggestion = RISCVMnemonicSpellCheck(
- ((RISCVOperand &)*Operands[0]).getToken(), FBS, 0);
- return Error(IDLoc, "unrecognized instruction mnemonic" + Suggestion);
- }
- case Match_InvalidOperand: {
- SMLoc ErrorLoc = IDLoc;
- if (ErrorInfo != ~0ULL) {
- if (ErrorInfo >= Operands.size())
- return Error(ErrorLoc, "too few operands for instruction");
-
- ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc();
- if (ErrorLoc == SMLoc())
- ErrorLoc = IDLoc;
- }
- return Error(ErrorLoc, "invalid operand for instruction");
- }
- }
-
- // Handle the case when the error message is of specific type
- // other than the generic Match_InvalidOperand, and the
- // corresponding operand is missing.
- if (Result > FIRST_TARGET_MATCH_RESULT_TY) {
- SMLoc ErrorLoc = IDLoc;
- if (ErrorInfo != ~0ULL && ErrorInfo >= Operands.size())
- return Error(ErrorLoc, "too few operands for instruction");
- }
+// Some diagnostics need to vary with subtarget features, so they are handled
+// here. For example, several immediate ranges depend on whether the target is
+// RV32 or RV64.
+std::string RISCVAsmParser::getCustomOperandDiag(unsigned MatchError) {
+ auto Range = [](int64_t Lower, int64_t Upper,
+ StringRef Msg = "immediate must be an integer in the range") {
+ return (Msg + " [" + Twine(Lower) + ", " + Twine(Upper) + "]").str();
+ };
- switch (Result) {
+ switch (MatchError) {
default:
- break;
+ // For all other operand diagnostics, use the static string generated by
+ // TableGen from the DiagnosticString field, if any.
+ if (const char *Diag = getMatchKindDiag((RISCVMatchResultTy)MatchError))
+ return Diag;
+ return std::string();
case Match_InvalidImmXLenLI:
- if (isRV64()) {
- SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc();
- return Error(ErrorLoc, "operand must be a constant 64-bit integer");
- }
- return generateImmOutOfRangeError(Operands, ErrorInfo,
- std::numeric_limits<int32_t>::min(),
- std::numeric_limits<uint32_t>::max());
+ if (isRV64())
+ return "operand must be a constant 64-bit integer";
+ return Range(std::numeric_limits<int32_t>::min(),
+ std::numeric_limits<uint32_t>::max());
case Match_InvalidImmXLenLI_Restricted:
- if (isRV64()) {
- SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc();
- return Error(ErrorLoc, "operand either must be a constant 64-bit integer "
- "or a bare symbol name");
- }
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, std::numeric_limits<int32_t>::min(),
- std::numeric_limits<uint32_t>::max(),
- "operand either must be a bare symbol name or an immediate integer in "
- "the range");
+ if (isRV64())
+ return "operand either must be a constant 64-bit integer "
+ "or a bare symbol name";
+ return Range(std::numeric_limits<int32_t>::min(),
+ std::numeric_limits<uint32_t>::max(),
+ "operand either must be a bare symbol name or an immediate "
+ "integer in the range");
case Match_InvalidUImmLog2XLen:
if (isRV64())
- return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 6) - 1);
- return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 5) - 1);
+ return Range(0, (1 << 6) - 1);
+ return Range(0, (1 << 5) - 1);
case Match_InvalidUImmLog2XLenNonZero:
if (isRV64())
- return generateImmOutOfRangeError(Operands, ErrorInfo, 1, (1 << 6) - 1);
- return generateImmOutOfRangeError(Operands, ErrorInfo, 1, (1 << 5) - 1);
+ return Range(1, (1 << 6) - 1);
+ return Range(1, (1 << 5) - 1);
case Match_InvalidUImm1:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 1) - 1);
+ return Range(0, (1 << 1) - 1);
case Match_InvalidUImm2:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 2) - 1);
+ return Range(0, (1 << 2) - 1);
case Match_InvalidUImm2Lsb0:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 0, 2,
- "immediate must be one of");
+ return Range(0, 2, "immediate must be one of");
case Match_InvalidUImm3:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 3) - 1);
+ return Range(0, (1 << 3) - 1);
case Match_InvalidUImm4:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 4) - 1);
+ return Range(0, (1 << 4) - 1);
case Match_InvalidUImm4Plus1:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 1, (1 << 4));
+ return Range(1, (1 << 4));
case Match_InvalidUImm5:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 5) - 1);
+ return Range(0, (1 << 5) - 1);
case Match_InvalidUImm5NonZero:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 1, (1 << 5) - 1);
+ return Range(1, (1 << 5) - 1);
case Match_InvalidUImm5GT3:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 4, (1 << 5) - 1);
+ return Range(4, (1 << 5) - 1);
case Match_InvalidUImm5Plus1:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 1, (1 << 5));
+ return Range(1, (1 << 5));
case Match_InvalidUImm5GE6Plus1:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 6, (1 << 5));
- case Match_InvalidUImm5Slist: {
- SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc();
- return Error(ErrorLoc,
- "immediate must be one of: 0, 1, 2, 4, 8, 15, 16, 31");
- }
+ return Range(6, (1 << 5));
+ case Match_InvalidUImm5Slist:
+ return "immediate must be one of: 0, 1, 2, 4, 8, 15, 16, 31";
case Match_InvalidUImm6:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 6) - 1);
+ return Range(0, (1 << 6) - 1);
case Match_InvalidUImm6Plus1:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 1, (1 << 6));
+ return Range(1, (1 << 6));
case Match_InvalidUImm7:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 7) - 1);
+ return Range(0, (1 << 7) - 1);
case Match_InvalidUImm8:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 8) - 1);
+ return Range(0, (1 << 8) - 1);
case Match_InvalidUImm8GE32:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 32, (1 << 8) - 1);
+ return Range(32, (1 << 8) - 1);
case Match_InvalidSImm5:
- return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 4),
- (1 << 4) - 1);
+ return Range(-(1 << 4), (1 << 4) - 1);
case Match_InvalidSImm5NonZero:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, -(1 << 4), (1 << 4) - 1,
- "immediate must be non-zero in the range");
+ return Range(-(1 << 4), (1 << 4) - 1,
+ "immediate must be non-zero in the range");
case Match_InvalidSImm6:
- return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 5),
- (1 << 5) - 1);
+ return Range(-(1 << 5), (1 << 5) - 1);
case Match_InvalidSImm6NonZero:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, -(1 << 5), (1 << 5) - 1,
- "immediate must be non-zero in the range");
+ return Range(-(1 << 5), (1 << 5) - 1,
+ "immediate must be non-zero in the range");
case Match_InvalidCLUIImm:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, 1, (1 << 5) - 1,
- "immediate must be in [0xfffe0, 0xfffff] or");
+ return Range(1, (1 << 5) - 1, "immediate must be in [0xfffe0, 0xfffff] or");
case Match_InvalidUImm5Lsb0:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, 0, (1 << 5) - 2,
- "immediate must be a multiple of 2 bytes in the range");
+ return Range(0, (1 << 5) - 2,
+ "immediate must be a multiple of 2 bytes in the range");
case Match_InvalidUImm6Lsb0:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, 0, (1 << 6) - 2,
- "immediate must be a multiple of 2 bytes in the range");
+ return Range(0, (1 << 6) - 2,
+ "immediate must be a multiple of 2 bytes in the range");
case Match_InvalidUImm7Lsb00:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, 0, (1 << 7) - 4,
- "immediate must be a multiple of 4 bytes in the range");
+ return Range(0, (1 << 7) - 4,
+ "immediate must be a multiple of 4 bytes in the range");
case Match_InvalidUImm8Lsb00:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, 0, (1 << 8) - 4,
- "immediate must be a multiple of 4 bytes in the range");
+ return Range(0, (1 << 8) - 4,
+ "immediate must be a multiple of 4 bytes in the range");
case Match_InvalidUImm8Lsb000:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, 0, (1 << 8) - 8,
- "immediate must be a multiple of 8 bytes in the range");
+ return Range(0, (1 << 8) - 8,
+ "immediate must be a multiple of 8 bytes in the range");
case Match_InvalidUImm9:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 9) - 1,
- "immediate offset must be in the range");
+ return Range(0, (1 << 9) - 1, "immediate offset must be in the range");
case Match_InvalidBareSImm9Lsb0:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, -(1 << 8), (1 << 8) - 2,
- "immediate must be a multiple of 2 bytes in the range");
+ return Range(-(1 << 8), (1 << 8) - 2,
+ "immediate must be a multiple of 2 bytes in the range");
case Match_InvalidUImm9Lsb000:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, 0, (1 << 9) - 8,
- "immediate must be a multiple of 8 bytes in the range");
+ return Range(0, (1 << 9) - 8,
+ "immediate must be a multiple of 8 bytes in the range");
case Match_InvalidSImm8PLI_B:
- return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 7),
- (1 << 8) - 1);
+ return Range(-(1 << 7), (1 << 8) - 1);
case Match_InvalidSImm10:
case Match_InvalidSImm10PLI_H:
case Match_InvalidSImm10PLI_W:
- return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 9),
- (1 << 9) - 1);
+ return Range(-(1 << 9), (1 << 9) - 1);
case Match_InvalidSImm10PLUI:
- return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 9),
- (1 << 10) - 1);
+ return Range(-(1 << 9), (1 << 10) - 1);
case Match_InvalidUImm10Lsb00NonZero:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, 4, (1 << 10) - 4,
- "immediate must be a multiple of 4 bytes in the range");
+ return Range(4, (1 << 10) - 4,
+ "immediate must be a multiple of 4 bytes in the range");
case Match_InvalidSImm10Lsb0000NonZero:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, -(1 << 9), (1 << 9) - 16,
+ return Range(
+ -(1 << 9), (1 << 9) - 16,
"immediate must be a multiple of 16 bytes and non-zero in the range");
case Match_InvalidSImm11:
- return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 10),
- (1 << 10) - 1);
+ return Range(-(1 << 10), (1 << 10) - 1);
case Match_InvalidBareSImm11Lsb0:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, -(1 << 10), (1 << 10) - 2,
- "immediate must be a multiple of 2 bytes in the range");
+ return Range(-(1 << 10), (1 << 10) - 2,
+ "immediate must be a multiple of 2 bytes in the range");
case Match_InvalidUImm10:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 10) - 1);
+ return Range(0, (1 << 10) - 1);
case Match_InvalidUImm11:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 11) - 1);
+ return Range(0, (1 << 11) - 1);
case Match_InvalidUImm14Lsb00:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, 0, (1 << 14) - 4,
- "immediate must be a multiple of 4 bytes in the range");
+ return Range(0, (1 << 14) - 4,
+ "immediate must be a multiple of 4 bytes in the range");
case Match_InvalidUImm16NonZero:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 1, (1 << 16) - 1);
+ return Range(1, (1 << 16) - 1);
case Match_InvalidSImm12:
- return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 11),
- (1 << 11) - 1);
+ return Range(-(1 << 11), (1 << 11) - 1);
case Match_InvalidSImm12LO:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, -(1 << 11), (1 << 11) - 1,
- "operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an "
- "integer in the range");
+ return Range(-(1 << 11), (1 << 11) - 1,
+ "operand must be a symbol with %lo/%pcrel_lo/%tprel_lo "
+ "specifier or an integer in the range");
case Match_InvalidBareSImm12Lsb0:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, -(1 << 11), (1 << 11) - 2,
- "immediate must be a multiple of 2 bytes in the range");
+ return Range(-(1 << 11), (1 << 11) - 2,
+ "immediate must be a multiple of 2 bytes in the range");
case Match_InvalidSImm12Lsb00000:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, -(1 << 11), (1 << 11) - 32,
- "immediate must be a multiple of 32 bytes in the range");
+ return Range(-(1 << 11), (1 << 11) - 32,
+ "immediate must be a multiple of 32 bytes in the range");
case Match_InvalidBareSImm13Lsb0:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, -(1 << 12), (1 << 12) - 2,
- "immediate must be a multiple of 2 bytes in the range");
+ return Range(-(1 << 12), (1 << 12) - 2,
+ "immediate must be a multiple of 2 bytes in the range");
case Match_InvalidSImm16:
- return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 15),
- (1 << 15) - 1);
+ return Range(-(1 << 15), (1 << 15) - 1);
case Match_InvalidSImm16NonZero:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, -(1 << 15), (1 << 15) - 1,
- "immediate must be non-zero in the range");
+ return Range(-(1 << 15), (1 << 15) - 1,
+ "immediate must be non-zero in the range");
case Match_InvalidSImm20LI:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, -(1 << 19), (1 << 19) - 1,
- "operand must be a symbol with a %qc.abs20 specifier or an integer "
- " in the range");
+ return Range(-(1 << 19), (1 << 19) - 1,
+ "operand must be a symbol with a %qc.abs20 specifier or an "
+ "integer in the range");
case Match_InvalidUImm20LUI:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, 0, (1 << 20) - 1,
- "operand must be a symbol with "
- "%hi/%tprel_hi specifier or an integer in "
- "the range");
+ return Range(0, (1 << 20) - 1,
+ "operand must be a symbol with %hi/%tprel_hi specifier or an "
+ "integer in the range");
case Match_InvalidUImm20:
- return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 20) - 1);
+ return Range(0, (1 << 20) - 1);
case Match_InvalidUImm20AUIPC:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, 0, (1 << 20) - 1,
+ return Range(
+ 0, (1 << 20) - 1,
"operand must be a symbol with a "
"%pcrel_hi/%got_pcrel_hi/%tls_ie_pcrel_hi/%tls_gd_pcrel_hi specifier "
- "or "
- "an integer in the range");
+ "or an integer in the range");
case Match_InvalidBareSImm21Lsb0:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, -(1 << 20), (1 << 20) - 2,
- "immediate must be a multiple of 2 bytes in the range");
- case Match_InvalidCSRSystemRegister: {
- return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 12) - 1,
- "operand must be a valid system register "
- "name or an integer in the range");
- }
+ return Range(-(1 << 20), (1 << 20) - 2,
+ "immediate must be a multiple of 2 bytes in the range");
+ case Match_InvalidCSRSystemRegister:
+ return Range(0, (1 << 12) - 1,
+ "operand must be a valid system register name or an integer "
+ "in the range");
case Match_InvalidImm5Zibi:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, -1, (1 << 5) - 1,
- "immediate must be non-zero in the range");
- case Match_InvalidVTypeI: {
- SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc();
- return generateVTypeError(ErrorLoc);
- }
- case Match_InvalidSImm5Plus1: {
- return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 4) + 1,
- (1 << 4),
- "immediate must be in the range");
- }
+ return Range(-1, (1 << 5) - 1, "immediate must be non-zero in the range");
+ case Match_InvalidVTypeI:
+ return "operand must be "
+ "e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]";
+ case Match_InvalidSImm5Plus1:
+ return Range(-(1 << 4) + 1, (1 << 4), "immediate must be in the range");
case Match_InvalidSImm18:
- return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 17),
- (1 << 17) - 1);
+ return Range(-(1 << 17), (1 << 17) - 1);
case Match_InvalidSImm18Lsb0:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, -(1 << 17), (1 << 17) - 2,
- "immediate must be a multiple of 2 bytes in the range");
+ return Range(-(1 << 17), (1 << 17) - 2,
+ "immediate must be a multiple of 2 bytes in the range");
case Match_InvalidSImm19Lsb00:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, -(1 << 18), (1 << 18) - 4,
- "immediate must be a multiple of 4 bytes in the range");
+ return Range(-(1 << 18), (1 << 18) - 4,
+ "immediate must be a multiple of 4 bytes in the range");
case Match_InvalidSImm20Lsb000:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, -(1 << 19), (1 << 19) - 8,
- "immediate must be a multiple of 8 bytes in the range");
+ return Range(-(1 << 19), (1 << 19) - 8,
+ "immediate must be a multiple of 8 bytes in the range");
case Match_InvalidSImm26:
- return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 25),
- (1 << 25) - 1);
+ return Range(-(1 << 25), (1 << 25) - 1);
// HACK: See comment before `BareSymbolQC_E_LI` in RISCVInstrInfoXqci.td.
case Match_InvalidBareSymbolQC_E_LI:
[[fallthrough]];
// END HACK
case Match_InvalidBareSImm32:
- return generateImmOutOfRangeError(Operands, ErrorInfo,
- std::numeric_limits<int32_t>::min(),
- std::numeric_limits<uint32_t>::max());
+ return Range(std::numeric_limits<int32_t>::min(),
+ std::numeric_limits<uint32_t>::max());
case Match_InvalidBareSImm32Lsb0:
- return generateImmOutOfRangeError(
- Operands, ErrorInfo, std::numeric_limits<int32_t>::min(),
- std::numeric_limits<int32_t>::max() - 1,
- "operand must be a multiple of 2 bytes in the range");
- case Match_InvalidRnumArg: {
- return generateImmOutOfRangeError(Operands, ErrorInfo, 0, 10);
- }
- case Match_InvalidStackAdj: {
- SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc();
- return Error(
- ErrorLoc,
- "stack adjustment is invalid for this instruction and register list");
+ return Range(std::numeric_limits<int32_t>::min(),
+ std::numeric_limits<int32_t>::max() - 1,
+ "operand must be a multiple of 2 bytes in the range");
+ case Match_InvalidRnumArg:
+ return Range(0, 10);
+ case Match_InvalidStackAdj:
+ return "stack adjustment is invalid for this instruction and register "
+ "list";
+ case Match_InvalidYBNDSWImm:
+ return "immediate must be an integer in the range "
+ "[1, 255], a multiple of 8 in the range [256, 504], "
+ "or a multiple of 16 in the range [512, 4096]";
+ case Match_InvalidUImm7EqXLen:
+ return ("immediate must be an integer equal to XLEN (" +
+ Twine(isRV64() ? "64" : "32") + ")")
+ .str();
}
- case Match_InvalidYBNDSWImm: {
- const SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc();
- return Error(ErrorLoc, "immediate must be an integer in the range "
- "[1, 255], a multiple of 8 in the range [256, 504], "
- "or a multiple of 16 in the range [512, 4096]");
- }
- case Match_InvalidUImm7EqXLen: {
- const SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc();
- return Error(ErrorLoc, "immediate must be an integer equal to XLEN (" +
- Twine(isRV64() ? "64" : "32") + ")");
+}
+
+// Process the list of near-misses, throwing away ones we don't want to report
+// to the user, and converting the rest to a source location and string that
+// should be reported.
+void RISCVAsmParser::FilterNearMisses(
+ SmallVectorImpl<NearMissInfo> &NearMissesIn,
+ SmallVectorImpl<NearMissMessage> &NearMissesOut, SMLoc IDLoc,
+ OperandVector &Operands) {
+ // Record some information about near-misses that we have already seen, so
+ // that we can avoid reporting redundant ones.
+ std::multimap<unsigned, unsigned> OperandMissesSeen;
+ SmallSet<FeatureBitset, 4> FeatureMissesSeen;
+ bool ReportedTooFewOperands = false;
+
+ for (NearMissInfo &I : NearMissesIn) {
+ switch (I.getKind()) {
+ case NearMissInfo::NearMissOperand: {
+ SMLoc OperandLoc =
+ ((RISCVOperand &)*Operands[I.getOperandIndex()]).getStartLoc();
+ std::string OperandDiag = getCustomOperandDiag(I.getOperandError());
+
+ // If we have already emitted a message for a superclass on this operand,
+ // don't also report the sub-class.
+ unsigned DupCheckMatchClass =
+ OperandDiag.empty() ? ~0U : I.getOperandClass();
+ auto PrevReports = OperandMissesSeen.equal_range(I.getOperandIndex());
+ if (std::any_of(
+ PrevReports.first, PrevReports.second,
+ [DupCheckMatchClass](const std::pair<unsigned, unsigned> Pair) {
+ if (DupCheckMatchClass == ~0U || Pair.second == ~0U)
+ return Pair.second == DupCheckMatchClass;
+ else
+ return isSubclass((MatchClassKind)DupCheckMatchClass,
+ (MatchClassKind)Pair.second);
+ }))
+ break;
+ OperandMissesSeen.insert(
+ std::make_pair(I.getOperandIndex(), DupCheckMatchClass));
+
+ NearMissMessage Message;
+ Message.Loc = OperandLoc;
+ if (!OperandDiag.empty()) {
+ Message.Message = OperandDiag;
+ } else if (I.getOperandClass() == InvalidMatchClass) {
+ Message.Message = "too many operands for instruction";
+ } else {
+ Message.Message = "invalid operand for instruction";
+ LLVM_DEBUG(
+ dbgs() << "Missing diagnostic string for operand class "
+ << getMatchClassName((MatchClassKind)I.getOperandClass())
+ << I.getOperandClass() << ", error " << I.getOperandError()
+ << ", opcode " << MII.getName(I.getOpcode()) << "\n");
+ }
+ NearMissesOut.emplace_back(Message);
+ break;
+ }
+ case NearMissInfo::NearMissFeature: {
+ const FeatureBitset &MissingFeatures = I.getFeatures();
+ // Don't report the same set of features twice.
+ if (FeatureMissesSeen.count(MissingFeatures))
+ break;
+ FeatureMissesSeen.insert(MissingFeatures);
+
+ NearMissMessage Message;
+ Message.Loc = IDLoc;
+ bool FirstFeature = true;
+ Message.Message = "instruction requires the following:";
+ for (unsigned i = 0, e = MissingFeatures.size(); i != e; ++i) {
+ if (MissingFeatures[i]) {
+ Message.Message += FirstFeature ? " " : ", ";
+ Message.Message += getSubtargetFeatureName(i);
+ FirstFeature = false;
+ }
+ }
+ NearMissesOut.emplace_back(Message);
+ break;
+ }
+ case NearMissInfo::NearMissPredicate:
+ // RISC-V does not define any target match predicates.
+ llvm_unreachable("RISC-V has no target predicate near-misses");
+ break;
+ case NearMissInfo::NearMissTooFewOperands: {
+ if (!ReportedTooFewOperands) {
+ SMLoc EndLoc = ((RISCVOperand &)*Operands.back()).getEndLoc();
+ NearMissesOut.emplace_back(
+ NearMissMessage{EndLoc, "too few operands for instruction"});
+ ReportedTooFewOperands = true;
+ }
+ break;
+ }
+ case NearMissInfo::NoNearMiss:
+ // This should never leave the matcher.
+ llvm_unreachable("not a near-miss");
+ break;
+ }
}
+}
+
+void RISCVAsmParser::ReportNearMisses(SmallVectorImpl<NearMissInfo> &NearMisses,
+ SMLoc IDLoc, OperandVector &Operands) {
+ SmallVector<NearMissMessage, 4> Messages;
+ FilterNearMisses(NearMisses, Messages, IDLoc, Operands);
+
+ if (Messages.empty()) {
+ // No near-misses were found, so the best we can do is "invalid
+ // instruction".
+ Error(IDLoc, "invalid instruction");
+ } else if (Messages.size() == 1) {
+ // One near miss was found, report it as the sole error.
+ Error(Messages[0].Loc, Messages[0].Message);
+ } else {
+ // More than one near miss, so report a generic "invalid instruction"
+ // error, followed by notes for each of the near-misses.
+ Error(IDLoc,
+ "invalid instruction, any one of the following would fix this:");
+ for (auto &M : Messages)
+ Note(M.Loc, M.Message);
}
+}
+
+bool RISCVAsmParser::matchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
+ OperandVector &Operands,
+ MCStreamer &Out,
+ uint64_t &ErrorInfo,
+ bool MatchingInlineAsm) {
+ MCInst Inst;
+ SmallVector<NearMissInfo, 4> NearMisses;
- if (const char *MatchDiag = getMatchKindDiag((RISCVMatchResultTy)Result)) {
- SMLoc ErrorLoc = ((RISCVOperand &)*Operands[ErrorInfo]).getStartLoc();
- return Error(ErrorLoc, MatchDiag);
+ auto Result =
+ MatchInstructionImpl(Operands, Inst, &NearMisses, MatchingInlineAsm);
+ switch (Result) {
+ default:
+ break;
+ case Match_Success:
+ if (validateInstruction(Inst, Operands))
+ return true;
+ return processInstruction(Inst, IDLoc, Operands, Out);
+ case Match_MnemonicFail: {
+ FeatureBitset FBS = ComputeAvailableFeatures(getSTI().getFeatureBits());
+ std::string Suggestion = RISCVMnemonicSpellCheck(
+ ((RISCVOperand &)*Operands[0]).getToken(), FBS, 0);
+ return Error(IDLoc, "unrecognized instruction mnemonic" + Suggestion);
+ }
+ case Match_NearMisses:
+ ReportNearMisses(NearMisses, IDLoc, Operands);
+ return true;
}
llvm_unreachable("Unknown match type detected!");
diff --git a/llvm/lib/Target/RISCV/RISCV.td b/llvm/lib/Target/RISCV/RISCV.td
index 7a4d8a6fd55d5..b1927224db47a 100644
--- a/llvm/lib/Target/RISCV/RISCV.td
+++ b/llvm/lib/Target/RISCV/RISCV.td
@@ -91,6 +91,7 @@ def RISCVInstrInfo : InstrInfo {
def RISCVAsmParser : AsmParser {
let ShouldEmitMatchRegisterAltName = 1;
let AllowDuplicateRegisterNames = 1;
+ let ReportMultipleNearMisses = 1;
}
def RISCVAsmWriter : AsmWriter {
diff --git a/llvm/test/MC/RISCV/XTHeadBa-invalid.s b/llvm/test/MC/RISCV/XTHeadBa-invalid.s
index 04cfdf780d096..11e80d3225043 100644
--- a/llvm/test/MC/RISCV/XTHeadBa-invalid.s
+++ b/llvm/test/MC/RISCV/XTHeadBa-invalid.s
@@ -2,9 +2,9 @@
# RUN: not llvm-mc -triple riscv64 -mattr=+xtheadba < %s 2>&1 | FileCheck %s
# Too few operands
-th.addsl t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+th.addsl t0, t1 # CHECK: :[[@LINE]]:16: error: too few operands for instruction
# Too few operands
-th.addsl t0, t1, t2 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+th.addsl t0, t1, t2 # CHECK: :[[@LINE]]:20: error: too few operands for instruction
# Immediate operand out of range
th.addsl t0, t1, t2, 4 # CHECK: :[[@LINE]]:22: error: immediate must be an integer in the range [0, 3]
# Immediate operand out of range
diff --git a/llvm/test/MC/RISCV/corev/XCValu-invalid.s b/llvm/test/MC/RISCV/corev/XCValu-invalid.s
index 550d79c44f6b8..febb363cf9580 100644
--- a/llvm/test/MC/RISCV/corev/XCValu-invalid.s
+++ b/llvm/test/MC/RISCV/corev/XCValu-invalid.s
@@ -14,7 +14,7 @@ cv.addrnr t0, t1
# CHECK-ERROR: too few operands for instruction
cv.addrnr t0, t1, t2, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.addun t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -38,7 +38,7 @@ cv.addun t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.addun t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.extbz t0, 0
# CHECK-ERROR: invalid operand for instruction
@@ -50,7 +50,7 @@ cv.extbz t0
# CHECK-ERROR: too few operands for instruction
cv.extbz t0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.addnr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -65,7 +65,7 @@ cv.addnr t0, t1
# CHECK-ERROR: too few operands for instruction
cv.addnr t0, t1, t2, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.clipu t0, t1, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -86,7 +86,7 @@ cv.clipu t0, t1
# CHECK-ERROR: too few operands for instruction
cv.clipu t0, t1, 0, 0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.minu t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -101,7 +101,7 @@ cv.minu t0, t1
# CHECK-ERROR: too few operands for instruction
cv.minu t0, t1, t2, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.abs t0, 0
# CHECK-ERROR: invalid operand for instruction
@@ -113,7 +113,7 @@ cv.abs t0
# CHECK-ERROR: too few operands for instruction
cv.abs t0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.addrn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -137,7 +137,7 @@ cv.addrn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.addrn t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.suburn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -161,7 +161,7 @@ cv.suburn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.suburn t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.clip t0, t1, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -182,7 +182,7 @@ cv.clip t0, t1
# CHECK-ERROR: too few operands for instruction
cv.clip t0, t1, 0, 0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.addunr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -197,7 +197,7 @@ cv.addunr t0, t1
# CHECK-ERROR: too few operands for instruction
cv.addunr t0, t1, t2, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.addurn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -221,7 +221,7 @@ cv.addurn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.addurn t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.subun t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -245,7 +245,7 @@ cv.subun t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.subun t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.subn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -269,7 +269,7 @@ cv.subn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.subn t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.subrnr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -284,7 +284,7 @@ cv.subrnr t0, t1
# CHECK-ERROR: too few operands for instruction
cv.subrnr t0, t1, t2, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.slet t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -299,7 +299,7 @@ cv.slet t0, t1
# CHECK-ERROR: too few operands for instruction
cv.slet t0, t1, t2, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.suburnr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -314,7 +314,7 @@ cv.suburnr t0, t1
# CHECK-ERROR: too few operands for instruction
cv.suburnr t0, t1, t2, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.maxu t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -329,7 +329,7 @@ cv.maxu t0, t1
# CHECK-ERROR: too few operands for instruction
cv.maxu t0, t1, t2, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.extbs t0, 0
# CHECK-ERROR: invalid operand for instruction
@@ -341,7 +341,7 @@ cv.extbs t0
# CHECK-ERROR: too few operands for instruction
cv.extbs t0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.exths t0, 0
# CHECK-ERROR: invalid operand for instruction
@@ -353,7 +353,7 @@ cv.exths t0
# CHECK-ERROR: too few operands for instruction
cv.exths t0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.max t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -368,7 +368,7 @@ cv.max t0, t1
# CHECK-ERROR: too few operands for instruction
cv.max t0, t1, t2, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.subunr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -383,7 +383,7 @@ cv.subunr t0, t1
# CHECK-ERROR: too few operands for instruction
cv.subunr t0, t1, t2, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.exthz t0, 0
# CHECK-ERROR: invalid operand for instruction
@@ -395,7 +395,7 @@ cv.exthz t0
# CHECK-ERROR: too few operands for instruction
cv.exthz t0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.clipur t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -410,7 +410,7 @@ cv.clipur t0, t1
# CHECK-ERROR: too few operands for instruction
cv.clipur t0, t1, t2, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.addurnr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -425,7 +425,7 @@ cv.addurnr t0, t1
# CHECK-ERROR: too few operands for instruction
cv.addurnr t0, t1, t2, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.addn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -449,7 +449,7 @@ cv.addn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.addn t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.subrn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -473,7 +473,7 @@ cv.subrn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.subrn t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.subnr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -488,7 +488,7 @@ cv.subnr t0, t1
# CHECK-ERROR: too few operands for instruction
cv.subnr t0, t1, t2, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.clipr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -503,7 +503,7 @@ cv.clipr t0, t1
# CHECK-ERROR: too few operands for instruction
cv.clipr t0, t1, t2, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.sletu t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -518,7 +518,7 @@ cv.sletu t0, t1
# CHECK-ERROR: too few operands for instruction
cv.sletu t0, t1, t2, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.min t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -533,4 +533,4 @@ cv.min t0, t1
# CHECK-ERROR: too few operands for instruction
cv.min t0, t1, t2, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
diff --git a/llvm/test/MC/RISCV/corev/XCVbitmanip-invalid.s b/llvm/test/MC/RISCV/corev/XCVbitmanip-invalid.s
index 684b3f220a994..3bd14c7b7d2d0 100644
--- a/llvm/test/MC/RISCV/corev/XCVbitmanip-invalid.s
+++ b/llvm/test/MC/RISCV/corev/XCVbitmanip-invalid.s
@@ -8,10 +8,10 @@ cv.extract t0, t1, 0
# CHECK-ERROR: too few operands for instruction
cv.extract t0, t1, t2
-# CHECK-ERROR: immediate must be an integer in the range [0, 31]
+# CHECK-ERROR: invalid instruction
cv.extract t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 31]
+# CHECK-ERROR: invalid instruction
cv.extract t0, t1, 0, 32
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -32,10 +32,10 @@ cv.extractu t0, t1, 0
# CHECK-ERROR: too few operands for instruction
cv.extractu t0, t1, t2
-# CHECK-ERROR: immediate must be an integer in the range [0, 31]
+# CHECK-ERROR: invalid instruction
cv.extractu t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 31]
+# CHECK-ERROR: invalid instruction
cv.extractu t0, t1, 0, 32
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -56,10 +56,10 @@ cv.insert t0, t1, 0
# CHECK-ERROR: too few operands for instruction
cv.insert t0, t1, t2
-# CHECK-ERROR: immediate must be an integer in the range [0, 31]
+# CHECK-ERROR: invalid instruction
cv.insert t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 31]
+# CHECK-ERROR: invalid instruction
cv.insert t0, t1, 0, 32
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -80,10 +80,10 @@ cv.bclr t0, t1, 0
# CHECK-ERROR: too few operands for instruction
cv.bclr t0, t1, t2
-# CHECK-ERROR: immediate must be an integer in the range [0, 31]
+# CHECK-ERROR: invalid instruction
cv.bclr t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 31]
+# CHECK-ERROR: invalid instruction
cv.bclr t0, t1, 0, 32
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -104,10 +104,10 @@ cv.bset t0, t1, 0
# CHECK-ERROR: too few operands for instruction
cv.bset t0, t1, t2
-# CHECK-ERROR: immediate must be an integer in the range [0, 31]
+# CHECK-ERROR: invalid instruction
cv.bset t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 31]
+# CHECK-ERROR: invalid instruction
cv.bset t0, t1, 0, 32
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -128,10 +128,10 @@ cv.bitrev t0, t1, 0
# CHECK-ERROR: too few operands for instruction
cv.bitrev t0, t1, t2
-# CHECK-ERROR: immediate must be an integer in the range [0, 3]
+# CHECK-ERROR: invalid instruction
cv.bitrev t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 3]
+# CHECK-ERROR: invalid instruction
cv.bitrev t0, t1, 0, 32
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -149,7 +149,7 @@ cv.extractr t0
# CHECK-ERROR: too few operands for instruction
cv.extractr t0, 0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: invalid instruction
cv.extractr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -161,7 +161,7 @@ cv.extractur t0
# CHECK-ERROR: too few operands for instruction
cv.extractur t0, 0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: invalid instruction
cv.extractur t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -173,7 +173,7 @@ cv.insertr t0
# CHECK-ERROR: too few operands for instruction
cv.insertr t0, 0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: invalid instruction
cv.insertr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -185,7 +185,7 @@ cv.bclrr t0
# CHECK-ERROR: too few operands for instruction
cv.bclrr t0, 0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: invalid instruction
cv.bclrr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -197,7 +197,7 @@ cv.bsetr t0
# CHECK-ERROR: too few operands for instruction
cv.bsetr t0, 0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: invalid instruction
cv.bsetr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -209,7 +209,7 @@ cv.ror t0
# CHECK-ERROR: too few operands for instruction
cv.ror t0, 0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: invalid instruction
cv.ror t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -224,10 +224,10 @@ cv.ff1 t0, 0
# CHECK-ERROR: invalid operand for instruction
cv.ff1 t0, t1, 0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.ff1 t0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.fl1 t0
# CHECK-ERROR: too few operands for instruction
@@ -236,10 +236,10 @@ cv.fl1 t0, 0
# CHECK-ERROR: invalid operand for instruction
cv.fl1 t0, t1, 0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.fl1 t0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.clb t0
# CHECK-ERROR: too few operands for instruction
@@ -248,10 +248,10 @@ cv.clb t0, 0
# CHECK-ERROR: invalid operand for instruction
cv.clb t0, t1, 0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.clb t0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.cnt t0
# CHECK-ERROR: too few operands for instruction
@@ -260,8 +260,8 @@ cv.cnt t0, 0
# CHECK-ERROR: invalid operand for instruction
cv.cnt t0, t1, 0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.cnt t0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
diff --git a/llvm/test/MC/RISCV/corev/XCVmac-invalid.s b/llvm/test/MC/RISCV/corev/XCVmac-invalid.s
index e1a102cd8405a..6b8779b75eeab 100644
--- a/llvm/test/MC/RISCV/corev/XCVmac-invalid.s
+++ b/llvm/test/MC/RISCV/corev/XCVmac-invalid.s
@@ -14,7 +14,7 @@ cv.mac t0, t1
# CHECK-ERROR: too few operands for instruction
cv.mac t0, t1, t2, t4
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.machhsn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -38,7 +38,7 @@ cv.machhsn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.machhsn t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.machhsrn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -62,7 +62,7 @@ cv.machhsrn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.machhsrn t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.machhun t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -86,7 +86,7 @@ cv.machhun t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.machhun t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.machhurn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -110,7 +110,7 @@ cv.machhurn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.machhurn t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.macsn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -134,7 +134,7 @@ cv.macsn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.macsn t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.macsrn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -158,7 +158,7 @@ cv.macsrn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.macsrn t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.macun t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -182,7 +182,7 @@ cv.macun t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.macun t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.macurn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -206,7 +206,7 @@ cv.macurn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.macurn t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.msu t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -221,7 +221,7 @@ cv.msu t0, t1
# CHECK-ERROR: too few operands for instruction
cv.msu t0, t1, t2, t4
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.mulhhs t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -236,7 +236,7 @@ cv.mulhhs t0, t1
# CHECK-ERROR: too few operands for instruction
cv.mulhhs t0, t1, t2, t4
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.mulhhsn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -260,7 +260,7 @@ cv.mulhhsn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.mulhhsn t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.mulhhsrn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -284,7 +284,7 @@ cv.mulhhsrn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.mulhhsrn t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.mulhhu t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -299,7 +299,7 @@ cv.mulhhu t0, t1
# CHECK-ERROR: too few operands for instruction
cv.mulhhu t0, t1, t2, t4
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.mulhhun t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -323,7 +323,7 @@ cv.mulhhun t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.mulhhun t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.mulhhurn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -347,7 +347,7 @@ cv.mulhhurn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.mulhhurn t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.muls t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -362,7 +362,7 @@ cv.muls t0, t1
# CHECK-ERROR: too few operands for instruction
cv.muls t0, t1, t2, t4
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.mulsn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -386,7 +386,7 @@ cv.mulsn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.mulsn t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.mulsrn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -410,7 +410,7 @@ cv.mulsrn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.mulsrn t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.mulu t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -425,7 +425,7 @@ cv.mulu t0, t1
# CHECK-ERROR: too few operands for instruction
cv.mulu t0, t1, t2, t4
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.mulun t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -449,7 +449,7 @@ cv.mulun t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.mulun t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
cv.mulurn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -473,4 +473,4 @@ cv.mulurn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.mulurn t0, t1, t2, 0, a0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
diff --git a/llvm/test/MC/RISCV/corev/XCVmem-invalid.s b/llvm/test/MC/RISCV/corev/XCVmem-invalid.s
index 3f13bd0090d7f..517aa153fd39b 100644
--- a/llvm/test/MC/RISCV/corev/XCVmem-invalid.s
+++ b/llvm/test/MC/RISCV/corev/XCVmem-invalid.s
@@ -2,82 +2,94 @@
# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR
cv.lb t0, (0), 0
-# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.lb 0, (t1), 0
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.lb 0, (0), t2
-# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.lb t0, (t1), -2049
-# CHECK-ERROR: :[[@LINE-1]]:17: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-ERROR: :[[@LINE-2]]:17: note: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-3]]:17: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.lb t0, (t1), 2048
-# CHECK-ERROR: :[[@LINE-1]]:17: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-ERROR: :[[@LINE-2]]:17: note: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-3]]:17: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.lb t0, (0), t1
-# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.lb 0, (t1), t1
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.lb t0
-# CHECK-ERROR: :[[@LINE-1]]:1: error: too few operands for instruction
+# CHECK-ERROR: :[[@LINE-1]]:9: error: too few operands for instruction
cv.lb t0, (t2)
-# CHECK-ERROR: :[[@LINE-1]]:1: error: too few operands for instruction
+# CHECK-ERROR: :[[@LINE-1]]:15: error: too few operands for instruction
cv.lb t0, (t1), t2, t3
-# CHECK-ERROR: :[[@LINE-1]]:21: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:21: error: too many operands for instruction
cv.lbu t0, (0), 0
-# CHECK-ERROR: :[[@LINE-1]]:12: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.lbu 0, (t1), 0
# CHECK-ERROR: :[[@LINE-1]]:8: error: invalid operand for instruction
cv.lbu 0, (0), t0
-# CHECK-ERROR: :[[@LINE-1]]:8: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.lbu t0, (t1), -2049
-# CHECK-ERROR: :[[@LINE-1]]:18: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-ERROR: :[[@LINE-2]]:18: note: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-3]]:18: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.lbu t0, (t1), 2048
-# CHECK-ERROR: :[[@LINE-1]]:18: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-ERROR: :[[@LINE-2]]:18: note: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-3]]:18: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.lbu t0, (0), t1
-# CHECK-ERROR: :[[@LINE-1]]:12: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.lbu 0, (t1), t1
# CHECK-ERROR: :[[@LINE-1]]:8: error: invalid operand for instruction
cv.lbu t0
-# CHECK-ERROR: :[[@LINE-1]]:1: error: too few operands for instruction
+# CHECK-ERROR: :[[@LINE-1]]:10: error: too few operands for instruction
cv.lbu t0, (t2)
-# CHECK-ERROR: :[[@LINE-1]]:1: error: too few operands for instruction
+# CHECK-ERROR: :[[@LINE-1]]:16: error: too few operands for instruction
cv.lbu t0, (t1), t2, t3
-# CHECK-ERROR: :[[@LINE-1]]:22: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:22: error: too many operands for instruction
cv.lh t0, (0), 0
-# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.lh 0, (t1), 0
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.lh 0, (0), t2
-# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.lh t0, (t1), -2049
-# CHECK-ERROR: :[[@LINE-1]]:17: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-ERROR: :[[@LINE-2]]:17: note: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-3]]:17: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.lh t0, (t1), 2048
-# CHECK-ERROR: :[[@LINE-1]]:17: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-ERROR: :[[@LINE-2]]:17: note: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-3]]:17: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.lh t0, (0), t1
-# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.lh t0, t1(0)
# CHECK-ERROR: :[[@LINE-1]]:14: error: expected GPR register
@@ -86,31 +98,35 @@ cv.lh 0, (t1), t1
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.lh t0
-# CHECK-ERROR: :[[@LINE-1]]:1: error: too few operands for instruction
+# CHECK-ERROR: :[[@LINE-1]]:9: error: too few operands for instruction
cv.lh t0, (t1)
-# CHECK-ERROR: :[[@LINE-1]]:1: error: too few operands for instruction
+# CHECK-ERROR: :[[@LINE-1]]:15: error: too few operands for instruction
cv.lh t0, (t1), t2, t3
-# CHECK-ERROR: :[[@LINE-1]]:21: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:21: error: too many operands for instruction
cv.lhu t0, (0), 0
-# CHECK-ERROR: :[[@LINE-1]]:12: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.lhu 0, (t1), 0
# CHECK-ERROR: :[[@LINE-1]]:8: error: invalid operand for instruction
cv.lhu 0, 0(t1)
-# CHECK-ERROR: :[[@LINE-1]]:8: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.lhu t0, (t1), -2049
-# CHECK-ERROR: :[[@LINE-1]]:18: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-ERROR: :[[@LINE-2]]:18: note: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-3]]:18: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.lhu t0, (t1), 2048
-# CHECK-ERROR: :[[@LINE-1]]:18: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-ERROR: :[[@LINE-2]]:18: note: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-3]]:18: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.lhu t0, (0), t1
-# CHECK-ERROR: :[[@LINE-1]]:12: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.lhu t0, t1(0)
# CHECK-ERROR: :[[@LINE-1]]:15: error: expected GPR register
@@ -119,31 +135,35 @@ cv.lhu 0, t0, t1
# CHECK-ERROR: :[[@LINE-1]]:13: error: expected '(' or invalid operand
cv.lhu t0
-# CHECK-ERROR: :[[@LINE-1]]:1: error: too few operands for instruction
+# CHECK-ERROR: :[[@LINE-1]]:10: error: too few operands for instruction
cv.lhu t0, (t1)
-# CHECK-ERROR: :[[@LINE-1]]:1: error: too few operands for instruction
+# CHECK-ERROR: :[[@LINE-1]]:16: error: too few operands for instruction
cv.lhu t0, (t1), t2, t3
-# CHECK-ERROR: :[[@LINE-1]]:22: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:22: error: too many operands for instruction
cv.lw t0, (0), 0
-# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.lw 0, (t1), 0
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.lw 0, (0), t2
-# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.lw t0, (t1), -2049
-# CHECK-ERROR: :[[@LINE-1]]:17: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-ERROR: :[[@LINE-2]]:17: note: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-3]]:17: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.lw t0, (t1), 2048
-# CHECK-ERROR: :[[@LINE-1]]:17: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-ERROR: :[[@LINE-2]]:17: note: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-3]]:17: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.lw t0, (0), t1
-# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.lw t0, t1(0)
# CHECK-ERROR: :[[@LINE-1]]:14: error: expected GPR register
@@ -152,76 +172,82 @@ cv.lw 0, (t0), t1
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.lw t0
-# CHECK-ERROR: :[[@LINE-1]]:1: error: too few operands for instruction
+# CHECK-ERROR: :[[@LINE-1]]:9: error: too few operands for instruction
cv.lw t0, (t1)
-# CHECK-ERROR: :[[@LINE-1]]:1: error: too few operands for instruction
+# CHECK-ERROR: :[[@LINE-1]]:15: error: too few operands for instruction
cv.lw t0, (t1), t2, t3
-# CHECK-ERROR: :[[@LINE-1]]:21: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:21: error: too many operands for instruction
cv.sb t0, (0), 0
-# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.sb 0, (t0), 0
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.sb t0, 0(t1)
-# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.sb t0, (t1), 2048
-# CHECK-ERROR: :[[@LINE-1]]:17: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-ERROR: :[[@LINE-2]]:17: note: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-3]]:17: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.sb t0, (0), t1
-# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.sb 0, (t1), t1
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.sb t0
-# CHECK-ERROR: :[[@LINE-1]]:1: error: too few operands for instruction
+# CHECK-ERROR: :[[@LINE-1]]:9: error: too few operands for instruction
cv.sh t0, (0), 0
-# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.sh 0, (t1), 0
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.sh t0, 0(t1)
-# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.sh t0, (t1), 2048
-# CHECK-ERROR: :[[@LINE-1]]:17: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-ERROR: :[[@LINE-2]]:17: note: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-3]]:17: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.sh t0, (0), t1
-# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.sh 0, (t1), t1
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.sh t0
-# CHECK-ERROR: :[[@LINE-1]]:1: error: too few operands for instruction
+# CHECK-ERROR: :[[@LINE-1]]:9: error: too few operands for instruction
cv.sw t0, (0), 0
-# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.sw 0, (t1), 0
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.sw t0, 0(t1)
-# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.sw t0, (t1), 2048
-# CHECK-ERROR: :[[@LINE-1]]:17: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-ERROR: :[[@LINE-2]]:17: note: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-3]]:17: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.sw t0, (0), t1
-# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
cv.sw 0, (t1), t1
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.sw t0
-# CHECK-ERROR: :[[@LINE-1]]:1: error: too few operands for instruction
+# CHECK-ERROR: :[[@LINE-1]]:9: error: too few operands for instruction
cv.lb t0, f0(t1)
# CHECK-ERROR: :[[@LINE-1]]:11: error: expected GPR register
diff --git a/llvm/test/MC/RISCV/corev/XCVsimd-invalid.s b/llvm/test/MC/RISCV/corev/XCVsimd-invalid.s
index c04898d295a18..b67e5d4b3ecbd 100644
--- a/llvm/test/MC/RISCV/corev/XCVsimd-invalid.s
+++ b/llvm/test/MC/RISCV/corev/XCVsimd-invalid.s
@@ -12,7 +12,7 @@ cv.add.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.add.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -34,7 +34,7 @@ cv.add.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.add.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -56,7 +56,7 @@ cv.add.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.add.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -78,7 +78,7 @@ cv.add.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.add.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -94,13 +94,13 @@ cv.add.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.add.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.add.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.add.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.add.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -116,13 +116,13 @@ cv.add.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.add.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.add.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.add.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.add.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -144,7 +144,7 @@ cv.sub.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sub.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -166,7 +166,7 @@ cv.sub.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sub.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -188,7 +188,7 @@ cv.sub.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sub.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -210,7 +210,7 @@ cv.sub.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sub.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -226,13 +226,13 @@ cv.sub.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.sub.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sub.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sub.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.sub.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -248,13 +248,13 @@ cv.sub.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.sub.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sub.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sub.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.sub.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -276,7 +276,7 @@ cv.avg.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avg.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.avg.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -298,7 +298,7 @@ cv.avg.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avg.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.avg.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -320,7 +320,7 @@ cv.avg.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avg.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.avg.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -342,7 +342,7 @@ cv.avg.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avg.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.avg.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -358,13 +358,13 @@ cv.avg.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.avg.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.avg.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.avg.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.avg.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -380,13 +380,13 @@ cv.avg.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.avg.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.avg.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.avg.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.avg.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -408,7 +408,7 @@ cv.avgu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avgu.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.avgu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -430,7 +430,7 @@ cv.avgu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avgu.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.avgu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -452,7 +452,7 @@ cv.avgu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avgu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.avgu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -474,7 +474,7 @@ cv.avgu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avgu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.avgu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -490,13 +490,13 @@ cv.avgu.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.avgu.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.avgu.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.avgu.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.avgu.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -515,13 +515,13 @@ cv.avgu.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.avgu.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.avgu.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.avgu.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.avgu.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -546,7 +546,7 @@ cv.min.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.min.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.min.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -568,7 +568,7 @@ cv.min.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.min.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.min.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -590,7 +590,7 @@ cv.min.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.min.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.min.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -612,7 +612,7 @@ cv.min.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.min.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.min.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -628,13 +628,13 @@ cv.min.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.min.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.min.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.min.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.min.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -650,13 +650,13 @@ cv.min.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.min.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.min.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.min.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.min.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -678,7 +678,7 @@ cv.minu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.minu.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.minu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -700,7 +700,7 @@ cv.minu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.minu.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.minu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -722,7 +722,7 @@ cv.minu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.minu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.minu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -744,7 +744,7 @@ cv.minu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.minu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.minu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -760,13 +760,13 @@ cv.minu.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.minu.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.minu.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.minu.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.minu.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -785,13 +785,13 @@ cv.minu.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.minu.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.minu.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.minu.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.minu.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -816,7 +816,7 @@ cv.max.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.max.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.max.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -838,7 +838,7 @@ cv.max.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.max.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.max.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -860,7 +860,7 @@ cv.max.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.max.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.max.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -882,7 +882,7 @@ cv.max.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.max.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.max.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -898,13 +898,13 @@ cv.max.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.max.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.max.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.max.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.max.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -920,13 +920,13 @@ cv.max.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.max.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.max.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.max.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.max.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -948,7 +948,7 @@ cv.maxu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.maxu.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.maxu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -970,7 +970,7 @@ cv.maxu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.maxu.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.maxu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -992,7 +992,7 @@ cv.maxu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.maxu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.maxu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1014,7 +1014,7 @@ cv.maxu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.maxu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.maxu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1030,13 +1030,13 @@ cv.maxu.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.maxu.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.maxu.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.maxu.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.maxu.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -1055,13 +1055,13 @@ cv.maxu.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.maxu.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.maxu.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.maxu.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.maxu.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -1086,7 +1086,7 @@ cv.srl.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.srl.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.srl.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1108,7 +1108,7 @@ cv.srl.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.srl.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.srl.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1130,7 +1130,7 @@ cv.srl.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.srl.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.srl.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1152,7 +1152,7 @@ cv.srl.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.srl.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.srl.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1168,13 +1168,13 @@ cv.srl.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.srl.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.srl.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.srl.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 15]
+# CHECK-ERROR: error: invalid instruction
cv.srl.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 15]
@@ -1193,13 +1193,13 @@ cv.srl.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.srl.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.srl.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.srl.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 7]
+# CHECK-ERROR: error: invalid instruction
cv.srl.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 7]
@@ -1224,7 +1224,7 @@ cv.sra.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sra.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sra.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1246,7 +1246,7 @@ cv.sra.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sra.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sra.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1268,7 +1268,7 @@ cv.sra.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sra.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sra.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1290,7 +1290,7 @@ cv.sra.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sra.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sra.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1306,13 +1306,13 @@ cv.sra.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.sra.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sra.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sra.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 15]
+# CHECK-ERROR: error: invalid instruction
cv.sra.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 15]
@@ -1331,13 +1331,13 @@ cv.sra.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.sra.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sra.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sra.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 7]
+# CHECK-ERROR: error: invalid instruction
cv.sra.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 7]
@@ -1362,7 +1362,7 @@ cv.sll.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sll.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sll.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1384,7 +1384,7 @@ cv.sll.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sll.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sll.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1406,7 +1406,7 @@ cv.sll.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sll.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sll.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1428,7 +1428,7 @@ cv.sll.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sll.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sll.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1444,13 +1444,13 @@ cv.sll.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.sll.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sll.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sll.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 15]
+# CHECK-ERROR: error: invalid instruction
cv.sll.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 15]
@@ -1469,13 +1469,13 @@ cv.sll.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.sll.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sll.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sll.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 7]
+# CHECK-ERROR: error: invalid instruction
cv.sll.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 7]
@@ -1500,7 +1500,7 @@ cv.or.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.or.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.or.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1522,7 +1522,7 @@ cv.or.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.or.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.or.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1544,7 +1544,7 @@ cv.or.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.or.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.or.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1566,7 +1566,7 @@ cv.or.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.or.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.or.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1582,13 +1582,13 @@ cv.or.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.or.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.or.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.or.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.or.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -1604,13 +1604,13 @@ cv.or.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.or.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.or.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.or.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.or.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -1632,7 +1632,7 @@ cv.xor.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.xor.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.xor.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1654,7 +1654,7 @@ cv.xor.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.xor.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.xor.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1676,7 +1676,7 @@ cv.xor.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.xor.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.xor.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1698,7 +1698,7 @@ cv.xor.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.xor.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.xor.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1714,13 +1714,13 @@ cv.xor.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.xor.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.xor.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.xor.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.xor.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -1736,13 +1736,13 @@ cv.xor.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.xor.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.xor.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.xor.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.xor.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -1764,7 +1764,7 @@ cv.and.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.and.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.and.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1786,7 +1786,7 @@ cv.and.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.and.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.and.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1808,7 +1808,7 @@ cv.and.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.and.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.and.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1830,7 +1830,7 @@ cv.and.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.and.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.and.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1846,13 +1846,13 @@ cv.and.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.and.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.and.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.and.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.and.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -1868,13 +1868,13 @@ cv.and.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.and.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.and.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.and.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.and.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -1890,44 +1890,44 @@ cv.and.sci.b t0, t1
//===----------------------------------------------------------------------===//
cv.abs.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.abs.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.abs.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.abs.h t0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.abs.h t0, t1, 0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.abs.h t0, t1, 0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
//===----------------------------------------------------------------------===//
// cv.abs.b
//===----------------------------------------------------------------------===//
cv.abs.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.abs.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.abs.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.abs.b t0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.abs.b t0, t1, 0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.abs.b t0, t1, 0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
//===----------------------------------------------------------------------===//
// cv.dotup.h
@@ -1940,7 +1940,7 @@ cv.dotup.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotup.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.dotup.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1962,7 +1962,7 @@ cv.dotup.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotup.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.dotup.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1984,7 +1984,7 @@ cv.dotup.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotup.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.dotup.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2006,7 +2006,7 @@ cv.dotup.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotup.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.dotup.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2022,13 +2022,13 @@ cv.dotup.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.dotup.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.dotup.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.dotup.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.dotup.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2047,13 +2047,13 @@ cv.dotup.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.dotup.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.dotup.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.dotup.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.dotup.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2078,7 +2078,7 @@ cv.dotusp.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotusp.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.dotusp.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2100,7 +2100,7 @@ cv.dotusp.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotusp.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.dotusp.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2122,7 +2122,7 @@ cv.dotusp.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotusp.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.dotusp.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2144,7 +2144,7 @@ cv.dotusp.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotusp.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.dotusp.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2160,13 +2160,13 @@ cv.dotusp.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.dotusp.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.dotusp.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.dotusp.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.dotusp.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -2182,13 +2182,13 @@ cv.dotusp.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.dotusp.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.dotusp.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.dotusp.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.dotusp.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -2210,7 +2210,7 @@ cv.dotsp.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotsp.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.dotsp.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2232,7 +2232,7 @@ cv.dotsp.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotsp.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.dotsp.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2254,7 +2254,7 @@ cv.dotsp.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotsp.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.dotsp.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2276,7 +2276,7 @@ cv.dotsp.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotsp.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.dotsp.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2292,13 +2292,13 @@ cv.dotsp.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.dotsp.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.dotsp.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.dotsp.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.dotsp.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -2314,13 +2314,13 @@ cv.dotsp.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.dotsp.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.dotsp.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.dotsp.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.dotsp.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -2342,7 +2342,7 @@ cv.sdotup.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotup.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sdotup.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2364,7 +2364,7 @@ cv.sdotup.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotup.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sdotup.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2386,7 +2386,7 @@ cv.sdotup.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotup.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sdotup.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2408,7 +2408,7 @@ cv.sdotup.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotup.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sdotup.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2424,13 +2424,13 @@ cv.sdotup.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.sdotup.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sdotup.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sdotup.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.sdotup.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2449,13 +2449,13 @@ cv.sdotup.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.sdotup.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sdotup.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sdotup.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.sdotup.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2480,7 +2480,7 @@ cv.sdotusp.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sdotusp.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2502,7 +2502,7 @@ cv.sdotusp.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sdotusp.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2524,7 +2524,7 @@ cv.sdotusp.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sdotusp.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2546,7 +2546,7 @@ cv.sdotusp.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sdotusp.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2562,13 +2562,13 @@ cv.sdotusp.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.sdotusp.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sdotusp.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sdotusp.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.sdotusp.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -2584,13 +2584,13 @@ cv.sdotusp.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.sdotusp.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sdotusp.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sdotusp.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.sdotusp.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -2612,7 +2612,7 @@ cv.sdotsp.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sdotsp.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2634,7 +2634,7 @@ cv.sdotsp.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sdotsp.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2656,7 +2656,7 @@ cv.sdotsp.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sdotsp.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2678,7 +2678,7 @@ cv.sdotsp.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sdotsp.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2694,13 +2694,13 @@ cv.sdotsp.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.sdotsp.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sdotsp.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sdotsp.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.sdotsp.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -2716,13 +2716,13 @@ cv.sdotsp.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.sdotsp.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sdotsp.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.sdotsp.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.sdotsp.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -2738,13 +2738,13 @@ cv.sdotsp.sci.b t0, t1
//===----------------------------------------------------------------------===//
cv.extract.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.extract.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.extract.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.extract.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2763,13 +2763,13 @@ cv.extract.h t0, t1
//===----------------------------------------------------------------------===//
cv.extract.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.extract.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.extract.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.extract.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2788,13 +2788,13 @@ cv.extract.b t0, t1
//===----------------------------------------------------------------------===//
cv.extractu.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.extractu.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.extractu.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.extractu.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2813,13 +2813,13 @@ cv.extractu.h t0, t1
//===----------------------------------------------------------------------===//
cv.extractu.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.extractu.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.extractu.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.extractu.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2838,13 +2838,13 @@ cv.extractu.b t0, t1
//===----------------------------------------------------------------------===//
cv.insert.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.insert.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.insert.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.insert.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2863,13 +2863,13 @@ cv.insert.h t0, t1
//===----------------------------------------------------------------------===//
cv.insert.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.insert.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.insert.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.insert.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2894,7 +2894,7 @@ cv.shuffle.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.shuffle.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.shuffle.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2916,7 +2916,7 @@ cv.shuffle.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.shuffle.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.shuffle.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2932,13 +2932,13 @@ cv.shuffle.b t0, t1
//===----------------------------------------------------------------------===//
cv.shuffle.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.shuffle.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.shuffle.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.shuffle.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2957,13 +2957,13 @@ cv.shuffle.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.shuffleI0.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.shuffleI0.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.shuffleI0.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.shuffleI0.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2982,13 +2982,13 @@ cv.shuffleI0.sci.b t0, t1
//===----------------------------------------------------------------------===//
cv.shuffleI1.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.shuffleI1.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.shuffleI1.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.shuffleI1.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -3007,13 +3007,13 @@ cv.shuffleI1.sci.b t0, t1
//===----------------------------------------------------------------------===//
cv.shuffleI2.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.shuffleI2.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.shuffleI2.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.shuffleI2.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -3032,13 +3032,13 @@ cv.shuffleI2.sci.b t0, t1
//===----------------------------------------------------------------------===//
cv.shuffleI3.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.shuffleI3.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.shuffleI3.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.shuffleI3.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -3063,7 +3063,7 @@ cv.shuffle2.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.shuffle2.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.shuffle2.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3085,7 +3085,7 @@ cv.shuffle2.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.shuffle2.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.shuffle2.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3107,7 +3107,7 @@ cv.pack t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.pack t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.pack t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3129,7 +3129,7 @@ cv.pack.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.pack.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.pack.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3151,7 +3151,7 @@ cv.packhi.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.packhi.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.packhi.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3173,7 +3173,7 @@ cv.packlo.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.packlo.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.packlo.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3195,7 +3195,7 @@ cv.cmpeq.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpeq.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3217,7 +3217,7 @@ cv.cmpeq.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpeq.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3239,7 +3239,7 @@ cv.cmpeq.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpeq.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3261,7 +3261,7 @@ cv.cmpeq.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpeq.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3277,13 +3277,13 @@ cv.cmpeq.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmpeq.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpeq.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpeq.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.cmpeq.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3299,13 +3299,13 @@ cv.cmpeq.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmpeq.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpeq.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpeq.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.cmpeq.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3327,7 +3327,7 @@ cv.cmpne.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpne.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpne.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3349,7 +3349,7 @@ cv.cmpne.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpne.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpne.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3371,7 +3371,7 @@ cv.cmpne.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpne.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpne.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3393,7 +3393,7 @@ cv.cmpne.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpne.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpne.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3409,13 +3409,13 @@ cv.cmpne.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmpne.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpne.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpne.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.cmpne.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3431,13 +3431,13 @@ cv.cmpne.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmpne.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpne.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpne.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.cmpne.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3459,7 +3459,7 @@ cv.cmpgt.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpgt.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3481,7 +3481,7 @@ cv.cmpgt.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpgt.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3503,7 +3503,7 @@ cv.cmpgt.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpgt.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3525,7 +3525,7 @@ cv.cmpgt.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpgt.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3541,13 +3541,13 @@ cv.cmpgt.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmpgt.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpgt.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpgt.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.cmpgt.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3563,13 +3563,13 @@ cv.cmpgt.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmpgt.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpgt.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpgt.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.cmpgt.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3591,7 +3591,7 @@ cv.cmpge.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpge.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpge.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3613,7 +3613,7 @@ cv.cmpge.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpge.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpge.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3635,7 +3635,7 @@ cv.cmpge.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpge.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpge.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3657,7 +3657,7 @@ cv.cmpge.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpge.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpge.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3673,13 +3673,13 @@ cv.cmpge.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmpge.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpge.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpge.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.cmpge.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3695,13 +3695,13 @@ cv.cmpge.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmpge.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpge.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpge.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.cmpge.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3723,7 +3723,7 @@ cv.cmplt.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmplt.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmplt.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3745,7 +3745,7 @@ cv.cmplt.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmplt.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmplt.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3767,7 +3767,7 @@ cv.cmplt.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmplt.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmplt.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3789,7 +3789,7 @@ cv.cmplt.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmplt.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmplt.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3805,13 +3805,13 @@ cv.cmplt.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmplt.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmplt.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmplt.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.cmplt.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3827,13 +3827,13 @@ cv.cmplt.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmplt.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmplt.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmplt.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.cmplt.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3855,7 +3855,7 @@ cv.cmple.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmple.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmple.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3877,7 +3877,7 @@ cv.cmple.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmple.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmple.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3899,7 +3899,7 @@ cv.cmple.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmple.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmple.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3921,7 +3921,7 @@ cv.cmple.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmple.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmple.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3937,13 +3937,13 @@ cv.cmple.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmple.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmple.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmple.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.cmple.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3959,13 +3959,13 @@ cv.cmple.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmple.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmple.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmple.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
+# CHECK-ERROR: error: invalid instruction
cv.cmple.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3987,7 +3987,7 @@ cv.cmpgtu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpgtu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4009,7 +4009,7 @@ cv.cmpgtu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpgtu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4031,7 +4031,7 @@ cv.cmpgtu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpgtu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4053,7 +4053,7 @@ cv.cmpgtu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpgtu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4069,13 +4069,13 @@ cv.cmpgtu.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmpgtu.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpgtu.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpgtu.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.cmpgtu.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -4094,13 +4094,13 @@ cv.cmpgtu.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmpgtu.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpgtu.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpgtu.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.cmpgtu.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -4125,7 +4125,7 @@ cv.cmpgeu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpgeu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4147,7 +4147,7 @@ cv.cmpgeu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpgeu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4169,7 +4169,7 @@ cv.cmpgeu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpgeu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4191,7 +4191,7 @@ cv.cmpgeu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpgeu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4207,13 +4207,13 @@ cv.cmpgeu.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmpgeu.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpgeu.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpgeu.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.cmpgeu.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -4232,13 +4232,13 @@ cv.cmpgeu.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmpgeu.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpgeu.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpgeu.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.cmpgeu.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -4263,7 +4263,7 @@ cv.cmpltu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpltu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4285,7 +4285,7 @@ cv.cmpltu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpltu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4307,7 +4307,7 @@ cv.cmpltu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpltu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4329,7 +4329,7 @@ cv.cmpltu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpltu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4345,13 +4345,13 @@ cv.cmpltu.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmpltu.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpltu.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpltu.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.cmpltu.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -4370,13 +4370,13 @@ cv.cmpltu.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmpltu.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpltu.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpltu.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.cmpltu.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -4401,7 +4401,7 @@ cv.cmpleu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpleu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4423,7 +4423,7 @@ cv.cmpleu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpleu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4445,7 +4445,7 @@ cv.cmpleu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpleu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4467,7 +4467,7 @@ cv.cmpleu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cmpleu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4483,13 +4483,13 @@ cv.cmpleu.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmpleu.sci.h 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpleu.sci.h t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpleu.sci.h t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.cmpleu.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -4508,13 +4508,13 @@ cv.cmpleu.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmpleu.sci.b 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpleu.sci.b t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cmpleu.sci.b t0, t1, t2, t3
-# CHECK-ERROR: immediate must be an integer in the range [0, 63]
+# CHECK-ERROR: error: invalid instruction
cv.cmpleu.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -4539,7 +4539,7 @@ cv.cplxmul.r t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.r t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cplxmul.r t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4561,7 +4561,7 @@ cv.cplxmul.i t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.i t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cplxmul.i t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4583,7 +4583,7 @@ cv.cplxmul.r.div2 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.r.div2 t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cplxmul.r.div2 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4605,7 +4605,7 @@ cv.cplxmul.i.div2 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.i.div2 t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cplxmul.i.div2 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4627,7 +4627,7 @@ cv.cplxmul.r.div4 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.r.div4 t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cplxmul.r.div4 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4649,7 +4649,7 @@ cv.cplxmul.i.div4 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.i.div4 t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cplxmul.i.div4 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4671,7 +4671,7 @@ cv.cplxmul.r.div8 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.r.div8 t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cplxmul.r.div8 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4693,7 +4693,7 @@ cv.cplxmul.i.div8 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.i.div8 t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cplxmul.i.div8 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4709,22 +4709,22 @@ cv.cplxmul.i.div8 t0, t1
//===----------------------------------------------------------------------===//
cv.cplxconj 0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cplxconj t0, 0, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cplxconj t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: invalid instruction
cv.cplxconj t0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cplxconj t0, t1, 0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.cplxconj t0, t1, 0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
//===----------------------------------------------------------------------===//
// cv.subrotmj
@@ -4737,7 +4737,7 @@ cv.subrotmj t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.subrotmj t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.subrotmj t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4759,7 +4759,7 @@ cv.subrotmj.div2 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.subrotmj.div2 t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.subrotmj.div2 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4781,7 +4781,7 @@ cv.subrotmj.div4 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.subrotmj.div4 t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.subrotmj.div4 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4803,7 +4803,7 @@ cv.subrotmj.div8 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.subrotmj.div8 t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.subrotmj.div8 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4825,7 +4825,7 @@ cv.add.div2 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.div2 t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.add.div2 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4847,7 +4847,7 @@ cv.add.div4 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.div4 t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.add.div4 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4869,7 +4869,7 @@ cv.add.div8 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.div8 t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.add.div8 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4891,7 +4891,7 @@ cv.sub.div2 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.div2 t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sub.div2 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4913,7 +4913,7 @@ cv.sub.div4 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.div4 t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sub.div4 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4935,7 +4935,7 @@ cv.sub.div8 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.div8 t0, t1, t2, t3
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: error: too many operands for instruction
cv.sub.div8 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4945,4 +4945,3 @@ cv.sub.div8 t0, t1, 0
cv.sub.div8 t0, t1
# CHECK-ERROR: too few operands for instruction
-
diff --git a/llvm/test/MC/RISCV/function-call-invalid.s b/llvm/test/MC/RISCV/function-call-invalid.s
index 17d02015a6949..652eaa81fb0e4 100644
--- a/llvm/test/MC/RISCV/function-call-invalid.s
+++ b/llvm/test/MC/RISCV/function-call-invalid.s
@@ -9,6 +9,6 @@ call %hi(1234) # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
call %lo(1234) # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
call %hi(foo) # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
call %lo(foo) # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
-call foo, bar # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
+call foo, bar # CHECK: :[[@LINE]]:6: error: invalid operand for instruction
call foo at pls # CHECK: :[[@LINE]]:10: error: @ (except the deprecated/ignored @plt) is disallowed
call foo at 3 # CHECK: :[[@LINE]]:10: error: @ (except the deprecated/ignored @plt) is disallowed
diff --git a/llvm/test/MC/RISCV/insn-invalid.s b/llvm/test/MC/RISCV/insn-invalid.s
index 15de9a2bebd83..957603fd8ebe1 100644
--- a/llvm/test/MC/RISCV/insn-invalid.s
+++ b/llvm/test/MC/RISCV/insn-invalid.s
@@ -1,14 +1,14 @@
# RUN: not llvm-mc -triple riscv32 < %s 2>&1 | FileCheck %s
# Too many operands
-.insn i 0x13, 0, a0, a1, 13, 14 # CHECK: :[[@LINE]]:33: error: invalid operand for instruction
-.insn r 0x43, 0, 0, fa0, fa1, fa2, fa3, fa4 # CHECK: :[[@LINE]]:44: error: invalid operand for instruction
+.insn i 0x13, 0, a0, a1, 13, 14 # CHECK: :[[@LINE]]:33: error: too many operands for instruction
+.insn r 0x43, 0, 0, fa0, fa1, fa2, fa3, fa4 # CHECK: :[[@LINE]]:44: error: too many operands for instruction
# Too few operands
-.insn r 0x33, 0, 0, a0, a1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
-.insn i 0x13, 0, a0, a1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+.insn r 0x33, 0, 0, a0, a1 # CHECK: :[[@LINE]]:30: error: too few operands for instruction
+.insn i 0x13, 0, a0, a1 # CHECK: :[[@LINE]]:27: error: too few operands for instruction
-.insn r 0x33, 0, 0, a0, 13 # CHECK: :[[@LINE]]:28: error: invalid operand for instruction
+.insn r 0x33, 0, 0, a0, 13 # CHECK: :[[@LINE]]:1: error: invalid instruction
.insn i 0x13, 0, a0, a1, a2 # CHECK: :[[@LINE]]:28: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
.insn q 0x13, 0, a0, a1, 13, 14 # CHECK: :[[@LINE]]:7: error: invalid instruction format
diff --git a/llvm/test/MC/RISCV/insn_c-invalid.s b/llvm/test/MC/RISCV/insn_c-invalid.s
index 9af864edc31e2..ed97db62facf0 100644
--- a/llvm/test/MC/RISCV/insn_c-invalid.s
+++ b/llvm/test/MC/RISCV/insn_c-invalid.s
@@ -1,12 +1,12 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+c < %s 2>&1 | FileCheck %s
# Too many operands
-.insn ci 1, 0, a0, 13, 14 # CHECK: :[[#@LINE]]:25: error: invalid operand for instruction
-.insn cr 2, 9, a0, a1, a2 # CHECK: :[[#@LINE]]:25: error: invalid operand for instruction
+.insn ci 1, 0, a0, 13, 14 # CHECK: :[[#@LINE]]:25: error: too many operands for instruction
+.insn cr 2, 9, a0, a1, a2 # CHECK: :[[#@LINE]]:25: error: too many operands for instruction
## Too few operands
-.insn ci 1, 0, a0 # CHECK: :[[#@LINE]]:1: error: too few operands for instruction
-.insn cr 2, 9, a0 # CHECK: :[[#@LINE]]:1: error: too few operands for instruction
+.insn ci 1, 0, a0 # CHECK: :[[#@LINE]]:19: error: too few operands for instruction
+.insn cr 2, 9, a0 # CHECK: :[[#@LINE]]:19: error: too few operands for instruction
.insn cr 2, 9, a0, 13 # CHECK: :[[#@LINE]]:21: error: invalid operand for instruction
.insn ci 1, 0, a0, a1 # CHECK: :[[#@LINE]]:21: error: immediate must be an integer in the range [-32, 31]
diff --git a/llvm/test/MC/RISCV/insn_xqci-invalid.s b/llvm/test/MC/RISCV/insn_xqci-invalid.s
index 8177adaf8ac50..13671f13fa69b 100644
--- a/llvm/test/MC/RISCV/insn_xqci-invalid.s
+++ b/llvm/test/MC/RISCV/insn_xqci-invalid.s
@@ -17,7 +17,7 @@
# CHECK-ERR: [[@LINE-1]]:30: error: immediate must be an integer in the range [-2147483648, 4294967295]
.insn qc.eai 126, 7, 1, x31, 0xFFFFFFFF, extra
-# CHECK-ERR: [[@LINE-1]]:42: error: invalid operand for instruction
+# CHECK-ERR: [[@LINE-1]]:42: error: too many operands for instruction
.insn qc.ei 128, 0, 0, x31, x0, 0
# CHECK-ERR: [[@LINE-1]]:13: error: opcode must be a valid opcode name or an immediate in the range [0, 127]
@@ -32,13 +32,13 @@
# CHECK-ERR: [[@LINE-1]]:24: error: invalid operand for instruction
.insn qc.ei 127, 7, 3, x31, not_a_reg, 0
-# CHECK-ERR: [[@LINE-1]]:29: error: immediate must be an integer in the range [-33554432, 33554431]
+# CHECK-ERR: [[@LINE-1]]:29: error: invalid operand for instruction
.insn qc.ei 127, 7, 3, x31, x31, 0x2000000
# CHECK-ERR: [[@LINE-1]]:34: error: immediate must be an integer in the range [-33554432, 33554431]
.insn qc.ei 127, 7, 3, x31, x31, 0x1000000, extra
-# CHECK-ERR: [[@LINE-1]]:45: error: invalid operand for instruction
+# CHECK-ERR: [[@LINE-1]]:45: error: too many operands for instruction
.insn qc.ei 126, 7, 3, x31, 0x2000000(x0)
# CHECK-ERR: [[@LINE-1]]:29: error: immediate must be an integer in the range [-33554432, 33554431]
@@ -46,9 +46,6 @@
.insn qc.ei 126, 7, 3, x31, 0x1000000(not_a_reg)
# CHECK-ERR: [[@LINE-1]]:39: error: expected register
-.insn qc.ei 126, 7, 3, x31, 0x1000000(x31), extra
-# CHECK-ERR: [[@LINE-1]]:45: error: invalid operand for instruction
-
.insn qc.eb 128, 0, 0, x0, 0, 0
# CHECK-ERR: [[@LINE-1]]:13: error: opcode must be a valid opcode name or an immediate in the range [0, 127]
@@ -68,7 +65,7 @@
# CHECK-ERR: [[@LINE-1]]:38: error: immediate must be a multiple of 2 bytes in the range [-4096, 4094]
.insn qc.eb 127, 7, 31, x31, 0x4000, 0x800, extra
-# CHECK-ERR: [[@LINE-1]]:45: error: invalid operand for instruction
+# CHECK-ERR: [[@LINE-1]]:45: error: too many operands for instruction
.insn qc.ej 128, 0, 0, 0, 0
@@ -87,7 +84,7 @@
# CHECK-ERR: [[@LINE-1]]:28: error: operand must be a multiple of 2 bytes in the range [-2147483648, 2147483646]
.insn qc.ej 127, 7, 3, 31, 0x80000000, extra
-# CHECK-ERR: [[@LINE-1]]:40: error: invalid operand for instruction
+# CHECK-ERR: [[@LINE-1]]:40: error: too many operands for instruction
.insn qc.es 128, 0, 0, x0, 0(x0)
# CHECK-ERR: [[@LINE-1]]:13: error: opcode must be a valid opcode name or an immediate in the range [0, 127]
@@ -106,6 +103,3 @@
.insn qc.es 127, 7, 3, x31, 0x1000000(not_a_reg)
# CHECK-ERR: [[@LINE-1]]:39: error: expected register
-
-.insn qc.es 127, 7, 3, x31, 0x1000000(x31), extra
-# CHECK-ERR: [[@LINE-1]]:45: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/priv-invalid.s b/llvm/test/MC/RISCV/priv-invalid.s
index d0446dbd1f865..89e13948a9862 100644
--- a/llvm/test/MC/RISCV/priv-invalid.s
+++ b/llvm/test/MC/RISCV/priv-invalid.s
@@ -1,34 +1,34 @@
# RUN: not llvm-mc -triple riscv32 < %s 2>&1 | FileCheck %s
-mret 0x10 # CHECK: :[[@LINE]]:6: error: invalid operand for instruction
+mret 0x10 # CHECK: :[[@LINE]]:6: error: too many operands for instruction
-sfence.vma zero, a1, a2 # CHECK: :[[@LINE]]:22: error: invalid operand for instruction
+sfence.vma zero, a1, a2 # CHECK: :[[@LINE]]:22: error: too many operands for instruction
-sfence.vma a0, 0x10 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
+sfence.vma a0, 0x10 # CHECK: :[[@LINE]]:16: error: too many operands for instruction
-sinval.vma zero, a1, a2 # CHECK: :[[@LINE]]:22: error: invalid operand for instruction
+sinval.vma zero, a1, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
-sinval.vma a0, 0x10 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
+sinval.vma a0, 0x10 # CHECK: :[[@LINE]]:1: error: invalid instruction
-sfence.w.inval 0x10 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
+sfence.w.inval 0x10 # CHECK: :[[@LINE]]:1: error: invalid instruction
-sfence.inval.ir 0x10 # CHECK: :[[@LINE]]:17: error: invalid operand for instruction
+sfence.inval.ir 0x10 # CHECK: :[[@LINE]]:1: error: invalid instruction
-hfence.vvma zero, a1, a2 # CHECK: :[[@LINE]]:23: error: invalid operand for instruction
+hfence.vvma zero, a1, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
-hfence.vvma a0, 0x10 # CHECK: :[[@LINE]]:17: error: invalid operand for instruction
+hfence.vvma a0, 0x10 # CHECK: :[[@LINE]]:17: error: too many operands for instruction
-hfence.gvma zero, a1, a2 # CHECK: :[[@LINE]]:23: error: invalid operand for instruction
+hfence.gvma zero, a1, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
-hfence.gvma a0, 0x10 # CHECK: :[[@LINE]]:17: error: invalid operand for instruction
+hfence.gvma a0, 0x10 # CHECK: :[[@LINE]]:17: error: too many operands for instruction
-hinval.vvma zero, a1, a2 # CHECK: :[[@LINE]]:23: error: invalid operand for instruction
+hinval.vvma zero, a1, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
-hinval.vvma a0, 0x10 # CHECK: :[[@LINE]]:17: error: invalid operand for instruction
+hinval.vvma a0, 0x10 # CHECK: :[[@LINE]]:1: error: invalid instruction
-hinval.gvma zero, a1, a2 # CHECK: :[[@LINE]]:23: error: invalid operand for instruction
+hinval.gvma zero, a1, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
-hinval.gvma a0, 0x10 # CHECK: :[[@LINE]]:17: error: invalid operand for instruction
+hinval.gvma a0, 0x10 # CHECK: :[[@LINE]]:1: error: invalid instruction
hlv.b a0, 0x10 # CHECK: :[[@LINE]]:16: error: expected '(' after optional integer offset
diff --git a/llvm/test/MC/RISCV/rv32c-invalid.s b/llvm/test/MC/RISCV/rv32c-invalid.s
index d2af1543d4e02..8ae59f1b0be19 100644
--- a/llvm/test/MC/RISCV/rv32c-invalid.s
+++ b/llvm/test/MC/RISCV/rv32c-invalid.s
@@ -6,9 +6,9 @@
## GPRC
.LBB:
c.lw ra, 4(sp)
-# CHECK: :[[#@LINE-1]]:7: error: register must be a GPR from x8 to x15
+# CHECK: :[[#@LINE-1]]:1: error: invalid instruction
c.sw sp, 4(sp)
-# CHECK: :[[#@LINE-1]]:7: error: register must be a GPR from x8 to x15
+# CHECK: :[[#@LINE-1]]:1: error: invalid instruction
c.beqz t0, .LBB
# CHECK: :[[#@LINE-1]]:9: error: register must be a GPR from x8 to x15
c.bnez s8, .LBB
@@ -42,7 +42,7 @@ c.jalr zero
c.mv ra, x0
# CHECK: :[[#@LINE-1]]:11: error: register must be a GPR excluding zero (x0)
c.add ra, ra, x0
-# CHECK: :[[#@LINE-1]]:16: error: invalid operand for instruction
+# CHECK: :[[#@LINE-1]]:16: error: too many operands for instruction
## GPRNoX2
c.lui x2, 4
@@ -92,7 +92,9 @@ c.addi t0, %hi(foo)
## simm6nonzero
c.nop 32
-# CHECK: :[[#@LINE-1]]:7: error: immediate must be non-zero in the range [-32, 31]
+# CHECK: :[[#@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[#@LINE-2]]:7: note: too many operands for instruction
+# CHECK: :[[#@LINE-3]]:7: note: immediate must be non-zero in the range [-32, 31]
## c_lui_imm
c.lui t0, 0
@@ -113,9 +115,9 @@ c.swsp ra, -4(sp)
# CHECK: :[[#@LINE-1]]:13: error: immediate must be a multiple of 4 bytes in the range [0, 252]
## uimm7_lsb00
c.lw s0, -4(sp)
-# CHECK: :[[#@LINE-1]]:11: error: immediate must be a multiple of 4 bytes in the range [0, 124]
+# CHECK: :[[#@LINE-1]]:1: error: invalid instruction
c.sw s0, 128(sp)
-# CHECK: :[[#@LINE-1]]:11: error: immediate must be a multiple of 4 bytes in the range [0, 124]
+# CHECK: :[[#@LINE-1]]:1: error: invalid instruction
## simm9_lsb0
c.bnez s1, -258
diff --git a/llvm/test/MC/RISCV/rv32d-invalid.s b/llvm/test/MC/RISCV/rv32d-invalid.s
index 9d5d270b93adb..e2eee11b93b07 100644
--- a/llvm/test/MC/RISCV/rv32d-invalid.s
+++ b/llvm/test/MC/RISCV/rv32d-invalid.s
@@ -15,7 +15,7 @@ fld ft1, 100(a10) # CHECK: :[[@LINE]]:14: error: expected register
fsgnjn.d fa100, fa2, fa3 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
# Integer registers where FP regs are expected
-fadd.d a2, a1, a0 # CHECK: :[[@LINE]]:8: error: invalid operand for instruction
+fadd.d a2, a1, a0 # CHECK: :[[@LINE]]:1: error: invalid instruction
# FP registers where integer regs are expected
-fcvt.wu.d ft2, a1 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+fcvt.wu.d ft2, a1 # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rv32dc-invalid.s b/llvm/test/MC/RISCV/rv32dc-invalid.s
index 70fb504b1bb9b..6c91a7c7a5594 100644
--- a/llvm/test/MC/RISCV/rv32dc-invalid.s
+++ b/llvm/test/MC/RISCV/rv32dc-invalid.s
@@ -8,5 +8,5 @@ c.fldsp fs1, 512(sp) # CHECK: :[[@LINE]]:15: error: immediate must be a multipl
c.fsdsp fs2, -8(sp) # CHECK: :[[@LINE]]:15: error: immediate must be a multiple of 8 bytes in the range [0, 504]
## uimm8_lsb000
-c.fld fs0, -8(sp) # CHECK: :[[@LINE]]:13: error: immediate must be a multiple of 8 bytes in the range [0, 248]
-c.fsd fs1, 256(sp) # CHECK: :[[@LINE]]:13: error: immediate must be a multiple of 8 bytes in the range [0, 248]
+c.fld fs0, -8(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+c.fsd fs1, 256(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rv32f-invalid.s b/llvm/test/MC/RISCV/rv32f-invalid.s
index bdd9860976af4..cdcb203f51cc3 100644
--- a/llvm/test/MC/RISCV/rv32f-invalid.s
+++ b/llvm/test/MC/RISCV/rv32f-invalid.s
@@ -15,10 +15,10 @@ flw ft1, 100(a10) # CHECK: :[[@LINE]]:14: error: expected register
fsgnjn.s fa100, fa2, fa3 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
# Integer registers where FP regs are expected
-fmv.x.w fs7, a2 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+fmv.x.w fs7, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
# FP registers where integer regs are expected
-fmv.w.x a8, ft2 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+fmv.w.x a8, ft2 # CHECK: :[[@LINE]]:1: error: invalid instruction
# Rounding mode when a register is expected
fmadd.s f10, f11, f12, ree # CHECK: :[[@LINE]]:24: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rv32fc-invalid.s b/llvm/test/MC/RISCV/rv32fc-invalid.s
index 5af3df17671fd..f379402786ec5 100644
--- a/llvm/test/MC/RISCV/rv32fc-invalid.s
+++ b/llvm/test/MC/RISCV/rv32fc-invalid.s
@@ -8,5 +8,5 @@ c.flwsp fs1, 256(sp) # CHECK: :[[@LINE]]:15: error: immediate must be a multipl
c.fswsp fs2, -4(sp) # CHECK: :[[@LINE]]:15: error: immediate must be a multiple of 4 bytes in the range [0, 252]
## uimm7_lsb00
-c.flw fs0, -4(sp) # CHECK: :[[@LINE]]:13: error: immediate must be a multiple of 4 bytes in the range [0, 124]
-c.fsw fs1, 128(sp) # CHECK: :[[@LINE]]:13: error: immediate must be a multiple of 4 bytes in the range [0, 124]
+c.flw fs0, -4(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+c.fsw fs1, 128(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rv32h-invalid.s b/llvm/test/MC/RISCV/rv32h-invalid.s
index 3dcfea4898c26..8ac0efd93a619 100644
--- a/llvm/test/MC/RISCV/rv32h-invalid.s
+++ b/llvm/test/MC/RISCV/rv32h-invalid.s
@@ -3,7 +3,10 @@
# RUN: not llvm-mc -triple riscv32 < %s 2>&1 \
# RUN: | FileCheck %s -check-prefixes=CHECK,CHECK-OFFSET
-hfence.vvma zero, zero # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'H' (Hypervisor)
+hfence.vvma zero, zero
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:19: note: too many operands for instruction
+# CHECK: :[[@LINE-3]]:1: note: instruction requires the following: 'H' (Hypervisor)
hlv.h a0, 0(a1) # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'H' (Hypervisor)
diff --git a/llvm/test/MC/RISCV/rv32i-aliases-invalid.s b/llvm/test/MC/RISCV/rv32i-aliases-invalid.s
index 63bc1fa09a4a2..489a6d533cc06 100644
--- a/llvm/test/MC/RISCV/rv32i-aliases-invalid.s
+++ b/llvm/test/MC/RISCV/rv32i-aliases-invalid.s
@@ -5,48 +5,112 @@
# TODO ld
# TODO sd
-li x0, 4294967296 # CHECK: :[[@LINE]]:8: error: immediate must be an integer in the range [-2147483648, 4294967295]
-li x0, -2147483649 # CHECK: :[[@LINE]]:8: error: immediate must be an integer in the range [-2147483648, 4294967295]
-li t4, foo # CHECK: :[[@LINE]]:8: error: immediate must be an integer in the range [-2147483648, 4294967295]
-
-la x0, 4294967296 # CHECK: :[[@LINE]]:8: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la x0, -2147483649 # CHECK: :[[@LINE]]:8: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la a1, foo+foo # CHECK: :[[@LINE]]:8: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la x1, %pcrel_hi(1234) # CHECK: :[[@LINE]]:8: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la x1, %pcrel_lo(1234) # CHECK: :[[@LINE]]:8: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la x1, %pcrel_hi(foo) # CHECK: :[[@LINE]]:8: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la x1, %pcrel_lo(foo) # CHECK: :[[@LINE]]:8: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la x1, %hi(1234) # CHECK: :[[@LINE]]:8: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la x1, %lo(1234) # CHECK: :[[@LINE]]:8: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la x1, %hi(foo) # CHECK: :[[@LINE]]:8: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la x1, %lo(foo) # CHECK: :[[@LINE]]:8: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-
-lla x0, 4294967296 # CHECK: :[[@LINE]]:9: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla x0, -2147483649 # CHECK: :[[@LINE]]:9: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla a1, foo+foo # CHECK: :[[@LINE]]:9: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla x1, %pcrel_hi(1234) # CHECK: :[[@LINE]]:9: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla x1, %pcrel_lo(1234) # CHECK: :[[@LINE]]:9: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla x1, %pcrel_hi(foo) # CHECK: :[[@LINE]]:9: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla x1, %pcrel_lo(foo) # CHECK: :[[@LINE]]:9: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla x1, %hi(1234) # CHECK: :[[@LINE]]:9: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla x1, %lo(1234) # CHECK: :[[@LINE]]:9: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla x1, %hi(foo) # CHECK: :[[@LINE]]:9: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla x1, %lo(foo) # CHECK: :[[@LINE]]:9: error: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+li x0, 4294967296 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK: :[[@LINE-2]]:8: note: immediate must be an integer in the range [-2147483648, 4294967295]
+li x0, -2147483649 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK: :[[@LINE-2]]:8: note: immediate must be an integer in the range [-2147483648, 4294967295]
+li t4, foo # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK: :[[@LINE-2]]:8: note: immediate must be an integer in the range [-2147483648, 4294967295]
+
+la x0, 4294967296 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+la x0, -2147483649 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+la a1, foo+foo # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+la x1, %pcrel_hi(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+la x1, %pcrel_lo(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+la x1, %pcrel_hi(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+la x1, %pcrel_lo(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+la x1, %hi(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+la x1, %lo(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+la x1, %hi(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+la x1, %lo(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+lla x0, 4294967296 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+lla x0, -2147483649 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+lla a1, foo+foo # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+lla x1, %pcrel_hi(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+lla x1, %pcrel_lo(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+lla x1, %pcrel_hi(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+lla x1, %pcrel_lo(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+lla x1, %hi(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+lla x1, %lo(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+lla x1, %hi(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+lla x1, %lo(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
lla a2, foo at plt # CHECK: :[[@LINE]]:12: error: unexpected token
negw x1, x2 # CHECK: :[[@LINE]]:1: error: instruction requires the following: RV64I Base Instruction Set{{$}}
sext.w x3, x4 # CHECK: :[[@LINE]]:1: error: instruction requires the following: RV64I Base Instruction Set{{$}}
-zext.w x3, x4 # CHECK: :[[@LINE]]:1: error: instruction requires the following: RV64I Base Instruction Set{{$}}
+zext.w x3, x4 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:1: note: instruction requires the following: 'Zba' (Address Generation Instructions), RV64I Base Instruction Set
+# CHECK: :[[@LINE-2]]:1: note: instruction requires the following: RV64I Base Instruction Set{{$}}
-sll x2, x3, 32 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 31]
-srl x2, x3, 32 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 31]
-sra x2, x3, 32 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 31]
+sll x2, x3, 32 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 31]
+srl x2, x3, 32 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 31]
+sra x2, x3, 32 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 31]
-sll x2, x3, -1 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 31]
-srl x2, x3, -2 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 31]
-sra x2, x3, -3 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 31]
+sll x2, x3, -1 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 31]
+srl x2, x3, -2 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 31]
+sra x2, x3, -3 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 31]
-addi x1, . # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
+addi x1, . # CHECK: :[[@LINE]]:1: error: invalid instruction
foo:
.space 4
diff --git a/llvm/test/MC/RISCV/rv32i-invalid.s b/llvm/test/MC/RISCV/rv32i-invalid.s
index 29daf365d3f1f..e3b516c33fe0c 100644
--- a/llvm/test/MC/RISCV/rv32i-invalid.s
+++ b/llvm/test/MC/RISCV/rv32i-invalid.s
@@ -51,10 +51,10 @@ jal gp, 1 # CHECK: :[[@LINE]]:9: error: immediate must be a multiple of 2 bytes
# Illegal operand modifier
## fencearg
-fence %hi(iorw), iorw # CHECK: :[[@LINE]]:7: error: operand must be formed of letters selected in-order from 'iorw'
-fence %lo(iorw), iorw # CHECK: :[[@LINE]]:7: error: operand must be formed of letters selected in-order from 'iorw'
-fence %pcrel_hi(iorw), iorw # CHECK: :[[@LINE]]:7: error: operand must be formed of letters selected in-order from 'iorw'
-fence %pcrel_lo(iorw), iorw # CHECK: :[[@LINE]]:7: error: operand must be formed of letters selected in-order from 'iorw'
+fence %hi(iorw), iorw # CHECK: :[[@LINE]]:7: error: operand must be formed of letters selected in-order from 'iorw' or be 0
+fence %lo(iorw), iorw # CHECK: :[[@LINE]]:7: error: operand must be formed of letters selected in-order from 'iorw' or be 0
+fence %pcrel_hi(iorw), iorw # CHECK: :[[@LINE]]:7: error: operand must be formed of letters selected in-order from 'iorw' or be 0
+fence %pcrel_lo(iorw), iorw # CHECK: :[[@LINE]]:7: error: operand must be formed of letters selected in-order from 'iorw' or be 0
## uimm5
slli a0, a0, %lo(1) # CHECK: :[[@LINE]]:14: error: immediate must be an integer in the range [0, 31]
@@ -70,8 +70,10 @@ csrrci x0, 43, %pcrel_lo(d) # CHECK: :[[@LINE]]:16: error: immediate must be an
ori a0, a1, %hi(foo) # CHECK: :[[@LINE]]:13: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
andi ra, sp, %pcrel_hi(123) # CHECK: :[[@LINE]]:14: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
xori a2, a3, %hi(345) # CHECK: :[[@LINE]]:14: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
-add a1, a2, (a3) # CHECK: :[[@LINE]]:13: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
-add a1, a2, foo # CHECK: :[[@LINE]]:13: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+add a1, a2, (a3) # CHECK: :[[@LINE]]:1: error: invalid instruction
+add a1, a2, foo # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-2]]:13: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
## uimm12
csrrw a0, %lo(1), a0 # CHECK: :[[@LINE]]:11: error: immediate must be an integer in the range [0, 4095]
@@ -145,7 +147,9 @@ auipc a0, %pcrel_lo(foo) # CHECK: :[[@LINE]]:11: error: operand must be a symbol
# TP-relative symbol names require a %tprel_add modifier.
add a0, a0, tp, zero # CHECK: :[[@LINE]]:17: error: expected '%' relocation specifier
-add a0, a0, tp, %hi(foo) # CHECK: :[[@LINE]]:17: error: operand must be a symbol with %tprel_add specifier
+add a0, a0, tp, %hi(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:17: note: too many operands for instruction
+# CHECK: :[[@LINE-2]]:17: note: operand must be a symbol with %tprel_add specifier
add a0, tp, a0, %tprel_add(foo) # CHECK: :[[@LINE]]:13: error: the second input operand must be tp/x4 when using %tprel_add specifier
# Unrecognized operand modifier
@@ -156,8 +160,8 @@ addi t0, sp, %pltpcrel(255) # CHECK: :[[@LINE]]:14: error: operand must be a sym
addi t1, %lo(t2), 1 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
# Invalid mnemonics
-subs t0, t2, t1 # CHECK: :[[@LINE]]:1: error: unrecognized instruction mnemonic
-nandi t0, zero, 0 # CHECK: :[[@LINE]]:1: error: unrecognized instruction mnemonic
+subs t0, t2, t1 # CHECK: :[[@LINE]]:1: error: unrecognized instruction mnemonic, did you mean: sb, sub?
+nandi t0, zero, 0 # CHECK: :[[@LINE]]:1: error: unrecognized instruction mnemonic, did you mean: and, andi?
# Invalid register names
addi foo, sp, 10 # CHECK: :[[@LINE]]:6: error: invalid operand for instruction
@@ -173,14 +177,14 @@ xori sp, 22, 220 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
sub t0, t2, 1 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
# Too many operands
-sltiu s2, s3, 0x50, 0x60 # CHECK: :[[@LINE]]:21: error: invalid operand for instruction
+sltiu s2, s3, 0x50, 0x60 # CHECK: :[[@LINE]]:21: error: too many operands for instruction
# Memory operand not formatted correctly
-lw a4, a5, 111 # CHECK: :[[@LINE]]:12: error: invalid operand for instruction
+lw a4, a5, 111 # CHECK: :[[@LINE]]:12: error: too many operands for instruction
# Too few operands
-ori a0, a1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
-xor s2, s2 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+ori a0, a1 # CHECK: :[[@LINE]]:11: error: too few operands for instruction
+xor s2, s2 # CHECK: :[[@LINE]]:11: error: too few operands for instruction
# Instruction not in the base ISA
div a4, ra, s0 # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'M' (Integer Multiplication and Division){{$}}
@@ -201,4 +205,4 @@ bset a0, a1, a2 # CHECK: :[[@LINE]]:1: error: instruction requires the following
addi a2, ft0, 24 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
# fence.tso accepts no operands
-fence.tso rw, rw # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+fence.tso rw, rw # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rv32q-invalid.s b/llvm/test/MC/RISCV/rv32q-invalid.s
index 9b74f9f1d59c1..091326d5e3fc0 100644
--- a/llvm/test/MC/RISCV/rv32q-invalid.s
+++ b/llvm/test/MC/RISCV/rv32q-invalid.s
@@ -15,7 +15,7 @@ flq ft1, 100(a10) # CHECK: :[[@LINE]]:14: error: expected register
fsgnjn.q fa100, fa2, fa3 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
# Integer registers where FP regs are expected
-fadd.q a2, a1, a0 # CHECK: :[[@LINE]]:8: error: invalid operand for instruction
+fadd.q a2, a1, a0 # CHECK: :[[@LINE]]:1: error: invalid instruction
# FP registers where integer regs are expected
-fcvt.wu.q ft2, a1 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+fcvt.wu.q ft2, a1 # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rv32xqccmp-invalid.s b/llvm/test/MC/RISCV/rv32xqccmp-invalid.s
index 635cd8b21e1e0..cfe159ef0f99b 100644
--- a/llvm/test/MC/RISCV/rv32xqccmp-invalid.s
+++ b/llvm/test/MC/RISCV/rv32xqccmp-invalid.s
@@ -1,13 +1,13 @@
# RUN: not llvm-mc -triple=riscv32 -mattr=+xqccmp -M no-aliases -show-encoding < %s 2>&1 \
# RUN: | FileCheck -check-prefixes=CHECK-ERROR %s
-# CHECK-ERROR: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
qc.cm.mvsa01 a1, a2
# CHECK-ERROR: :[[@LINE+1]]:14: error: rs1 and rs2 must be different
qc.cm.mvsa01 s0, s0
-# CHECK-ERROR: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
qc.cm.mva01s a1, a2
# CHECK-ERROR: :[[@LINE+1]]:15: error: invalid register list, '{ra, s0-s10}' or '{x1, x8-x9, x18-x26}' is not supported
@@ -37,8 +37,8 @@ qc.cm.pop {ra, s0-s1}, -40
# CHECK-ERROR: :[[@LINE+1]]:14: error: register list must include 's0' or 'x8'
qc.cm.pushfp {ra}, -16
-# CHECK-ERROR: :[[@LINE+1]]:12: error: operand must be {ra [, s0[-sN]]} or {x1 [, x8[-x9][, x18[-xN]]]}
+# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
qc.cm.push x1, -16
-# CHECK-ERROR: :[[@LINE+1]]:14: error: operand must be {ra, s0[-sN]} or {x1, x8[-x9][, x18[-xN]]}
+# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
qc.cm.pushfp x1, -16
diff --git a/llvm/test/MC/RISCV/rv32xtheadbs-invalid.s b/llvm/test/MC/RISCV/rv32xtheadbs-invalid.s
index 4246681aee224..b1f467f1902df 100644
--- a/llvm/test/MC/RISCV/rv32xtheadbs-invalid.s
+++ b/llvm/test/MC/RISCV/rv32xtheadbs-invalid.s
@@ -1,7 +1,7 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+xtheadbs < %s 2>&1 | FileCheck %s
# Too few operands
-th.tst t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+th.tst t0, t1 # CHECK: :[[@LINE]]:14: error: too few operands for instruction
# Immediate operand out of range
th.tst t0, t1, 32 # CHECK: :[[@LINE]]:16: error: immediate must be an integer in the range [0, 31]
th.tst t0, t1, -1 # CHECK: :[[@LINE]]:16: error: immediate must be an integer in the range [0, 31]
diff --git a/llvm/test/MC/RISCV/rv32xtheadmempair-invalid.s b/llvm/test/MC/RISCV/rv32xtheadmempair-invalid.s
index 8a7202ffd375e..743634616b258 100644
--- a/llvm/test/MC/RISCV/rv32xtheadmempair-invalid.s
+++ b/llvm/test/MC/RISCV/rv32xtheadmempair-invalid.s
@@ -1,19 +1,19 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+xtheadmempair < %s 2>&1 | FileCheck %s
-th.ldd t0, t1, (t2), 5, 4 # CHECK: [[@LINE]]:22: error: invalid operand for instruction
-th.ldd t0, t1, (t2) # CHECK: [[@LINE]]:1: error: too few operands for instruction
-th.ldd t0, t1, (t2), 3, 5 # CHECK: [[@LINE]]:25: error: invalid operand for instruction
-th.sdd a0, a1, (a2), 5, 4 # CHECK: [[@LINE]]:22: error: invalid operand for instruction
-th.sdd a0, a1, (a2) # CHECK: [[@LINE]]:1: error: too few operands for instruction
-th.sdd a0, a1, (a2), 3, 5 # CHECK: [[@LINE]]:25: error: invalid operand for instruction
-th.lwud t0, t1, (t2), 5, 4 # CHECK: [[@LINE]]:23: error: immediate must be an integer in the range [0, 3]
-th.lwud t0, t1, (t2) # CHECK: [[@LINE]]:1: error: too few operands for instruction
+th.ldd t0, t1, (t2), 5, 4 # CHECK: [[@LINE]]:1: error: invalid instruction
+th.ldd t0, t1, (t2) # CHECK: [[@LINE]]:1: error: invalid instruction
+th.ldd t0, t1, (t2), 3, 5 # CHECK: [[@LINE]]:1: error: invalid instruction
+th.sdd a0, a1, (a2), 5, 4 # CHECK: [[@LINE]]:1: error: invalid instruction
+th.sdd a0, a1, (a2) # CHECK: [[@LINE]]:1: error: invalid instruction
+th.sdd a0, a1, (a2), 3, 5 # CHECK: [[@LINE]]:1: error: invalid instruction
+th.lwud t0, t1, (t2), 5, 4 # CHECK: [[@LINE]]:1: error: invalid instruction
+th.lwud t0, t1, (t2) # CHECK: [[@LINE]]:29: error: too few operands for instruction
th.lwud t0, t1, (t2), 3, 5 # CHECK: [[@LINE]]:26: error: operand must be constant 3
-th.lwd a3, a4, (a5), 5, 4 # CHECK: [[@LINE]]:22: error: immediate must be an integer in the range [0, 3]
-th.lwd a3, a4, (a5) # CHECK: [[@LINE]]:1: error: too few operands for instruction
+th.lwd a3, a4, (a5), 5, 4 # CHECK: [[@LINE]]:1: error: invalid instruction
+th.lwd a3, a4, (a5) # CHECK: [[@LINE]]:29: error: too few operands for instruction
th.lwd a3, a4, (a5), 3, 5 # CHECK: [[@LINE]]:25: error: operand must be constant 3
-th.swd t3, t4, (t5), 5, 4 # CHECK: [[@LINE]]:22: error: immediate must be an integer in the range [0, 3]
-th.swd t3, t4, (t5) # CHECK: [[@LINE]]:1: error: too few operands for instruction
+th.swd t3, t4, (t5), 5, 4 # CHECK: [[@LINE]]:1: error: invalid instruction
+th.swd t3, t4, (t5) # CHECK: [[@LINE]]:29: error: too few operands for instruction
th.swd t3, t4, (t5), 3, 5 # CHECK: [[@LINE]]:25: error: operand must be constant 3
th.lwd x6, x7, (x7), 2, 3 # CHECK: [[@LINE]]:8: error: rs1, rd1, and rd2 cannot overlap
th.lwud x6, x6, (x6), 2, 3 # CHECK: [[@LINE]]:9: error: rs1, rd1, and rd2 cannot overlap
diff --git a/llvm/test/MC/RISCV/rv32zalrsc-invalid.s b/llvm/test/MC/RISCV/rv32zalrsc-invalid.s
index b1eb982a9763d..5a2826d168e1e 100644
--- a/llvm/test/MC/RISCV/rv32zalrsc-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zalrsc-invalid.s
@@ -5,4 +5,4 @@
lr.w a4, a5 # CHECK: :[[@LINE]]:10: error: expected '(' or optional integer offset
# lr only takes two operands
-lr.w s0, (s1), s2 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
+lr.w s0, (s1), s2 # CHECK: :[[@LINE]]:16: error: too many operands for instruction
diff --git a/llvm/test/MC/RISCV/rv32zba-invalid.s b/llvm/test/MC/RISCV/rv32zba-invalid.s
index 0efc958c98e01..41e8076f49572 100644
--- a/llvm/test/MC/RISCV/rv32zba-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zba-invalid.s
@@ -1,11 +1,11 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+zba < %s 2>&1 | FileCheck %s
# Too few operands
-sh1add t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+sh1add t0, t1 # CHECK: :[[@LINE]]:14: error: too few operands for instruction
# Too few operands
-sh2add t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+sh2add t0, t1 # CHECK: :[[@LINE]]:14: error: too few operands for instruction
# Too few operands
-sh3add t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+sh3add t0, t1 # CHECK: :[[@LINE]]:14: error: too few operands for instruction
slli.uw t0, t1, 0 # CHECK: :[[@LINE]]:1: error: instruction requires the following: RV64I Base Instruction Set{{$}}
add.uw t0, t1, t2 # CHECK: :[[@LINE]]:1: error: instruction requires the following: RV64I Base Instruction Set{{$}}
sh1add.uw t0, t1, t2 # CHECK: :[[@LINE]]:1: error: instruction requires the following: RV64I Base Instruction Set{{$}}
diff --git a/llvm/test/MC/RISCV/rv32zbb-invalid.s b/llvm/test/MC/RISCV/rv32zbb-invalid.s
index c23593a106b00..31c2eaf2b1a37 100644
--- a/llvm/test/MC/RISCV/rv32zbb-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zbb-invalid.s
@@ -1,38 +1,38 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+zbb < %s 2>&1 | FileCheck %s
# Too many operands
-clz t0, t1, t2 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
+clz t0, t1, t2 # CHECK: :[[@LINE]]:13: error: too many operands for instruction
# Too many operands
-ctz t0, t1, t2 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
+ctz t0, t1, t2 # CHECK: :[[@LINE]]:13: error: too many operands for instruction
# Too many operands
-cpop t0, t1, t2 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
+cpop t0, t1, t2 # CHECK: :[[@LINE]]:14: error: too many operands for instruction
# Too many operands
-sext.b t0, t1, t2 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
+sext.b t0, t1, t2 # CHECK: :[[@LINE]]:16: error: too many operands for instruction
# Too many operands
-sext.h t0, t1, t2 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
+sext.h t0, t1, t2 # CHECK: :[[@LINE]]:16: error: too many operands for instruction
# Too few operands
-min t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+min t0, t1 # CHECK: :[[@LINE]]:11: error: too few operands for instruction
# Too few operands
-max t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+max t0, t1 # CHECK: :[[@LINE]]:11: error: too few operands for instruction
# Too few operands
-minu t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+minu t0, t1 # CHECK: :[[@LINE]]:12: error: too few operands for instruction
# Too few operands
-maxu t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+maxu t0, t1 # CHECK: :[[@LINE]]:12: error: too few operands for instruction
clzw t0, t1 # CHECK: :[[@LINE]]:1: error: instruction requires the following: RV64I Base Instruction Set{{$}}
ctzw t0, t1 # CHECK: :[[@LINE]]:1: error: instruction requires the following: RV64I Base Instruction Set{{$}}
cpopw t0, t1 # CHECK: :[[@LINE]]:1: error: instruction requires the following: RV64I Base Instruction Set{{$}}
# Too few operands
-andn t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+andn t0, t1 # CHECK: :[[@LINE]]:12: error: too few operands for instruction
# Too few operands
-orn t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+orn t0, t1 # CHECK: :[[@LINE]]:11: error: too few operands for instruction
# Too few operands
-xnor t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+xnor t0, t1 # CHECK: :[[@LINE]]:12: error: too few operands for instruction
# Too few operands
-rol t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+rol t0, t1 # CHECK: :[[@LINE]]:11: error: too few operands for instruction
# Too few operands
-ror t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+ror t0, t1 # CHECK: :[[@LINE]]:11: error: too few operands for instruction
# Too few operands
-rori t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+rori t0, t1 # CHECK: :[[@LINE]]:12: error: too few operands for instruction
# Immediate operand out of range
rori t0, t1, 32 # CHECK: :[[@LINE]]:14: error: immediate must be an integer in the range [0, 31]
rori t0, t1, -1 # CHECK: :[[@LINE]]:14: error: immediate must be an integer in the range [0, 31]
diff --git a/llvm/test/MC/RISCV/rv32zbc-invalid.s b/llvm/test/MC/RISCV/rv32zbc-invalid.s
index 044bf46307b02..bee93e98d62f5 100644
--- a/llvm/test/MC/RISCV/rv32zbc-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zbc-invalid.s
@@ -1,8 +1,8 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+zbc < %s 2>&1 | FileCheck %s
# Too few operands
-clmul t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+clmul t0, t1 # CHECK: :[[@LINE]]:13: error: too few operands for instruction
# Too few operands
-clmulr t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+clmulr t0, t1 # CHECK: :[[@LINE]]:14: error: too few operands for instruction
# Too few operands
-clmulh t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+clmulh t0, t1 # CHECK: :[[@LINE]]:14: error: too few operands for instruction
diff --git a/llvm/test/MC/RISCV/rv32zbkc-invalid.s b/llvm/test/MC/RISCV/rv32zbkc-invalid.s
index 4ee623ee62f61..99c512269d8f7 100644
--- a/llvm/test/MC/RISCV/rv32zbkc-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zbkc-invalid.s
@@ -1,9 +1,9 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+zbkc < %s 2>&1 | FileCheck %s
# Too few operands
-clmul t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+clmul t0, t1 # CHECK: :[[@LINE]]:13: error: too few operands for instruction
# Too few operands
-clmulh t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+clmulh t0, t1 # CHECK: :[[@LINE]]:14: error: too few operands for instruction
# Undefined zbc instruction in zbkc
clmulr t0, t1, t2 # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'Zbc' (Carry-Less Multiplication){{$}}
diff --git a/llvm/test/MC/RISCV/rv32zbkx-invalid.s b/llvm/test/MC/RISCV/rv32zbkx-invalid.s
index 6c2cafd335293..8dc246e5d47f4 100644
--- a/llvm/test/MC/RISCV/rv32zbkx-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zbkx-invalid.s
@@ -1,6 +1,6 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+zbkx < %s 2>&1 | FileCheck %s
# Too few operands
-xperm8 t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+xperm8 t0, t1 # CHECK: :[[@LINE]]:14: error: too few operands for instruction
# Too few operands
-xperm4 t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+xperm4 t0, t1 # CHECK: :[[@LINE]]:14: error: too few operands for instruction
diff --git a/llvm/test/MC/RISCV/rv32zbs-invalid.s b/llvm/test/MC/RISCV/rv32zbs-invalid.s
index b18ecb3e82121..7e1f2557839d7 100644
--- a/llvm/test/MC/RISCV/rv32zbs-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zbs-invalid.s
@@ -1,30 +1,30 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+zbs < %s 2>&1 | FileCheck %s
# Too few operands
-bclr t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+bclr t0, t1 # CHECK: :[[@LINE]]:12: error: too few operands for instruction
# Too few operands
-bset t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+bset t0, t1 # CHECK: :[[@LINE]]:12: error: too few operands for instruction
# Too few operands
-binv t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+binv t0, t1 # CHECK: :[[@LINE]]:12: error: too few operands for instruction
# Too few operands
-bext t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+bext t0, t1 # CHECK: :[[@LINE]]:12: error: too few operands for instruction
# Too few operands
-bclri t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+bclri t0, t1 # CHECK: :[[@LINE]]:13: error: too few operands for instruction
# Immediate operand out of range
bclri t0, t1, 32 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 31]
bclri t0, t1, -1 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 31]
# Too few operands
-bseti t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+bseti t0, t1 # CHECK: :[[@LINE]]:13: error: too few operands for instruction
# Immediate operand out of range
bseti t0, t1, 32 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 31]
bseti t0, t1, -1 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 31]
# Too few operands
-binvi t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+binvi t0, t1 # CHECK: :[[@LINE]]:13: error: too few operands for instruction
# Immediate operand out of range
binvi t0, t1, 32 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 31]
binvi t0, t1, -1 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 31]
# Too few operands
-bexti t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+bexti t0, t1 # CHECK: :[[@LINE]]:13: error: too few operands for instruction
# Immediate operand out of range
bexti t0, t1, 32 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 31]
bexti t0, t1, -1 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 31]
diff --git a/llvm/test/MC/RISCV/rv32zclsd-invalid.s b/llvm/test/MC/RISCV/rv32zclsd-invalid.s
index 78e391c56ab87..ec8ddb61f6e5e 100644
--- a/llvm/test/MC/RISCV/rv32zclsd-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zclsd-invalid.s
@@ -1,19 +1,19 @@
# RUN: not llvm-mc -triple=riscv32 -mattr=+zclsd < %s 2>&1 | FileCheck %s
## GPRPairC
-c.ld t1, 4(sp) # CHECK: :[[@LINE]]:6: error: invalid operand for instruction
-c.sd s2, 4(sp) # CHECK: :[[@LINE]]:6: error: invalid operand for instruction
+c.ld t1, 4(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+c.sd s2, 4(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
## GPRPairNoX0
-c.ldsp x0, 4(sp) # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
-c.ldsp zero, 4(sp) # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+c.ldsp x0, 4(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+c.ldsp zero, 4(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
## uimm9_lsb000
c.ldsp t1, 512(sp) # CHECK: :[[@LINE]]:12: error: immediate must be a multiple of 8 bytes in the range [0, 504]
c.sdsp t1, -8(sp) # CHECK: :[[@LINE]]:12: error: immediate must be a multiple of 8 bytes in the range [0, 504]
## uimm8_lsb000
-c.ld s0, -8(sp) # CHECK: :[[@LINE]]:11: error: immediate must be a multiple of 8 bytes in the range [0, 248]
-c.sd s0, 256(sp) # CHECK: :[[@LINE]]:11: error: immediate must be a multiple of 8 bytes in the range [0, 248]
+c.ld s0, -8(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+c.sd s0, 256(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
# Invalid register names
c.ld a1, 4(sp) # CHECK: :[[@LINE]]:6: error: register must be even
diff --git a/llvm/test/MC/RISCV/rv32zcmop-invalid.s b/llvm/test/MC/RISCV/rv32zcmop-invalid.s
index fb6252f7f0760..c550d903ace26 100644
--- a/llvm/test/MC/RISCV/rv32zcmop-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zcmop-invalid.s
@@ -1,7 +1,7 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+zcmop < %s 2>&1 | FileCheck %s
-c.mop.0 # CHECK: :[[@LINE]]:1: error: unrecognized instruction mnemonic
+c.mop.0 # CHECK: :[[@LINE]]:1: error: unrecognized instruction mnemonic, did you mean: c.mop.1, c.mop.3, c.mop.5, c.mop.7, c.mop.9?
-c.mop.1 t0 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+c.mop.1 t0 # CHECK: :[[@LINE]]:9: error: too many operands for instruction
-c.mop.1 0x0 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+c.mop.1 0x0 # CHECK: :[[@LINE]]:9: error: too many operands for instruction
diff --git a/llvm/test/MC/RISCV/rv32zcmp-invalid.s b/llvm/test/MC/RISCV/rv32zcmp-invalid.s
index 68aa7fc548f61..3732e1662d152 100644
--- a/llvm/test/MC/RISCV/rv32zcmp-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zcmp-invalid.s
@@ -1,13 +1,13 @@
# RUN: not llvm-mc -triple=riscv32 -mattr=zcmp -M no-aliases -show-encoding < %s 2>&1 \
# RUN: | FileCheck -check-prefixes=CHECK-ERROR %s
-# CHECK-ERROR: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
cm.mvsa01 a1, a2
# CHECK-ERROR: :[[@LINE+1]]:11: error: rs1 and rs2 must be different
cm.mvsa01 s0, s0
-# CHECK-ERROR: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
cm.mva01s a1, a2
# CHECK-ERROR: :[[@LINE+1]]:12: error: invalid register list, '{ra, s0-s10}' or '{x1, x8-x9, x18-x26}' is not supported
@@ -46,7 +46,7 @@ cm.pop {x1, x8-x9, x18-x17}, -40
# CHECK-ERROR: :[[@LINE+1]]:16: error: register must be 'x9'
cm.pop {x1, x8-f8, x18-x17}, -40
-# CHECK-ERROR: :[[@LINE+1]]:9: error: operand must be {ra [, s0[-sN]]} or {x1 [, x8[-x9][, x18[-xN]]]}
+# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
cm.push x1, -16
# CHECK-ERROR: :[[@LINE+1]]:16: error: register must be in the range 's1' to 's11'
diff --git a/llvm/test/MC/RISCV/rv32zdinx-invalid.s b/llvm/test/MC/RISCV/rv32zdinx-invalid.s
index e79caa074d255..68c1c2158befa 100644
--- a/llvm/test/MC/RISCV/rv32zdinx-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zdinx-invalid.s
@@ -8,8 +8,8 @@ flw fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following
fadd.d fa0, fa1, fa2 # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'D' (Double-Precision Floating-Point){{$}}
# Invalid instructions
-fsw a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
-fmv.x.w s0, s1 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
+fsw a5, 12(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.x.w s0, s1 # CHECK: :[[@LINE]]:1: error: invalid instruction
# Invalid register names
fadd.d a100, a2, a4 # CHECK: :[[@LINE]]:8: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rv32zfh-invalid.s b/llvm/test/MC/RISCV/rv32zfh-invalid.s
index f66cb3f9784d5..55990f65c60cf 100644
--- a/llvm/test/MC/RISCV/rv32zfh-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zfh-invalid.s
@@ -16,10 +16,10 @@ flh ft1, 100(a10) # CHECK: :[[@LINE]]:14: error: expected register
fsgnjn.h fa100, fa2, fa3 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
# Integer registers where FP regs are expected
-fmv.x.h fs7, a2 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+fmv.x.h fs7, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
# FP registers where integer regs are expected
-fmv.h.x a8, ft2 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+fmv.h.x a8, ft2 # CHECK: :[[@LINE]]:1: error: invalid instruction
# Rounding mode when a register is expected
fmadd.h f10, f11, f12, ree # CHECK: :[[@LINE]]:24: error: invalid operand for instruction
@@ -30,7 +30,7 @@ fmsub.h f14, f15, f16, f17, 0 # CHECK: :[[@LINE]]:29: error: operand must be a v
fnmsub.h f18, f19, f20, f21, 0b111 # CHECK: :[[@LINE]]:30: error: operand must be a valid floating point rounding mode mnemonic
# Integer registers where FP regs are expected
-fadd.h a2, a1, a0 # CHECK: :[[@LINE]]:8: error: invalid operand for instruction
+fadd.h a2, a1, a0 # CHECK: :[[@LINE]]:1: error: invalid instruction
# FP registers where integer regs are expected
-fcvt.wu.h ft2, a1 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+fcvt.wu.h ft2, a1 # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rv32zfinx-invalid.s b/llvm/test/MC/RISCV/rv32zfinx-invalid.s
index 0cd1700b3363c..e1cc228887787 100644
--- a/llvm/test/MC/RISCV/rv32zfinx-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zfinx-invalid.s
@@ -5,8 +5,8 @@ flw fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following
fadd.s fa0, fa1, fa2 # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'F' (Single-Precision Floating-Point){{$}}
# Invalid instructions
-fsw a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
-fmv.x.w s0, s1 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
+fsw a5, 12(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.x.w s0, s1 # CHECK: :[[@LINE]]:1: error: invalid instruction
fadd.d t1, t3, t5 # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'Zdinx' (Double in Integer){{$}}
# Invalid register names
diff --git a/llvm/test/MC/RISCV/rv32zhinx-invalid.s b/llvm/test/MC/RISCV/rv32zhinx-invalid.s
index 9aa463e7076d2..d7a056e11e8cf 100644
--- a/llvm/test/MC/RISCV/rv32zhinx-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zhinx-invalid.s
@@ -5,8 +5,8 @@ flw fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following
fadd.h fa0, fa1, fa2 # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'Zfh' (Half-Precision Floating-Point){{$}}
# Invalid instructions
-fsw a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
-fmv.x.h s0, s1 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
+fsw a5, 12(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.x.h s0, s1 # CHECK: :[[@LINE]]:1: error: invalid instruction
# Invalid register names
fadd.h a100, a2, a3 # CHECK: :[[@LINE]]:8: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rv32zhinxmin-invalid.s b/llvm/test/MC/RISCV/rv32zhinxmin-invalid.s
index d5e33f8ae0eae..27918f1e5d594 100644
--- a/llvm/test/MC/RISCV/rv32zhinxmin-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zhinxmin-invalid.s
@@ -5,8 +5,8 @@ flw fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following
fcvt.h.s fa0, fa1 # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'Zfh' (Half-Precision Floating-Point) or 'Zfhmin' (Half-Precision Floating-Point Minimal){{$}}
# Invalid instructions
-fsw a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
-fmv.x.h s0, s1 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
+fsw a5, 12(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.x.h s0, s1 # CHECK: :[[@LINE]]:1: error: invalid instruction
# Invalid register names
fcvt.h.s a100, a1 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rv32zimop-invalid.s b/llvm/test/MC/RISCV/rv32zimop-invalid.s
index e4672016bbf76..8dc1f2a708d4e 100644
--- a/llvm/test/MC/RISCV/rv32zimop-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zimop-invalid.s
@@ -1,6 +1,6 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+zimop < %s 2>&1 | FileCheck %s
# Too few operands
-mop.r.0 t0 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+mop.r.0 t0 # CHECK: :[[@LINE]]:11: error: too few operands for instruction
# Too few operands
-mop.rr.0 t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+mop.rr.0 t0, t1 # CHECK: :[[@LINE]]:16: error: too few operands for instruction
diff --git a/llvm/test/MC/RISCV/rv64c-invalid.s b/llvm/test/MC/RISCV/rv64c-invalid.s
index e79686b4b035c..225900ee440fb 100644
--- a/llvm/test/MC/RISCV/rv64c-invalid.s
+++ b/llvm/test/MC/RISCV/rv64c-invalid.s
@@ -3,9 +3,9 @@
## GPRC
c.ld ra, 4(sp)
-# CHECK: :[[#@LINE-1]]:6: error: register must be a GPR from x8 to x15
+# CHECK: :[[#@LINE-1]]:1: error: invalid instruction
c.sd sp, 4(sp)
-# CHECK: :[[#@LINE-1]]:6: error: register must be a GPR from x8 to x15
+# CHECK: :[[#@LINE-1]]:1: error: invalid instruction
c.addw a0, a7
# CHECK: :[[#@LINE-1]]:14: error: register must be a GPR from x8 to x15
c.subw a0, a6
@@ -13,9 +13,9 @@ c.subw a0, a6
## GPRNoX0
c.ldsp x0, 4(sp)
-# CHECK: :[[#@LINE-1]]:9: error: register must be a GPR excluding zero (x0)
+# CHECK: :[[#@LINE-1]]:1: error: invalid instruction
c.ldsp zero, 4(sp)
-# CHECK: :[[#@LINE-1]]:9: error: register must be a GPR excluding zero (x0)
+# CHECK: :[[#@LINE-1]]:1: error: invalid instruction
# Out of range immediates
@@ -44,6 +44,6 @@ c.sdsp ra, -8(sp)
# CHECK: :[[#@LINE-1]]:13: error: immediate must be a multiple of 8 bytes in the range [0, 504]
## uimm8_lsb000
c.ld s0, -8(sp)
-# CHECK: :[[#@LINE-1]]:11: error: immediate must be a multiple of 8 bytes in the range [0, 248]
+# CHECK: :[[#@LINE-1]]:1: error: invalid instruction
c.sd s0, 256(sp)
-# CHECK: :[[#@LINE-1]]:11: error: immediate must be a multiple of 8 bytes in the range [0, 248]
+# CHECK: :[[#@LINE-1]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rv64d-invalid.s b/llvm/test/MC/RISCV/rv64d-invalid.s
index 0f508aafd9be5..337223c131aab 100644
--- a/llvm/test/MC/RISCV/rv64d-invalid.s
+++ b/llvm/test/MC/RISCV/rv64d-invalid.s
@@ -1,11 +1,11 @@
# RUN: not llvm-mc -triple riscv64 -mattr=+d < %s 2>&1 | FileCheck %s
# Integer registers where FP regs are expected
-fcvt.l.d ft0, a0 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
-fcvt.lu.d ft1, a1 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
-fmv.x.d ft2, a2 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+fcvt.l.d ft0, a0 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.lu.d ft1, a1 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.x.d ft2, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
# FP registers where integer regs are expected
-fcvt.d.l a3, ft3 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
-fcvt.d.lu a4, ft4 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
-fmv.d.x a5, ft5 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+fcvt.d.l a3, ft3 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.d.lu a4, ft4 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.d.x a5, ft5 # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rv64f-invalid.s b/llvm/test/MC/RISCV/rv64f-invalid.s
index 698da796a7e70..9ec17c93ab924 100644
--- a/llvm/test/MC/RISCV/rv64f-invalid.s
+++ b/llvm/test/MC/RISCV/rv64f-invalid.s
@@ -1,9 +1,9 @@
# RUN: not llvm-mc -triple riscv64 -mattr=+f < %s 2>&1 | FileCheck %s
# Integer registers where FP regs are expected
-fcvt.l.s ft0, a0 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
-fcvt.lu.s ft1, a1 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+fcvt.l.s ft0, a0 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.lu.s ft1, a1 # CHECK: :[[@LINE]]:1: error: invalid instruction
# FP registers where integer regs are expected
-fcvt.s.l a2, ft2 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
-fcvt.s.lu a3, ft3 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+fcvt.s.l a2, ft2 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.s.lu a3, ft3 # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rv64h-invalid.s b/llvm/test/MC/RISCV/rv64h-invalid.s
index 4838cbd7ddd65..f77d6e7ac2a86 100644
--- a/llvm/test/MC/RISCV/rv64h-invalid.s
+++ b/llvm/test/MC/RISCV/rv64h-invalid.s
@@ -3,7 +3,9 @@
# RUN: not llvm-mc -triple riscv64 < %s 2>&1 \
# RUN: | FileCheck %s -check-prefixes=CHECK,CHECK-OFFSET
-hfence.vvma zero, zero # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'H' (Hypervisor)
+hfence.vvma zero, zero # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:19: note: too many operands for instruction
+# CHECK: :[[@LINE-2]]:1: note: instruction requires the following: 'H' (Hypervisor)
hlv.h a0, 0(a1) # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'H' (Hypervisor)
diff --git a/llvm/test/MC/RISCV/rv64i-aliases-invalid.s b/llvm/test/MC/RISCV/rv64i-aliases-invalid.s
index cc35346cb8801..398cec1c57f39 100644
--- a/llvm/test/MC/RISCV/rv64i-aliases-invalid.s
+++ b/llvm/test/MC/RISCV/rv64i-aliases-invalid.s
@@ -3,50 +3,112 @@
# RUN: not llvm-mc -triple=riscv64 < %s 2>&1 -o /dev/null | FileCheck %s
li t5, 0x10000000000000000 # CHECK: :[[@LINE]]:8: error: unknown operand
-li t4, foo # CHECK: :[[@LINE]]:8: error: operand must be a constant 64-bit integer
+li t4, foo # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK: :[[@LINE-2]]:8: note: operand must be a constant 64-bit integer
la t5, 0x10000000000000000 # CHECK: :[[@LINE]]:8: error: unknown operand
-la x1, %pcrel_hi(1234) # CHECK: :[[@LINE]]:8: error: operand either must be a constant 64-bit integer or a bare symbol name
-la x1, %pcrel_lo(1234) # CHECK: :[[@LINE]]:8: error: operand either must be a constant 64-bit integer or a bare symbol name
-la x1, %pcrel_hi(foo) # CHECK: :[[@LINE]]:8: error: operand either must be a constant 64-bit integer or a bare symbol name
-la x1, %pcrel_lo(foo) # CHECK: :[[@LINE]]:8: error: operand either must be a constant 64-bit integer or a bare symbol name
-la x1, %hi(1234) # CHECK: :[[@LINE]]:8: error: operand either must be a constant 64-bit integer or a bare symbol name
-la x1, %lo(1234) # CHECK: :[[@LINE]]:8: error: operand either must be a constant 64-bit integer or a bare symbol name
-la x1, %hi(foo) # CHECK: :[[@LINE]]:8: error: operand either must be a constant 64-bit integer or a bare symbol name
-la x1, %lo(foo) # CHECK: :[[@LINE]]:8: error: operand either must be a constant 64-bit integer or a bare symbol name
-la a1, foo+foo # CHECK: :[[@LINE]]:8: error: operand either must be a constant 64-bit integer or a bare symbol name
+la x1, %pcrel_hi(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
+la x1, %pcrel_lo(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
+la x1, %pcrel_hi(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
+la x1, %pcrel_lo(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
+la x1, %hi(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
+la x1, %lo(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
+la x1, %hi(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
+la x1, %lo(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
+la a1, foo+foo # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
lla t5, 0x10000000000000000 # CHECK: :[[@LINE]]:9: error: unknown operand
-lla x1, %pcrel_hi(1234) # CHECK: :[[@LINE]]:9: error: operand either must be a constant 64-bit integer or a bare symbol name
-lla x1, %pcrel_lo(1234) # CHECK: :[[@LINE]]:9: error: operand either must be a constant 64-bit integer or a bare symbol name
-lla x1, %pcrel_hi(foo) # CHECK: :[[@LINE]]:9: error: operand either must be a constant 64-bit integer or a bare symbol name
-lla x1, %pcrel_lo(foo) # CHECK: :[[@LINE]]:9: error: operand either must be a constant 64-bit integer or a bare symbol name
-lla x1, %hi(1234) # CHECK: :[[@LINE]]:9: error: operand either must be a constant 64-bit integer or a bare symbol name
-lla x1, %lo(1234) # CHECK: :[[@LINE]]:9: error: operand either must be a constant 64-bit integer or a bare symbol name
-lla x1, %hi(foo) # CHECK: :[[@LINE]]:9: error: operand either must be a constant 64-bit integer or a bare symbol name
-lla x1, %lo(foo) # CHECK: :[[@LINE]]:9: error: operand either must be a constant 64-bit integer or a bare symbol name
-lla a1, foo+foo # CHECK: :[[@LINE]]:9: error: operand either must be a constant 64-bit integer or a bare symbol name
+lla x1, %pcrel_hi(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
+lla x1, %pcrel_lo(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
+lla x1, %pcrel_hi(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
+lla x1, %pcrel_lo(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
+lla x1, %hi(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
+lla x1, %lo(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
+lla x1, %hi(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
+lla x1, %lo(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
+lla a1, foo+foo # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-2]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
lla a2, foo at plt # CHECK: :[[@LINE]]:12: error: unexpected token
rdinstreth x29 # CHECK: :[[@LINE]]:1: error: instruction requires the following: RV32I Base Instruction Set{{$}}
rdcycleh x27 # CHECK: :[[@LINE]]:1: error: instruction requires the following: RV32I Base Instruction Set{{$}}
rdtimeh x28 # CHECK: :[[@LINE]]:1: error: instruction requires the following: RV32I Base Instruction Set{{$}}
-sll x2, x3, 64 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 63]
-srl x2, x3, 64 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 63]
-sra x2, x3, 64 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 63]
+sll x2, x3, 64 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 63]
+srl x2, x3, 64 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 63]
+sra x2, x3, 64 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 63]
-sll x2, x3, -1 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 63]
-srl x2, x3, -2 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 63]
-sra x2, x3, -3 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 63]
+sll x2, x3, -1 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 63]
+srl x2, x3, -2 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 63]
+sra x2, x3, -3 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 63]
-sllw x2, x3, 32 # CHECK: :[[@LINE]]:14: error: immediate must be an integer in the range [0, 31]
-srlw x2, x3, 32 # CHECK: :[[@LINE]]:14: error: immediate must be an integer in the range [0, 31]
-sraw x2, x3, 32 # CHECK: :[[@LINE]]:14: error: immediate must be an integer in the range [0, 31]
+sllw x2, x3, 32 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:14: note: invalid operand for instruction
+# CHECK: :[[@LINE-2]]:14: note: immediate must be an integer in the range [0, 31]
+srlw x2, x3, 32 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:14: note: invalid operand for instruction
+# CHECK: :[[@LINE-2]]:14: note: immediate must be an integer in the range [0, 31]
+sraw x2, x3, 32 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:14: note: invalid operand for instruction
+# CHECK: :[[@LINE-2]]:14: note: immediate must be an integer in the range [0, 31]
-sllw x2, x3, -1 # CHECK: :[[@LINE]]:14: error: immediate must be an integer in the range [0, 31]
-srlw x2, x3, -2 # CHECK: :[[@LINE]]:14: error: immediate must be an integer in the range [0, 31]
-sraw x2, x3, -3 # CHECK: :[[@LINE]]:14: error: immediate must be an integer in the range [0, 31]
+sllw x2, x3, -1 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:14: note: invalid operand for instruction
+# CHECK: :[[@LINE-2]]:14: note: immediate must be an integer in the range [0, 31]
+srlw x2, x3, -2 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:14: note: invalid operand for instruction
+# CHECK: :[[@LINE-2]]:14: note: immediate must be an integer in the range [0, 31]
+sraw x2, x3, -3 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-1]]:14: note: invalid operand for instruction
+# CHECK: :[[@LINE-2]]:14: note: immediate must be an integer in the range [0, 31]
foo:
.space 8
diff --git a/llvm/test/MC/RISCV/rv64p-invalid.s b/llvm/test/MC/RISCV/rv64p-invalid.s
index 434abf54be3da..412fff140cb21 100644
--- a/llvm/test/MC/RISCV/rv64p-invalid.s
+++ b/llvm/test/MC/RISCV/rv64p-invalid.s
@@ -67,6 +67,6 @@ mulsu.h11 s8, s4, s0 # CHECK: :[[@LINE]]:1: error: instruction requires the foll
maccsu.h11 s0, a2, s6 # CHECK: :[[@LINE]]:1: error: instruction requires the following: RV32I Base Instruction Set
# FIXME: This error doesn't make sense. Should say that we need RV32I.
-pli.dh a0, 1 # CHECK: :[[@LINE]]:8: error: invalid operand for instruction
-pli.db s0, 1 # CHECK: :[[@LINE]]:8: error: invalid operand for instruction
-plui.dh t1, 1 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+pli.dh a0, 1 # CHECK: :[[@LINE]]:1: error: invalid instruction
+pli.db s0, 1 # CHECK: :[[@LINE]]:1: error: invalid instruction
+plui.dh t1, 1 # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rv64q-invalid.s b/llvm/test/MC/RISCV/rv64q-invalid.s
index ac469c268d7ad..8e68f2bfca8ed 100644
--- a/llvm/test/MC/RISCV/rv64q-invalid.s
+++ b/llvm/test/MC/RISCV/rv64q-invalid.s
@@ -1,9 +1,9 @@
# RUN: not llvm-mc -triple riscv64 -mattr=+q < %s 2>&1 | FileCheck %s
# Integer registers where FP regs are expected
-fcvt.l.q ft0, a0 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
-fcvt.lu.q ft1, a1 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+fcvt.l.q ft0, a0 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.lu.q ft1, a1 # CHECK: :[[@LINE]]:1: error: invalid instruction
# FP registers where integer regs are expected
-fcvt.q.l a3, ft3 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
-fcvt.q.lu a4, ft4 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+fcvt.q.l a3, ft3 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.q.lu a4, ft4 # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rv64xqccmp-invalid.s b/llvm/test/MC/RISCV/rv64xqccmp-invalid.s
index 1d4487ba599a5..f3e99607f85b1 100644
--- a/llvm/test/MC/RISCV/rv64xqccmp-invalid.s
+++ b/llvm/test/MC/RISCV/rv64xqccmp-invalid.s
@@ -1,13 +1,13 @@
# RUN: not llvm-mc -triple=riscv64 -mattr=xqccmp -M no-aliases -show-encoding < %s 2>&1 \
# RUN: | FileCheck -check-prefixes=CHECK-ERROR %s
-# CHECK-ERROR: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
qc.cm.mvsa01 a1, a2
# CHECK-ERROR: :[[@LINE+1]]:14: error: rs1 and rs2 must be different
qc.cm.mvsa01 s0, s0
-# CHECK-ERROR: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
qc.cm.mva01s a1, a2
# CHECK-ERROR: :[[@LINE+1]]:15: error: invalid register list, '{ra, s0-s10}' or '{x1, x8-x9, x18-x26}' is not supported
diff --git a/llvm/test/MC/RISCV/rv64xtheadfmemidx-invalid.s b/llvm/test/MC/RISCV/rv64xtheadfmemidx-invalid.s
index 57082d667e463..3777ca6235c1d 100644
--- a/llvm/test/MC/RISCV/rv64xtheadfmemidx-invalid.s
+++ b/llvm/test/MC/RISCV/rv64xtheadfmemidx-invalid.s
@@ -3,7 +3,7 @@
th.flrd fa0, a1, a2, 5 # CHECK: :[[@LINE]]:22: error: immediate must be an integer in the range [0, 3]
th.flrd a0, a1, a2, 3 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
-th.flrw 0(fa0), a1, a2, 0 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
-th.flrw fa0, 4(a1), a2, 3 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
-th.fsrd fa0, a1, -1(a2), 0 # CHECK: :[[@LINE]]:18: error: invalid operand for instruction
+th.flrw 0(fa0), a1, a2, 0 # CHECK: :[[@LINE]]:1: error: invalid instruction
+th.flrw fa0, 4(a1), a2, 3 # CHECK: :[[@LINE]]:1: error: invalid instruction
+th.fsrd fa0, a1, -1(a2), 0 # CHECK: :[[@LINE]]:1: error: invalid instruction
th.fsrd fa0, a1, a2, -3 # CHECK: :[[@LINE]]:22: error: immediate must be an integer in the range [0, 3]
diff --git a/llvm/test/MC/RISCV/rv64xtheadmemidx-invalid.s b/llvm/test/MC/RISCV/rv64xtheadmemidx-invalid.s
index e45c43a50048a..590d73d408780 100644
--- a/llvm/test/MC/RISCV/rv64xtheadmemidx-invalid.s
+++ b/llvm/test/MC/RISCV/rv64xtheadmemidx-invalid.s
@@ -1,13 +1,13 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+xtheadmemidx < %s 2>&1 | FileCheck %s
# RUN: not llvm-mc -triple riscv64 -mattr=+xtheadmemidx < %s 2>&1 | FileCheck %s
-th.ldia 0(a0), (a1), 0, 0 # CHECK: :[[@LINE]]:26: error: invalid operand for instruction
-th.ldib a0, 2(a1), 15, 1 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
+th.ldia 0(a0), (a1), 0, 0 # CHECK: :[[@LINE]]:1: error: invalid instruction
+th.ldib a0, 2(a1), 15, 1 # CHECK: :[[@LINE]]:1: error: invalid instruction
th.lwia a0, (a1), 30, 2 # CHECK: :[[@LINE]]:20: error: immediate must be an integer in the range [-16, 15]
th.lwib a0, (a1), -16, 43 # CHECK: :[[@LINE]]:25: error: immediate must be an integer in the range [0, 3]
th.lhib a0, (a1), -17, 3 # CHECK: :[[@LINE]]:20: error: immediate must be an integer in the range [-16, 15]
-th.lrb -2(a0), a1, a2, 0 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
-th.lrw a0, 3(a1), a2, 1 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
-th.lrw a0, a1, 4(a2), 2 # CHECK: :[[@LINE]]:17: error: invalid operand for instruction
+th.lrb -2(a0), a1, a2, 0 # CHECK: :[[@LINE]]:1: error: invalid instruction
+th.lrw a0, 3(a1), a2, 1 # CHECK: :[[@LINE]]:1: error: invalid instruction
+th.lrw a0, a1, 4(a2), 2 # CHECK: :[[@LINE]]:1: error: invalid instruction
th.lrh a0, a1, a2, 5 # CHECK: :[[@LINE]]:21: error: immediate must be an integer in the range [0, 3]
th.lrhu a0, a1, a2, -1 # CHECK: :[[@LINE]]:22: error: immediate must be an integer in the range [0, 3]
diff --git a/llvm/test/MC/RISCV/rv64xtheadmempair-invalid.s b/llvm/test/MC/RISCV/rv64xtheadmempair-invalid.s
index dffdb0a2cc6f5..7a8146e43062c 100644
--- a/llvm/test/MC/RISCV/rv64xtheadmempair-invalid.s
+++ b/llvm/test/MC/RISCV/rv64xtheadmempair-invalid.s
@@ -1,19 +1,19 @@
# RUN: not llvm-mc -triple riscv64 -mattr=+xtheadmempair < %s 2>&1 | FileCheck %s
th.ldd t0, t1, (t2), 5, 4 # CHECK: [[@LINE]]:22: error: immediate must be an integer in the range [0, 3]
-th.ldd t0, t1, (t2) # CHECK: [[@LINE]]:1: error: too few operands for instruction
+th.ldd t0, t1, (t2) # CHECK: [[@LINE]]:29: error: too few operands for instruction
th.ldd t0, t1, (t2), 3, 5 # CHECK: [[@LINE]]:25: error: operand must be constant 4
th.sdd a0, a1, (a2), 5, 4 # CHECK: [[@LINE]]:22: error: immediate must be an integer in the range [0, 3]
-th.sdd a0, a1, (a2) # CHECK: [[@LINE]]:1: error: too few operands for instruction
+th.sdd a0, a1, (a2) # CHECK: [[@LINE]]:29: error: too few operands for instruction
th.sdd a0, a1, (a2), 3, 5 # CHECK: [[@LINE]]:25: error: operand must be constant 4
-th.lwud t0, t1, (t2), 5, 4 # CHECK: [[@LINE]]:23: error: immediate must be an integer in the range [0, 3]
-th.lwud t0, t1, (t2) # CHECK: [[@LINE]]:1: error: too few operands for instruction
+th.lwud t0, t1, (t2), 5, 4 # CHECK: [[@LINE]]:1: error: invalid instruction
+th.lwud t0, t1, (t2) # CHECK: [[@LINE]]:29: error: too few operands for instruction
th.lwud t0, t1, (t2), 3, 5 # CHECK: [[@LINE]]:26: error: operand must be constant 3
-th.lwd a3, a4, (a5), 5, 4 # CHECK: [[@LINE]]:22: error: immediate must be an integer in the range [0, 3]
-th.lwd a3, a4, (a5) # CHECK: [[@LINE]]:1: error: too few operands for instruction
+th.lwd a3, a4, (a5), 5, 4 # CHECK: [[@LINE]]:1: error: invalid instruction
+th.lwd a3, a4, (a5) # CHECK: [[@LINE]]:29: error: too few operands for instruction
th.lwd a3, a4, (a5), 3, 5 # CHECK: [[@LINE]]:25: error: operand must be constant 3
-th.swd t3, t4, (t5), 5, 4 # CHECK: [[@LINE]]:22: error: immediate must be an integer in the range [0, 3]
-th.swd t3, t4, (t5) # CHECK: [[@LINE]]:1: error: too few operands for instruction
+th.swd t3, t4, (t5), 5, 4 # CHECK: [[@LINE]]:1: error: invalid instruction
+th.swd t3, t4, (t5) # CHECK: [[@LINE]]:29: error: too few operands for instruction
th.swd t3, t4, (t5), 3, 5 # CHECK: [[@LINE]]:25: error: operand must be constant 3
th.ldd x6, x6, (x7), 2, 4 # CHECK: [[@LINE]]:8: error: rs1, rd1, and rd2 cannot overlap
th.lwud x6, x6, (x6), 2, 3 # CHECK: [[@LINE]]:9: error: rs1, rd1, and rd2 cannot overlap
diff --git a/llvm/test/MC/RISCV/rv64zalrsc-invalid.s b/llvm/test/MC/RISCV/rv64zalrsc-invalid.s
index 4a9d55e752f06..cfd0e6ceed5ba 100644
--- a/llvm/test/MC/RISCV/rv64zalrsc-invalid.s
+++ b/llvm/test/MC/RISCV/rv64zalrsc-invalid.s
@@ -5,4 +5,4 @@
lr.d a4, a5 # CHECK: :[[@LINE]]:10: error: expected '(' or optional integer offset
# lr only takes two operands
-lr.d s0, (s1), s2 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
+lr.d s0, (s1), s2 # CHECK: :[[@LINE]]:16: error: too many operands for instruction
diff --git a/llvm/test/MC/RISCV/rv64zba-invalid.s b/llvm/test/MC/RISCV/rv64zba-invalid.s
index 358d8b3a6e11f..8dbea991950b4 100644
--- a/llvm/test/MC/RISCV/rv64zba-invalid.s
+++ b/llvm/test/MC/RISCV/rv64zba-invalid.s
@@ -1,15 +1,15 @@
# RUN: not llvm-mc -triple riscv64 -mattr=+zba < %s 2>&1 | FileCheck %s
# Too few operands
-slli.uw t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+slli.uw t0, t1 # CHECK: :[[@LINE]]:15: error: too few operands for instruction
# Immediate operand out of range
slli.uw t0, t1, 64 # CHECK: :[[@LINE]]:17: error: immediate must be an integer in the range [0, 63]
slli.uw t0, t1, -1 # CHECK: :[[@LINE]]:17: error: immediate must be an integer in the range [0, 63]
# Too few operands
-add.uw t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+add.uw t0, t1 # CHECK: :[[@LINE]]:14: error: too few operands for instruction
# Too few operands
-sh1add.uw t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+sh1add.uw t0, t1 # CHECK: :[[@LINE]]:17: error: too few operands for instruction
# Too few operands
-sh2add.uw t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+sh2add.uw t0, t1 # CHECK: :[[@LINE]]:17: error: too few operands for instruction
# Too few operands
-sh3add.uw t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+sh3add.uw t0, t1 # CHECK: :[[@LINE]]:17: error: too few operands for instruction
diff --git a/llvm/test/MC/RISCV/rv64zbb-invalid.s b/llvm/test/MC/RISCV/rv64zbb-invalid.s
index c4e5bacb7c39e..1b3d1e8a30e35 100644
--- a/llvm/test/MC/RISCV/rv64zbb-invalid.s
+++ b/llvm/test/MC/RISCV/rv64zbb-invalid.s
@@ -1,17 +1,17 @@
# RUN: not llvm-mc -triple riscv64 -mattr=+zbb < %s 2>&1 | FileCheck %s
# Too many operands
-clzw t0, t1, t2 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
+clzw t0, t1, t2 # CHECK: :[[@LINE]]:14: error: too many operands for instruction
# Too many operands
-ctzw t0, t1, t2 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
+ctzw t0, t1, t2 # CHECK: :[[@LINE]]:14: error: too many operands for instruction
# Too many operands
-cpopw t0, t1, t2 # CHECK: :[[@LINE]]:15: error: invalid operand for instruction
+cpopw t0, t1, t2 # CHECK: :[[@LINE]]:15: error: too many operands for instruction
# Too few operands
-rolw t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+rolw t0, t1 # CHECK: :[[@LINE]]:12: error: too few operands for instruction
# Too few operands
-rorw t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+rorw t0, t1 # CHECK: :[[@LINE]]:12: error: too few operands for instruction
# Too few operands
-roriw t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+roriw t0, t1 # CHECK: :[[@LINE]]:13: error: too few operands for instruction
# Immediate operand out of range
roriw t0, t1, 32 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 31]
roriw t0, t1, -1 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 31]
diff --git a/llvm/test/MC/RISCV/rv64zbs-invalid.s b/llvm/test/MC/RISCV/rv64zbs-invalid.s
index 2fa40ffc90c33..1e5949211b167 100644
--- a/llvm/test/MC/RISCV/rv64zbs-invalid.s
+++ b/llvm/test/MC/RISCV/rv64zbs-invalid.s
@@ -1,30 +1,30 @@
# RUN: not llvm-mc -triple riscv64 -mattr=+zbs < %s 2>&1 | FileCheck %s
# Too few operands
-bclr t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+bclr t0, t1 # CHECK: :[[@LINE]]:12: error: too few operands for instruction
# Too few operands
-bset t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+bset t0, t1 # CHECK: :[[@LINE]]:12: error: too few operands for instruction
# Too few operands
-binv t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+binv t0, t1 # CHECK: :[[@LINE]]:12: error: too few operands for instruction
# Too few operands
-bext t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+bext t0, t1 # CHECK: :[[@LINE]]:12: error: too few operands for instruction
# Too few operands
-bclri t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+bclri t0, t1 # CHECK: :[[@LINE]]:13: error: too few operands for instruction
# Immediate operand out of range
bclri t0, t1, 64 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]
bclri t0, t1, -1 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]
# Too few operands
-bseti t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+bseti t0, t1 # CHECK: :[[@LINE]]:13: error: too few operands for instruction
# Immediate operand out of range
bseti t0, t1, 64 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]
bseti t0, t1, -1 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]
# Too few operands
-binvi t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+binvi t0, t1 # CHECK: :[[@LINE]]:13: error: too few operands for instruction
# Immediate operand out of range
binvi t0, t1, 64 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]
binvi t0, t1, -1 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]
# Too few operands
-bexti t0, t1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+bexti t0, t1 # CHECK: :[[@LINE]]:13: error: too few operands for instruction
# Immediate operand out of range
bexti t0, t1, 64 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]
bexti t0, t1, -1 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 63]
diff --git a/llvm/test/MC/RISCV/rv64zcmp-invalid.s b/llvm/test/MC/RISCV/rv64zcmp-invalid.s
index e806da81ea6d3..ae4d2aab43edf 100644
--- a/llvm/test/MC/RISCV/rv64zcmp-invalid.s
+++ b/llvm/test/MC/RISCV/rv64zcmp-invalid.s
@@ -1,13 +1,13 @@
# RUN: not llvm-mc -triple=riscv64 -mattr=zcmp -M no-aliases -show-encoding < %s 2>&1 \
# RUN: | FileCheck -check-prefixes=CHECK-ERROR %s
-# CHECK-ERROR: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
cm.mvsa01 a1, a2
# CHECK-ERROR: :[[@LINE+1]]:11: error: rs1 and rs2 must be different
cm.mvsa01 s0, s0
-# CHECK-ERROR: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
cm.mva01s a1, a2
# CHECK-ERROR: :[[@LINE+1]]:12: error: invalid register list, '{ra, s0-s10}' or '{x1, x8-x9, x18-x26}' is not supported
diff --git a/llvm/test/MC/RISCV/rv64zdinx-invalid.s b/llvm/test/MC/RISCV/rv64zdinx-invalid.s
index 2bdaea43c5765..51c3269004ed7 100644
--- a/llvm/test/MC/RISCV/rv64zdinx-invalid.s
+++ b/llvm/test/MC/RISCV/rv64zdinx-invalid.s
@@ -5,10 +5,10 @@ fld fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following
ld a0, -2049(a1) # CHECK: :[[@LINE]]:8: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
# Invalid instructions
-fsd a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
+fsd a5, 12(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
sd fa4, 64(sp) # CHECK: :[[@LINE]]:4: error: invalid operand for instruction
-fmv.x.d t2, a2 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
-fmv.d.x a5, t5 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+fmv.x.d t2, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.d.x a5, t5 # CHECK: :[[@LINE]]:1: error: invalid instruction
# FP registers where integer regs are expected
fcvt.d.l a3, ft3 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rv64zfh-invalid.s b/llvm/test/MC/RISCV/rv64zfh-invalid.s
index e51c64984c259..17749cc1e7bec 100644
--- a/llvm/test/MC/RISCV/rv64zfh-invalid.s
+++ b/llvm/test/MC/RISCV/rv64zfh-invalid.s
@@ -7,9 +7,9 @@ flh ft1, -2049(a0) # CHECK: :[[@LINE]]:10: error: operand must be a symbol with
fsh ft2, 2048(a1) # CHECK: :[[@LINE]]:10: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
# Integer registers where FP regs are expected
-fcvt.l.h ft0, a0 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
-fcvt.lu.h ft1, a1 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+fcvt.l.h ft0, a0 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.lu.h ft1, a1 # CHECK: :[[@LINE]]:1: error: invalid instruction
# FP registers where integer regs are expected
-fcvt.h.l a2, ft2 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
-fcvt.h.lu a3, ft3 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+fcvt.h.l a2, ft2 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.h.lu a3, ft3 # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rv64zfinx-invalid.s b/llvm/test/MC/RISCV/rv64zfinx-invalid.s
index 56cd5fa88265c..0f19413ed0acd 100644
--- a/llvm/test/MC/RISCV/rv64zfinx-invalid.s
+++ b/llvm/test/MC/RISCV/rv64zfinx-invalid.s
@@ -4,9 +4,9 @@
flw fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'F' (Single-Precision Floating-Point){{$}}
# Invalid instructions
-fsw a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
-fmv.x.w t2, a2 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
-fmv.w.x a5, t5 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+fsw a5, 12(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.x.w t2, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.w.x a5, t5 # CHECK: :[[@LINE]]:1: error: invalid instruction
# FP registers where integer regs are expected
fcvt.s.l a2, ft2 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rv64zhinx-invalid.s b/llvm/test/MC/RISCV/rv64zhinx-invalid.s
index a49056c6a7629..cd926f17ed417 100644
--- a/llvm/test/MC/RISCV/rv64zhinx-invalid.s
+++ b/llvm/test/MC/RISCV/rv64zhinx-invalid.s
@@ -4,9 +4,9 @@
flh fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'Zfh' (Half-Precision Floating-Point) or 'Zfhmin' (Half-Precision Floating-Point Minimal) or 'Zfbfmin' (Scalar BF16 Converts){{$}}
# Invalid instructions
-fsh a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
-fmv.x.h t2, a2 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
-fmv.h.x a5, t5 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+fsh a5, 12(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.x.h t2, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.h.x a5, t5 # CHECK: :[[@LINE]]:1: error: invalid instruction
# FP registers where integer regs are expected
fcvt.h.l a2, ft2 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rv64zhinxmin-invalid.s b/llvm/test/MC/RISCV/rv64zhinxmin-invalid.s
index dfe4bb6a15e55..4fec91a2223f0 100644
--- a/llvm/test/MC/RISCV/rv64zhinxmin-invalid.s
+++ b/llvm/test/MC/RISCV/rv64zhinxmin-invalid.s
@@ -4,10 +4,10 @@
flh fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'Zfh' (Half-Precision Floating-Point) or 'Zfhmin' (Half-Precision Floating-Point Minimal) or 'Zfbfmin' (Scalar BF16 Converts){{$}}
# Invalid instructions
-fsh a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
-fmv.x.h t2, a2 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
-fmv.h.x a5, t5 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+fsh a5, 12(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.x.h t2, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.h.x a5, t5 # CHECK: :[[@LINE]]:1: error: invalid instruction
# FP registers where integer regs are expected
-fcvt.d.h a0, fa2 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
-fcvt.h.d a0, fa2 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
+fcvt.d.h a0, fa2 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.h.d a0, fa2 # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rva-aliases-invalid.s b/llvm/test/MC/RISCV/rva-aliases-invalid.s
index a4e80e465faa9..6d6edd2063819 100644
--- a/llvm/test/MC/RISCV/rva-aliases-invalid.s
+++ b/llvm/test/MC/RISCV/rva-aliases-invalid.s
@@ -10,8 +10,8 @@ lr.w a1, foo # CHECK: :[[@LINE]]:10: error: expected '(' or optional integer
lr.w a1, 1(a0) # CHECK: :[[@LINE]]:10: error: optional integer offset must be 0
lr.w a1, (foo) # CHECK: :[[@LINE]]:11: error: expected register
lr.w a1, 0(foo) # CHECK: :[[@LINE]]:12: error: expected register
-lr.w a1, (f0) # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
-lr.w a1, 0(f0) # CHECK: :[[@LINE]]:12: error: invalid operand for instruction
+lr.w a1, (f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
+lr.w a1, 0(f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
lr.w a1, 0(a0 # CHECK: :[[@LINE]]:17: error: expected ')'
lr.w a1, (a0 # CHECK: :[[@LINE]]:17: error: expected ')'
@@ -20,8 +20,8 @@ sc.w a2, a1, foo # CHECK: :[[@LINE]]:14: error: expected '(' or optional inte
sc.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:14: error: optional integer offset must be 0
sc.w a2, a1, (foo) # CHECK: :[[@LINE]]:15: error: expected register
sc.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:16: error: expected register
-sc.w a2, a1, (f0) # CHECK: :[[@LINE]]:15: error: invalid operand for instruction
-sc.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
+sc.w a2, a1, (f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
+sc.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
sc.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:21: error: expected ')'
sc.w a2, a1, (a0 # CHECK: :[[@LINE]]:21: error: expected ')'
@@ -30,8 +30,8 @@ amoswap.w a2, a1, foo # CHECK: :[[@LINE]]:19: error: expected '(' or optional
amoswap.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:19: error: optional integer offset must be 0
amoswap.w a2, a1, (foo) # CHECK: :[[@LINE]]:20: error: expected register
amoswap.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:21: error: expected register
-amoswap.w a2, a1, (f0) # CHECK: :[[@LINE]]:20: error: invalid operand for instruction
-amoswap.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:21: error: invalid operand for instruction
+amoswap.w a2, a1, (f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
+amoswap.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
amoswap.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:26: error: expected ')'
amoswap.w a2, a1, (a0 # CHECK: :[[@LINE]]:26: error: expected ')'
@@ -40,8 +40,8 @@ amoadd.w a2, a1, foo # CHECK: :[[@LINE]]:18: error: expected '(' or optional
amoadd.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:18: error: optional integer offset must be 0
amoadd.w a2, a1, (foo) # CHECK: :[[@LINE]]:19: error: expected register
amoadd.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:20: error: expected register
-amoadd.w a2, a1, (f0) # CHECK: :[[@LINE]]:19: error: invalid operand for instruction
-amoadd.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:20: error: invalid operand for instruction
+amoadd.w a2, a1, (f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
+amoadd.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
amoadd.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:25: error: expected ')'
amoadd.w a2, a1, (a0 # CHECK: :[[@LINE]]:25: error: expected ')'
@@ -50,8 +50,8 @@ amoxor.w a2, a1, foo # CHECK: :[[@LINE]]:18: error: expected '(' or optional
amoxor.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:18: error: optional integer offset must be 0
amoxor.w a2, a1, (foo) # CHECK: :[[@LINE]]:19: error: expected register
amoxor.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:20: error: expected register
-amoxor.w a2, a1, (f0) # CHECK: :[[@LINE]]:19: error: invalid operand for instruction
-amoxor.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:20: error: invalid operand for instruction
+amoxor.w a2, a1, (f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
+amoxor.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
amoxor.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:25: error: expected ')'
amoxor.w a2, a1, (a0 # CHECK: :[[@LINE]]:25: error: expected ')'
@@ -60,8 +60,8 @@ amoand.w a2, a1, foo # CHECK: :[[@LINE]]:18: error: expected '(' or optional
amoand.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:18: error: optional integer offset must be 0
amoand.w a2, a1, (foo) # CHECK: :[[@LINE]]:19: error: expected register
amoand.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:20: error: expected register
-amoand.w a2, a1, (f0) # CHECK: :[[@LINE]]:19: error: invalid operand for instruction
-amoand.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:20: error: invalid operand for instruction
+amoand.w a2, a1, (f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
+amoand.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
amoand.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:25: error: expected ')'
amoand.w a2, a1, (a0 # CHECK: :[[@LINE]]:25: error: expected ')'
@@ -70,8 +70,8 @@ amoor.w a2, a1, foo # CHECK: :[[@LINE]]:17: error: expected '(' or optional i
amoor.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:17: error: optional integer offset must be 0
amoor.w a2, a1, (foo) # CHECK: :[[@LINE]]:18: error: expected register
amoor.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:19: error: expected register
-amoor.w a2, a1, (f0) # CHECK: :[[@LINE]]:18: error: invalid operand for instruction
-amoor.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:19: error: invalid operand for instruction
+amoor.w a2, a1, (f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
+amoor.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
amoor.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:24: error: expected ')'
amoor.w a2, a1, (a0 # CHECK: :[[@LINE]]:24: error: expected ')'
@@ -80,8 +80,8 @@ amomin.w a2, a1, foo # CHECK: :[[@LINE]]:18: error: expected '(' or optional
amomin.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:18: error: optional integer offset must be 0
amomin.w a2, a1, (foo) # CHECK: :[[@LINE]]:19: error: expected register
amomin.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:20: error: expected register
-amomin.w a2, a1, (f0) # CHECK: :[[@LINE]]:19: error: invalid operand for instruction
-amomin.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:20: error: invalid operand for instruction
+amomin.w a2, a1, (f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
+amomin.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
amomin.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:25: error: expected ')'
amomin.w a2, a1, (a0 # CHECK: :[[@LINE]]:25: error: expected ')'
@@ -90,8 +90,8 @@ amomax.w a2, a1, foo # CHECK: :[[@LINE]]:18: error: expected '(' or optional
amomax.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:18: error: optional integer offset must be 0
amomax.w a2, a1, (foo) # CHECK: :[[@LINE]]:19: error: expected register
amomax.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:20: error: expected register
-amomax.w a2, a1, (f0) # CHECK: :[[@LINE]]:19: error: invalid operand for instruction
-amomax.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:20: error: invalid operand for instruction
+amomax.w a2, a1, (f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
+amomax.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
amomax.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:25: error: expected ')'
amomax.w a2, a1, (a0 # CHECK: :[[@LINE]]:25: error: expected ')'
@@ -100,8 +100,8 @@ amominu.w a2, a1, foo # CHECK: :[[@LINE]]:19: error: expected '(' or optional
amominu.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:19: error: optional integer offset must be 0
amominu.w a2, a1, (foo) # CHECK: :[[@LINE]]:20: error: expected register
amominu.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:21: error: expected register
-amominu.w a2, a1, (f0) # CHECK: :[[@LINE]]:20: error: invalid operand for instruction
-amominu.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:21: error: invalid operand for instruction
+amominu.w a2, a1, (f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
+amominu.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
amominu.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:26: error: expected ')'
amominu.w a2, a1, (a0 # CHECK: :[[@LINE]]:26: error: expected ')'
@@ -110,7 +110,7 @@ amomaxu.w a2, a1, foo # CHECK: :[[@LINE]]:19: error: expected '(' or optional
amomaxu.w a2, a1, 1(a0) # CHECK: :[[@LINE]]:19: error: optional integer offset must be 0
amomaxu.w a2, a1, (foo) # CHECK: :[[@LINE]]:20: error: expected register
amomaxu.w a2, a1, 0(foo) # CHECK: :[[@LINE]]:21: error: expected register
-amomaxu.w a2, a1, (f0) # CHECK: :[[@LINE]]:20: error: invalid operand for instruction
-amomaxu.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:21: error: invalid operand for instruction
+amomaxu.w a2, a1, (f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
+amomaxu.w a2, a1, 0(f0) # CHECK: :[[@LINE]]:1: error: invalid instruction
amomaxu.w a2, a1, 0(a0 # CHECK: :[[@LINE]]:26: error: expected ')'
-amomaxu.w a2, a1, (a0 # CHECK: :[[@LINE]]:26: error: expected ')'
\ No newline at end of file
+amomaxu.w a2, a1, (a0 # CHECK: :[[@LINE]]:26: error: expected ')'
diff --git a/llvm/test/MC/RISCV/rvc-hints-invalid.s b/llvm/test/MC/RISCV/rvc-hints-invalid.s
index 295f0ecc0b298..444fdb111d814 100644
--- a/llvm/test/MC/RISCV/rvc-hints-invalid.s
+++ b/llvm/test/MC/RISCV/rvc-hints-invalid.s
@@ -4,7 +4,9 @@
# RUN: | FileCheck -check-prefixes=CHECK %s --implicit-check-not="error:"
c.nop 0
-# CHECK: :[[#@LINE-1]]:7: error: immediate must be non-zero in the range [-32, 31]
+# CHECK: :[[#@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[#@LINE-2]]:7: note: too many operands for instruction
+# CHECK: :[[#@LINE-3]]:7: note: immediate must be non-zero in the range [-32, 31]
c.addi x0, 33
# CHECK: :[[#@LINE-1]]:12: error: immediate must be an integer in the range [-32, 31]
diff --git a/llvm/test/MC/RISCV/rve-invalid.s b/llvm/test/MC/RISCV/rve-invalid.s
index 92e0239af5d15..ebb3e6015a6f0 100644
--- a/llvm/test/MC/RISCV/rve-invalid.s
+++ b/llvm/test/MC/RISCV/rve-invalid.s
@@ -112,10 +112,12 @@ auipc t6, 32
.option pop
# CHECK-DIS: 0f81 <unknown>
-# CHECK: :[[@LINE+1]]:8: error: register must be a GPR excluding zero (x0)
+# CHECK: :[[@LINE+3]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE+2]]:8: note: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:8: note: register must be a GPR excluding zero (x0)
c.addi x31, 0
# CHECK-DIS: 9846 <unknown>
-# CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:1: error: invalid instruction
c.add x16, x17
# CHECK-DIS: 8046 <unknown>
# CHECK: :[[@LINE+1]]:10: error: register must be a GPR excluding zero (x0)
diff --git a/llvm/test/MC/RISCV/rvi-pseudos-invalid.s b/llvm/test/MC/RISCV/rvi-pseudos-invalid.s
index d5b6db3b80b21..2a45c4f0f706b 100644
--- a/llvm/test/MC/RISCV/rvi-pseudos-invalid.s
+++ b/llvm/test/MC/RISCV/rvi-pseudos-invalid.s
@@ -12,11 +12,11 @@ lga x1, %hi(foo) # CHECK: :[[@LINE]]:9: error: operand must be a bare symbol nam
lga x1, %lo(foo) # CHECK: :[[@LINE]]:9: error: operand must be a bare symbol name
sw a2, %hi(a_symbol), a3
-# CHECK-RV32: :[[@LINE-1]]:8: error: immediate must be an integer in the range [-2048, 2047]
-# CHECK-RV64: :[[@LINE-2]]:8: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK-RV32: :[[@LINE-1]]:8: error: operand must be a bare symbol name
+# CHECK-RV64: :[[@LINE-2]]:8: error: operand must be a bare symbol name
-sw a2, %lo(a_symbol), a3 # CHECK: :[[@LINE]]:23: error: invalid operand for instruction
+sw a2, %lo(a_symbol), a3 # CHECK: :[[@LINE]]:8: error: operand must be a bare symbol name
sw a2, %lo(a_symbol)(a4), a3 # CHECK: :[[@LINE]]:27: error: expected '%' relocation specifier
# Too few operands must be rejected
-sw a2, a_symbol # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+sw a2, a_symbol # CHECK: :[[@LINE]]:16: error: too few operands for instruction
diff --git a/llvm/test/MC/RISCV/rvv/invalid-alt.s b/llvm/test/MC/RISCV/rvv/invalid-alt.s
index 108bbbce9e3fe..da2ea65057e14 100644
--- a/llvm/test/MC/RISCV/rvv/invalid-alt.s
+++ b/llvm/test/MC/RISCV/rvv/invalid-alt.s
@@ -4,7 +4,7 @@
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
vsetvli a2, a0, e32alt, m1, ta, ma
-# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
+# CHECK-ERROR: invalid instruction
vsetvli a2, a0, e64alt, m1, ta, ma
-# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
+# CHECK-ERROR: invalid instruction
diff --git a/llvm/test/MC/RISCV/rvv/invalid.s b/llvm/test/MC/RISCV/rvv/invalid.s
index c9872193e99ae..886553b1f8073 100644
--- a/llvm/test/MC/RISCV/rvv/invalid.s
+++ b/llvm/test/MC/RISCV/rvv/invalid.s
@@ -26,22 +26,22 @@ vsetvli a2, a0, e32,m16
# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
vsetvli a2, a0, e128,m8
-# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
+# CHECK-ERROR: invalid instruction
vsetvli a2, a0, e256,m8
-# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
+# CHECK-ERROR: invalid instruction
vsetvli a2, a0, e512,m8
-# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
+# CHECK-ERROR: invalid instruction
vsetvli a2, a0, e1024,m8
-# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
+# CHECK-ERROR: invalid instruction
vsetvli a2, a0, e2048,m8
-# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
+# CHECK-ERROR: invalid instruction
vsetvli a2, a0, e1,m8
-# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
+# CHECK-ERROR: invalid instruction
vsetvli a2, a0, e8,m1,tx
# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
@@ -50,7 +50,7 @@ vsetvli a2, a0, e8,m1,ta,mx
# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
vsetvli a2, a0, e8x,m1,tu,mu
-# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
+# CHECK-ERROR: invalid instruction
vsetvli a2, a0, e8,m1z,tu,mu
# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
@@ -557,8 +557,11 @@ vadd.vi v0, v2, 1, v0.t
# CHECK-ERROR-LABEL: vadd.vi v0, v2, 1, v0.t
vmsge.vx v0, v4, a0, v0.t
-# CHECK-ERROR: too few operands for instruction
+# CHECK-ERROR: invalid instruction, any one of the following would fix this:
# CHECK-ERROR-LABEL: vmsge.vx v0, v4, a0, v0.t
+# CHECK-ERROR: note: too many operands for instruction
+# CHECK-ERROR: note: invalid operand for instruction
+# CHECK-ERROR: note: too few operands for instruction
vmerge.vim v0, v1, 1, v0
# CHECK-ERROR: the destination vector register group cannot be V0
@@ -737,10 +740,10 @@ vmv8r.v v0, v7
# CHECK-ERROR: invalid operand for instruction
vmsge.vx v2, v4, a0, v0.t, v0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
vmsgeu.vx v2, v4, a0, v0.t, v0
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
vmsge.vx v2, v4, a0, v0.t, v2
# CHECK-ERROR: the temporary vector register cannot be the same as the destination register
diff --git a/llvm/test/MC/RISCV/rvv/xsfmm-invalid.s b/llvm/test/MC/RISCV/rvv/xsfmm-invalid.s
index 6b17d25b4b903..110201f7257b0 100644
--- a/llvm/test/MC/RISCV/rvv/xsfmm-invalid.s
+++ b/llvm/test/MC/RISCV/rvv/xsfmm-invalid.s
@@ -21,10 +21,10 @@ sf.mm.e4m3.e5m2 mt10, v8, v9 # CHECK: :[[@LINE]]:17: error: invalid operand for
sf.mm.e4m3.e4m3 mt14, v8, v9 # CHECK: :[[@LINE]]:17: error: invalid operand for instruction
-sf.mm.u.u mt1, v8, v9 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+sf.mm.u.u mt1, v8, v9 # CHECK: :[[@LINE]]:1: error: invalid instruction
-sf.mm.s.u mt2, v8, v9 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+sf.mm.s.u mt2, v8, v9 # CHECK: :[[@LINE]]:1: error: invalid instruction
-sf.mm.u.s mt3, v8, v9 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+sf.mm.u.s mt3, v8, v9 # CHECK: :[[@LINE]]:1: error: invalid instruction
-sf.mm.s.s mt1, v8, v9 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+sf.mm.s.s mt1, v8, v9 # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rvv/zvfbdota32f-invalid.s b/llvm/test/MC/RISCV/rvv/zvfbdota32f-invalid.s
index b317d4e39e342..9041adc93a709 100644
--- a/llvm/test/MC/RISCV/rvv/zvfbdota32f-invalid.s
+++ b/llvm/test/MC/RISCV/rvv/zvfbdota32f-invalid.s
@@ -2,7 +2,7 @@
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
# Invalid vsetvli
-# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
+# CHECK-ERROR: invalid instruction
vsetvli a0, zero, e888, m1, ta, ma
# Invalid ci
@@ -14,5 +14,5 @@ vfbdota.vv v8, v16, v12, 8
vfbdota.vv v8, v17, v12, 1
# Invalid vs2 and ci
-# CHECK-ERROR: :[[@LINE+1]]:16: error: invalid operand for instruction{{$}}
+# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction{{$}}
vfbdota.vv v8, v17, v12, 8
diff --git a/llvm/test/MC/RISCV/rvv/zvfqwbdota8f-invalid.s b/llvm/test/MC/RISCV/rvv/zvfqwbdota8f-invalid.s
index d1288674dfd1d..6b6bfa6de548c 100644
--- a/llvm/test/MC/RISCV/rvv/zvfqwbdota8f-invalid.s
+++ b/llvm/test/MC/RISCV/rvv/zvfqwbdota8f-invalid.s
@@ -2,7 +2,7 @@
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
# Invalid vsetvli
-# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]{{$}}
+# CHECK-ERROR: invalid instruction{{$}}
vsetvli a0, zero, e888, m1, ta, ma
# Invalid ci
@@ -14,5 +14,5 @@ vfqwbdota.vv v8, v16, v12, 8
vfqwbdota.vv v8, v17, v12, 1
# Invalid vs2 and ci
-# CHECK-ERROR: :[[@LINE+1]]:18: error: invalid operand for instruction{{$}}
+# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction{{$}}
vfqwbdota.vv v8, v17, v12, 8
diff --git a/llvm/test/MC/RISCV/rvv/zvfwbdota16bf-invalid.s b/llvm/test/MC/RISCV/rvv/zvfwbdota16bf-invalid.s
index 2132e4eaa28f0..332eae24f40ed 100644
--- a/llvm/test/MC/RISCV/rvv/zvfwbdota16bf-invalid.s
+++ b/llvm/test/MC/RISCV/rvv/zvfwbdota16bf-invalid.s
@@ -2,7 +2,7 @@
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
# Invalid vsetvli
-# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]{{$}}
+# CHECK-ERROR: invalid instruction{{$}}
vsetvli a0, zero, e888, m1, ta, ma
# Invalid ci
@@ -14,5 +14,5 @@ vfwbdota.vv v8, v16, v12, 8
vfwbdota.vv v8, v17, v12, 1
# Invalid vs2 and ci
-# CHECK-ERROR: :[[@LINE+1]]:17: error: invalid operand for instruction{{$}}
+# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction{{$}}
vfwbdota.vv v8, v17, v12, 8
diff --git a/llvm/test/MC/RISCV/rvv/zvqwbdota-invalid.s b/llvm/test/MC/RISCV/rvv/zvqwbdota-invalid.s
index f7fddad9680e7..040c360a48618 100644
--- a/llvm/test/MC/RISCV/rvv/zvqwbdota-invalid.s
+++ b/llvm/test/MC/RISCV/rvv/zvqwbdota-invalid.s
@@ -2,7 +2,7 @@
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
# Invalid vsetvli
-# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]{{$}}
+# CHECK-ERROR: invalid instruction{{$}}
vsetvli a0, zero, e888, m1, ta, ma
# Invalid ci
@@ -14,5 +14,5 @@ vqwbdotau.vv v8, v16, v12, 8
vqwbdotau.vv v8, v17, v12, 1
# Invalid vs2 and ci
-# CHECK-ERROR: :[[@LINE+1]]:18: error: invalid operand for instruction{{$}}
+# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction{{$}}
vqwbdotau.vv v8, v17, v12, 8
diff --git a/llvm/test/MC/RISCV/rvv/zvvfmm-invalid.s b/llvm/test/MC/RISCV/rvv/zvvfmm-invalid.s
index ccb1e7ebcd12d..b74c7e7bffe76 100644
--- a/llvm/test/MC/RISCV/rvv/zvvfmm-invalid.s
+++ b/llvm/test/MC/RISCV/rvv/zvvfmm-invalid.s
@@ -2,12 +2,12 @@
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
vfmmacc.vv v8, v4, v20, v0.t
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
# CHECK-ERROR-LABEL: vfmmacc.vv v8, v4, v20, v0.t
# vm=0 is reserved for non-widening vfmmacc.vv.
vfmmacc.vv v8, v4, v20, v0.scale
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
# CHECK-ERROR-LABEL: vfmmacc.vv v8, v4, v20, v0.scale
vfwmmacc.vv v8, v4, v20, v0.t
@@ -15,24 +15,30 @@ vfwmmacc.vv v8, v4, v20, v0.t
# CHECK-ERROR-LABEL: vfwmmacc.vv v8, v4, v20, v0.t
vfwmmacc.vv v8, v4, v20, v1.scale
-# CHECK-ERROR: operand must be v0.scale
-# CHECK-ERROR-LABEL: vfwmmacc.vv v8, v4, v20, v1.scale
+# CHECK-ERROR: error: invalid instruction, any one of the following would fix this:
+# CHECK-ERROR: note: too many operands for instruction
+# CHECK-ERROR: note: operand must be v0.scale
+# CHECK-ERROR: vfwmmacc.vv v8, v4, v20, v1.scale
vfqmmacc.vv v8, v4, v20, v0.t
# CHECK-ERROR: expected '.scale' suffix
# CHECK-ERROR-LABEL: vfqmmacc.vv v8, v4, v20, v0.t
vfqmmacc.vv v8, v4, v20, v1.scale
-# CHECK-ERROR: operand must be v0.scale
-# CHECK-ERROR-LABEL: vfqmmacc.vv v8, v4, v20, v1.scale
+# CHECK-ERROR: error: invalid instruction, any one of the following would fix this:
+# CHECK-ERROR: note: too many operands for instruction
+# CHECK-ERROR: note: operand must be v0.scale
+# CHECK-ERROR: vfqmmacc.vv v8, v4, v20, v1.scale
vf8wmmacc.vv v8, v4, v20, v0.t
# CHECK-ERROR: expected '.scale' suffix
# CHECK-ERROR-LABEL: vf8wmmacc.vv v8, v4, v20, v0.t
vf8wmmacc.vv v8, v4, v20, v1.scale
-# CHECK-ERROR: operand must be v0.scale
-# CHECK-ERROR-LABEL: vf8wmmacc.vv v8, v4, v20, v1.scale
+# CHECK-ERROR: error: invalid instruction, any one of the following would fix this:
+# CHECK-ERROR: note: too many operands for instruction
+# CHECK-ERROR: note: operand must be v0.scale
+# CHECK-ERROR: vf8wmmacc.vv v8, v4, v20, v1.scale
vfwmmacc.vv v0, v4, v20, v0.scale
# CHECK-ERROR: vd, vs1, and vs2 cannot overlap v0.scale
diff --git a/llvm/test/MC/RISCV/rvv/zvvmm-invalid.s b/llvm/test/MC/RISCV/rvv/zvvmm-invalid.s
index 7cccf11b8d1ea..298a04faf7d90 100644
--- a/llvm/test/MC/RISCV/rvv/zvvmm-invalid.s
+++ b/llvm/test/MC/RISCV/rvv/zvvmm-invalid.s
@@ -2,17 +2,17 @@
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
vmmacc.vv v8, v4, v20, v0.t
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
# CHECK-ERROR-LABEL: vmmacc.vv v8, v4, v20, v0.t
vwmmacc.vv v8, v4, v20, v0.t
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
# CHECK-ERROR-LABEL: vwmmacc.vv v8, v4, v20, v0.t
vqmmacc.vv v8, v4, v20, v0.t
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
# CHECK-ERROR-LABEL: vqmmacc.vv v8, v4, v20, v0.t
v8wmmacc.vv v8, v4, v20, v0.t
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: too many operands for instruction
# CHECK-ERROR-LABEL: v8wmmacc.vv v8, v4, v20, v0.t
diff --git a/llvm/test/MC/RISCV/rvv/zvvmtls-invalid.s b/llvm/test/MC/RISCV/rvv/zvvmtls-invalid.s
index 20a5b3400097b..7e23830fa8145 100644
--- a/llvm/test/MC/RISCV/rvv/zvvmtls-invalid.s
+++ b/llvm/test/MC/RISCV/rvv/zvvmtls-invalid.s
@@ -14,7 +14,7 @@ vmtl.v v8, (a0), a1, L4, v1.t
# CHECK: error: operand must be v0.t
vmtl.v v8, (a0), a1, v0.t, L4
-# CHECK: error: invalid operand for instruction
+# CHECK: error: too many operands for instruction
vmts.v v12, (a0), a1, L0
# CHECK: error: operand must be L1, L2, L4, L8, L16, L32, or L64
@@ -29,4 +29,4 @@ vmts.v v12, (a0), a1, L4, v1.t
# CHECK: error: operand must be v0.t
vmts.v v12, (a0), a1, v0.t, L4
-# CHECK: error: invalid operand for instruction
+# CHECK: error: too many operands for instruction
diff --git a/llvm/test/MC/RISCV/rvv/zvvmttls-invalid.s b/llvm/test/MC/RISCV/rvv/zvvmttls-invalid.s
index 226680f32b7c5..14357bf51fc3b 100644
--- a/llvm/test/MC/RISCV/rvv/zvvmttls-invalid.s
+++ b/llvm/test/MC/RISCV/rvv/zvvmttls-invalid.s
@@ -14,7 +14,7 @@ vmttl.v v8, (a0), a1, L4, v1.t
# CHECK: error: operand must be v0.t
vmttl.v v8, (a0), a1, v0.t, L4
-# CHECK: error: invalid operand for instruction
+# CHECK: error: too many operands for instruction
vmtts.v v12, (a0), a1, L0
# CHECK: error: operand must be L1, L2, L4, L8, L16, L32, or L64
@@ -29,4 +29,4 @@ vmtts.v v12, (a0), a1, L4, v1.t
# CHECK: error: operand must be v0.t
vmtts.v v12, (a0), a1, v0.t, L4
-# CHECK: error: invalid operand for instruction
+# CHECK: error: too many operands for instruction
diff --git a/llvm/test/MC/RISCV/rvy/rvy-basic-invalid.s b/llvm/test/MC/RISCV/rvy/rvy-basic-invalid.s
index 0ad7f74c21cf3..0c5ff9084e74e 100644
--- a/llvm/test/MC/RISCV/rvy/rvy-basic-invalid.s
+++ b/llvm/test/MC/RISCV/rvy/rvy-basic-invalid.s
@@ -11,9 +11,13 @@ yaddi a0, a0, 2048
/// Since X0 is invalid, we fall back to checking the immediate alias and get that error instead
/// TODO: It would be nice to report operand must be a a register other than X0 instead.
yadd a0, a1, zero
-// CHECK: :[[#@LINE-1]]:14: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+// CHECK: :[[#@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+// CHECK: :[[#@LINE-2]]:14: note: register must be a GPR excluding zero (x0)
+// CHECK: :[[#@LINE-3]]:14: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
yadd a0, a1, x0
-// CHECK: :[[#@LINE-1]]:14: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+// CHECK: :[[#@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+// CHECK: :[[#@LINE-2]]:14: note: register must be a GPR excluding zero (x0)
+// CHECK: :[[#@LINE-3]]:14: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
srliy a0, a1, 65
// CHECK-32: :[[#@LINE-1]]:15: error: immediate must be an integer equal to XLEN (32)
// CHECK-64: :[[#@LINE-2]]:15: error: immediate must be an integer equal to XLEN (64)
diff --git a/llvm/test/MC/RISCV/rvzfbfmin-invalid.s b/llvm/test/MC/RISCV/rvzfbfmin-invalid.s
index b274c780e54b1..a6d9f848702cd 100644
--- a/llvm/test/MC/RISCV/rvzfbfmin-invalid.s
+++ b/llvm/test/MC/RISCV/rvzfbfmin-invalid.s
@@ -16,10 +16,10 @@ flh ft15, 100(a0) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
flh ft1, 100(a10) # CHECK: :[[@LINE]]:14: error: expected register
# Integer registers where FP regs are expected
-fmv.x.h fs7, a2 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+fmv.x.h fs7, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
# FP registers where integer regs are expected
-fmv.h.x a8, ft2 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+fmv.h.x a8, ft2 # CHECK: :[[@LINE]]:1: error: invalid instruction
# Attempting to use fcvt instructions from zfhmin
fcvt.s.h fa0, ft0 # CHECK: [[@LINE]]:1: error: instruction requires the following: 'Zfh' (Half-Precision Floating-Point) or 'Zfhmin' (Half-Precision Floating-Point Minimal)
diff --git a/llvm/test/MC/RISCV/rvzfhmin-invalid.s b/llvm/test/MC/RISCV/rvzfhmin-invalid.s
index ea46ebf0253d9..ea020cc999692 100644
--- a/llvm/test/MC/RISCV/rvzfhmin-invalid.s
+++ b/llvm/test/MC/RISCV/rvzfhmin-invalid.s
@@ -16,10 +16,10 @@ flh ft15, 100(a0) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
flh ft1, 100(a10) # CHECK: :[[@LINE]]:14: error: expected register
# Integer registers where FP regs are expected
-fmv.x.h fs7, a2 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+fmv.x.h fs7, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
# FP registers where integer regs are expected
-fmv.h.x a8, ft2 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+fmv.h.x a8, ft2 # CHECK: :[[@LINE]]:1: error: invalid instruction
# Zfh instructions
fmadd.h f10, f11, f12, f13, dyn # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'Zfh' (Half-Precision Floating-Point){{$}}
diff --git a/llvm/test/MC/RISCV/rvzicbop-invalid.s b/llvm/test/MC/RISCV/rvzicbop-invalid.s
index a158764c489aa..b07f3d01dc65d 100644
--- a/llvm/test/MC/RISCV/rvzicbop-invalid.s
+++ b/llvm/test/MC/RISCV/rvzicbop-invalid.s
@@ -2,8 +2,8 @@
# RUN: not llvm-mc -triple riscv64 -mattr=+zicbop < %s 2>&1 | FileCheck %s
# Memory operand not formatted correctly.
-prefetch.i a0, 32 # CHECK: :[[@LINE]]:12: error: immediate must be a multiple of 32 bytes in the range [-2048, 2016]
-prefetch.r 32, a0 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
+prefetch.i a0, 32 # CHECK: :[[@LINE]]:1: error: invalid instruction
+prefetch.r 32, a0 # CHECK: :[[@LINE]]:1: error: invalid instruction
prefetch.w a0(32) # CHECK: :[[@LINE]]:14: error: unexpected token
# Out of range offset.
diff --git a/llvm/test/MC/RISCV/rvzicond-invalid.s b/llvm/test/MC/RISCV/rvzicond-invalid.s
index 02f5d1777b0eb..6331ad7806e1e 100644
--- a/llvm/test/MC/RISCV/rvzicond-invalid.s
+++ b/llvm/test/MC/RISCV/rvzicond-invalid.s
@@ -11,8 +11,8 @@ czero.nez a4, a3, foo # CHECK: :[[@LINE]]:19: error: invalid operand for instruc
czero.eqz t1, 2, t3 # CHECK: :[[@LINE]]:15: error: invalid operand for instruction
# Too many operands
-czero.eqz t1, t2, t3, t4 # CHECK: :[[@LINE]]:23: error: invalid operand for instruction
-czero.nez t1, t2, t3, 4 # CHECK: :[[@LINE]]:23: error: invalid operand for instruction
+czero.eqz t1, t2, t3, t4 # CHECK: :[[@LINE]]:23: error: too many operands for instruction
+czero.nez t1, t2, t3, 4 # CHECK: :[[@LINE]]:23: error: too many operands for instruction
# Too few operands
-czero.eqz t1, t2 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
+czero.eqz t1, t2 # CHECK: :[[@LINE]]:17: error: too few operands for instruction
diff --git a/llvm/test/MC/RISCV/rvzihintntl-invalid.s b/llvm/test/MC/RISCV/rvzihintntl-invalid.s
index 9fc647100fcf4..d30145ba32ad6 100644
--- a/llvm/test/MC/RISCV/rvzihintntl-invalid.s
+++ b/llvm/test/MC/RISCV/rvzihintntl-invalid.s
@@ -7,12 +7,12 @@
# RUN: not llvm-mc -triple riscv32 < %s 2>&1 | FileCheck %s
# RUN: not llvm-mc -triple riscv64 < %s 2>&1 | FileCheck %s
-ntl.p1 1 # CHECK: :[[@LINE]]:8: error: invalid operand for instruction
-ntl.pall 2 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
-ntl.s1 3 # CHECK: :[[@LINE]]:8: error: invalid operand for instruction
-ntl.all 4 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+ntl.p1 1 # CHECK: :[[@LINE]]:8: error: too many operands for instruction
+ntl.pall 2 # CHECK: :[[@LINE]]:10: error: too many operands for instruction
+ntl.s1 3 # CHECK: :[[@LINE]]:8: error: too many operands for instruction
+ntl.all 4 # CHECK: :[[@LINE]]:9: error: too many operands for instruction
-ntl.p1 t0, t1 # CHECK: :[[@LINE]]:8: error: invalid operand for instruction
-ntl.pall t0, t1 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
-ntl.s1 t0, t1 # CHECK: :[[@LINE]]:8: error: invalid operand for instruction
-ntl.all t0, t1 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+ntl.p1 t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
+ntl.pall t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
+ntl.s1 t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
+ntl.all t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rvzihintntlc-invalid.s b/llvm/test/MC/RISCV/rvzihintntlc-invalid.s
index 04510d1c24235..19def8333d48b 100644
--- a/llvm/test/MC/RISCV/rvzihintntlc-invalid.s
+++ b/llvm/test/MC/RISCV/rvzihintntlc-invalid.s
@@ -1,13 +1,13 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+zihintntl,+c < %s 2>&1 | FileCheck %s
# RUN: not llvm-mc -triple riscv64 -mattr=+zihintntl,+c < %s 2>&1 | FileCheck %s
-c.ntl.p1 1 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
-c.ntl.pall 2 # CHECK: :[[@LINE]]:12: error: invalid operand for instruction
-c.ntl.s1 3 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
-c.ntl.all 4 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+c.ntl.p1 1 # CHECK: :[[@LINE]]:10: error: too many operands for instruction
+c.ntl.pall 2 # CHECK: :[[@LINE]]:12: error: too many operands for instruction
+c.ntl.s1 3 # CHECK: :[[@LINE]]:10: error: too many operands for instruction
+c.ntl.all 4 # CHECK: :[[@LINE]]:11: error: too many operands for instruction
-c.ntl.p1 t0, t1 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
-c.ntl.pall t0, t1 # CHECK: :[[@LINE]]:12: error: invalid operand for instruction
-c.ntl.s1 t0, t1 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
-c.ntl.all t0, t1 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+c.ntl.p1 t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
+c.ntl.pall t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
+c.ntl.s1 t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
+c.ntl.all t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/smrnmi-invalid.s b/llvm/test/MC/RISCV/smrnmi-invalid.s
index 1a5e692148b37..76eee88caa924 100644
--- a/llvm/test/MC/RISCV/smrnmi-invalid.s
+++ b/llvm/test/MC/RISCV/smrnmi-invalid.s
@@ -1,4 +1,4 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+smrnmi < %s 2>&1 | FileCheck %s
# RUN: not llvm-mc -triple riscv64 -mattr=+smrnmi < %s 2>&1 | FileCheck %s
-mnret 0x10 # CHECK: :[[@LINE]]:7: error: invalid operand for instruction
+mnret 0x10 # CHECK: :[[@LINE]]:7: error: too many operands for instruction
diff --git a/llvm/test/MC/RISCV/tlsdesc.s b/llvm/test/MC/RISCV/tlsdesc.s
index d66b0d3321eef..635eeae9f2c5b 100644
--- a/llvm/test/MC/RISCV/tlsdesc.s
+++ b/llvm/test/MC/RISCV/tlsdesc.s
@@ -44,13 +44,15 @@ start: # @start
auipc x1, %tlsdesc_call(1234) # ERR: :[[#@LINE]]:12: error: operand must be a symbol with a %pcrel_hi/%got_pcrel_hi/%tls_ie_pcrel_hi/%tls_gd_pcrel_hi specifier or an integer in the range
auipc a0, %tlsdesc_hi(a+b) # ERR: :[[#@LINE]]:12: error: operand must be a symbol with a %pcrel_hi/%got_pcrel_hi/%tls_ie_pcrel_hi/%tls_gd_pcrel_hi specifier or an integer in the range
- lw a0, t0, %tlsdesc_load_lo(a_symbol) # ERR: :[[#@LINE]]:15: error: invalid operand for instruction
- lw a0, t0, %tlsdesc_load_lo(a_symbol)(a4) # ERR: :[[#@LINE]]:15: error: invalid operand for instruction
+ lw a0, t0, %tlsdesc_load_lo(a_symbol) # ERR: :[[#@LINE]]:15: error: too many operands for instruction
+ lw a0, t0, %tlsdesc_load_lo(a_symbol)(a4) # ERR: :[[#@LINE]]:2: error: invalid instruction
- addi a0, t0, %tlsdesc_add_lo(a_symbol)(a4) # ERR: :[[#@LINE]]:41: error: invalid operand for instruction
- addi a0, %tlsdesc_add_lo(a_symbol) # ERR: :[[#@LINE]]:11: error: invalid operand for instruction
- addi x1, %tlsdesc_load_lo(a_symbol)(a0) # ERR: :[[#@LINE]]:11: error: invalid operand for instruction
+ addi a0, t0, %tlsdesc_add_lo(a_symbol)(a4) # ERR: :[[#@LINE]]:2: error: invalid instruction
+ addi a0, %tlsdesc_add_lo(a_symbol) # ERR: :[[#@LINE]]:2: error: invalid instruction
+ addi x1, %tlsdesc_load_lo(a_symbol)(a0) # ERR: :[[#@LINE]]:2: error: invalid instruction
- jalr x5, 0(a1), %tlsdesc_hi(a_symbol) # ERR: :[[#@LINE]]:18: error: operand must be a symbol with %tlsdesc_call specifier
+ jalr x5, 0(a1), %tlsdesc_hi(a_symbol) # ERR: :[[#@LINE]]:2: error: invalid instruction, any one of the following would fix this:
+ # ERR: :[[#@LINE-1]]:18: note: too many operands for instruction
+ # ERR: :[[#@LINE-2]]:18: note: operand must be a symbol with %tlsdesc_call specifier
jalr x1, 0(a1), %tlsdesc_call(a_symbol) # ERR: :[[#@LINE]]:13: error: the output operand must be t0/x5 when using %tlsdesc_call specifier
.endif
diff --git a/llvm/test/MC/RISCV/xandesperf-invalid.s b/llvm/test/MC/RISCV/xandesperf-invalid.s
index d095e7e24b99c..8382782ffe893 100644
--- a/llvm/test/MC/RISCV/xandesperf-invalid.s
+++ b/llvm/test/MC/RISCV/xandesperf-invalid.s
@@ -8,8 +8,8 @@ nds.bbc t0, 33, 256 # CHECK: :[[@LINE]]:13: error: immediate must be an integer
nds.bbs t1, 33, 256 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 31]
## uimm7
-nds.beqc t0, 1024, 13 # CHECK: :[[@LINE]]:14: error: immediate must be an integer in the range [0, 127]
-nds.bnec t1, -1, -13 # CHECK: :[[@LINE]]:14: error: immediate must be an integer in the range [0, 127]
+nds.beqc t0, 1024, 13 # CHECK: :[[@LINE]]:1: error: invalid instruction
+nds.bnec t1, -1, -13 # CHECK: :[[@LINE]]:1: error: invalid instruction
## simm11_lsb0
nds.bbc t0, 7, 1024 # CHECK: :[[@LINE]]:16: error: immediate must be a multiple of 2 bytes in the range [-1024, 1022]
diff --git a/llvm/test/MC/RISCV/xmips-invalid.s b/llvm/test/MC/RISCV/xmips-invalid.s
index b63e3a8bdcdf1..73d142c4d3249 100644
--- a/llvm/test/MC/RISCV/xmips-invalid.s
+++ b/llvm/test/MC/RISCV/xmips-invalid.s
@@ -2,13 +2,13 @@
# RUN: not llvm-mc -triple=riscv64 -mattr=+xmipslsp,+xmipscmov,+xmipscbop,+xmipsexectl < %s 2>&1 | FileCheck %s
mips.pause 10
-# CHECK: error: invalid operand for instruction
+# CHECK: error: too many operands for instruction
mips.ehb 10
-# CHECK: error: invalid operand for instruction
+# CHECK: error: too many operands for instruction
mips.ihb 10
-# CHECK: error: invalid operand for instruction
+# CHECK: error: too many operands for instruction
mips.pref 8, 512(a0)
# CHECK: error: immediate offset must be in the range [0, 511]
@@ -20,7 +20,7 @@ mips.pref 8, 511(a0)
# CHECK-FEATURE: error: instruction requires the following: 'Xmipscbop' (MIPS hardware prefetch)
mips.ccmov x0, x1, 0x10
-# CHECK: error: invalid operand for instruction
+# CHECK: error: invalid instruction
mips.ccmov x10
# CHECK: error: too few operands for instruction
@@ -32,7 +32,7 @@ mips.lwp x10, x11
# CHECK: error: too few operands for instruction
mips.ldp x9, 0x20
-# CHECK: error: invalid operand for instruction
+# CHECK: error: invalid instruction
mips.lwp x11, x12, 0(x13)
# CHECK-FEATURE: error: instruction requires the following: 'Xmipslsp' (load and store pair instructions)
@@ -41,4 +41,4 @@ mips.swp x18, x19, 8(x2)
# CHECK-FEATURE: error: instruction requires the following: 'Xmipslsp' (load and store pair instructions)
mips.sdp 0x10, x3, 12(x4)
-# CHECK: error: invalid operand for instruction
+# CHECK: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/xqci-access-pseudos.s b/llvm/test/MC/RISCV/xqci-access-pseudos.s
index aaabc15b0712a..c3e77047682b4 100644
--- a/llvm/test/MC/RISCV/xqci-access-pseudos.s
+++ b/llvm/test/MC/RISCV/xqci-access-pseudos.s
@@ -20,7 +20,9 @@ lb a0, 0(a1), %qc.access(extern1)
# CHECK-RELOC: R_RISCV_VENDOR QUALCOMM
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_32 extern1
# CHECK-RELOC-NEXT: R_RISCV_RELAX
-# CHECK-RV64: [[@LINE-7]]:1: error: instruction requires the following: RV32I Base Instruction Set
+# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-RV64: [[@LINE-8]]:15: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
lbu a0, 0(a1), %qc.access(extern1)
# CHECK-INST: lbu a0, 0(a1)
@@ -29,7 +31,9 @@ lbu a0, 0(a1), %qc.access(extern1)
# CHECK-RELOC: R_RISCV_VENDOR QUALCOMM
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_32 extern1
# CHECK-RELOC-NEXT: R_RISCV_RELAX
-# CHECK-RV64: [[@LINE-7]]:1: error: instruction requires the following: RV32I Base Instruction Set
+# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-RV64: [[@LINE-8]]:16: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
lh a2, 0(a3), %qc.access(extern2)
# CHECK-INST: lh a2, 0(a3)
@@ -38,7 +42,9 @@ lh a2, 0(a3), %qc.access(extern2)
# CHECK-RELOC: R_RISCV_VENDOR QUALCOMM
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_32 extern2
# CHECK-RELOC-NEXT: R_RISCV_RELAX
-# CHECK-RV64: [[@LINE-7]]:1: error: instruction requires the following: RV32I Base Instruction Set
+# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-RV64: [[@LINE-8]]:15: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
lhu a2, 0(a3), %qc.access(extern2)
# CHECK-INST: lhu a2, 0(a3)
@@ -47,7 +53,9 @@ lhu a2, 0(a3), %qc.access(extern2)
# CHECK-RELOC: R_RISCV_VENDOR QUALCOMM
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_32 extern2
# CHECK-RELOC-NEXT: R_RISCV_RELAX
-# CHECK-RV64: [[@LINE-7]]:1: error: instruction requires the following: RV32I Base Instruction Set
+# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-RV64: [[@LINE-8]]:16: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
lw a4, 0(a5), %qc.access(extern4)
# CHECK-INST: lw a4, 0(a5)
@@ -56,7 +64,9 @@ lw a4, 0(a5), %qc.access(extern4)
# CHECK-RELOC: R_RISCV_VENDOR QUALCOMM
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_32 extern4
# CHECK-RELOC-NEXT: R_RISCV_RELAX
-# CHECK-RV64: [[@LINE-7]]:1: error: instruction requires the following: RV32I Base Instruction Set
+# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-RV64: [[@LINE-8]]:15: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
sb a0, 0(a1), %qc.access(extern1)
# CHECK-INST: sb a0, 0(a1)
@@ -65,7 +75,9 @@ sb a0, 0(a1), %qc.access(extern1)
# CHECK-RELOC: R_RISCV_VENDOR QUALCOMM
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_32 extern1
# CHECK-RELOC-NEXT: R_RISCV_RELAX
-# CHECK-RV64: [[@LINE-7]]:1: error: instruction requires the following: RV32I Base Instruction Set
+# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-RV64: [[@LINE-8]]:15: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
sh a2, 0(a3), %qc.access(extern2)
# CHECK-INST: sh a2, 0(a3)
@@ -74,7 +86,9 @@ sh a2, 0(a3), %qc.access(extern2)
# CHECK-RELOC: R_RISCV_VENDOR QUALCOMM
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_32 extern2
# CHECK-RELOC-NEXT: R_RISCV_RELAX
-# CHECK-RV64: [[@LINE-7]]:1: error: instruction requires the following: RV32I Base Instruction Set
+# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-RV64: [[@LINE-8]]:15: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
sw a4, 0(a5), %qc.access(extern4)
# CHECK-INST: sw a4, 0(a5)
@@ -83,7 +97,9 @@ sw a4, 0(a5), %qc.access(extern4)
# CHECK-RELOC: R_RISCV_VENDOR QUALCOMM
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_32 extern4
# CHECK-RELOC-NEXT: R_RISCV_RELAX
-# CHECK-RV64: [[@LINE-7]]:1: error: instruction requires the following: RV32I Base Instruction Set
+# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-RV64: [[@LINE-8]]:15: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
## No c.lb
@@ -94,7 +110,9 @@ c.lbu a0, 0(a1), %qc.access(extern1)
# CHECK-RELOC: R_RISCV_VENDOR QUALCOMM
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_16 extern1
# CHECK-RELOC-NEXT: R_RISCV_RELAX
-# CHECK-RV64: [[@LINE-7]]:1: error: instruction requires the following: RV32I Base Instruction Set
+# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-RV64: [[@LINE-8]]:18: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
c.lh a2, 0(a3), %qc.access(extern2)
# CHECK-INST: c.lh a2, 0(a3)
@@ -103,7 +121,9 @@ c.lh a2, 0(a3), %qc.access(extern2)
# CHECK-RELOC: R_RISCV_VENDOR QUALCOMM
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_16 extern2
# CHECK-RELOC-NEXT: R_RISCV_RELAX
-# CHECK-RV64: [[@LINE-7]]:1: error: instruction requires the following: RV32I Base Instruction Set
+# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-RV64: [[@LINE-8]]:17: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
c.lhu a2, 0(a3), %qc.access(extern2)
# CHECK-INST: c.lhu a2, 0(a3)
@@ -112,7 +132,9 @@ c.lhu a2, 0(a3), %qc.access(extern2)
# CHECK-RELOC: R_RISCV_VENDOR QUALCOMM
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_16 extern2
# CHECK-RELOC-NEXT: R_RISCV_RELAX
-# CHECK-RV64: [[@LINE-7]]:1: error: instruction requires the following: RV32I Base Instruction Set
+# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-RV64: [[@LINE-8]]:18: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
c.lw a4, 0(a5), %qc.access(extern4)
# CHECK-INST: c.lw a4, 0(a5)
@@ -121,7 +143,9 @@ c.lw a4, 0(a5), %qc.access(extern4)
# CHECK-RELOC: R_RISCV_VENDOR QUALCOMM
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_16 extern4
# CHECK-RELOC-NEXT: R_RISCV_RELAX
-# CHECK-RV64: [[@LINE-7]]:1: error: instruction requires the following: RV32I Base Instruction Set
+# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-RV64: [[@LINE-8]]:17: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
c.sb a0, 0(a1), %qc.access(extern1)
# CHECK-INST: c.sb a0, 0(a1)
@@ -130,7 +154,9 @@ c.sb a0, 0(a1), %qc.access(extern1)
# CHECK-RELOC: R_RISCV_VENDOR QUALCOMM
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_16 extern1
# CHECK-RELOC-NEXT: R_RISCV_RELAX
-# CHECK-RV64: [[@LINE-7]]:1: error: instruction requires the following: RV32I Base Instruction Set
+# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-RV64: [[@LINE-8]]:17: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
c.sh a2, 0(a3), %qc.access(extern2)
# CHECK-INST: c.sh a2, 0(a3)
@@ -139,7 +165,9 @@ c.sh a2, 0(a3), %qc.access(extern2)
# CHECK-RELOC: R_RISCV_VENDOR QUALCOMM
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_16 extern2
# CHECK-RELOC-NEXT: R_RISCV_RELAX
-# CHECK-RV64: [[@LINE-7]]:1: error: instruction requires the following: RV32I Base Instruction Set
+# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-RV64: [[@LINE-8]]:17: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
c.sw a4, 0(a5), %qc.access(extern4)
# CHECK-INST: c.sw a4, 0(a5)
@@ -148,4 +176,6 @@ c.sw a4, 0(a5), %qc.access(extern4)
# CHECK-RELOC: R_RISCV_VENDOR QUALCOMM
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_16 extern4
# CHECK-RELOC-NEXT: R_RISCV_RELAX
-# CHECK-RV64: [[@LINE-7]]:1: error: instruction requires the following: RV32I Base Instruction Set
+# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-RV64: [[@LINE-8]]:17: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
diff --git a/llvm/test/MC/RISCV/xqcia-invalid.s b/llvm/test/MC/RISCV/xqcia-invalid.s
index 5e679c1900acc..a6c60f3848567 100644
--- a/llvm/test/MC/RISCV/xqcia-invalid.s
+++ b/llvm/test/MC/RISCV/xqcia-invalid.s
@@ -5,22 +5,22 @@
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-MINUS %s
# CHECK-PLUS: :[[@LINE+2]]:20: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.shlsat x10, x3, 17
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|1: error: invalid instruction}}
qc.shlsat x10, x3
# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.shlsat x0, x3, x17
# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.shlsat x10, x0, x17
# CHECK-PLUS: :[[@LINE+2]]:20: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.shlsat x10, x3, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension)
@@ -28,22 +28,22 @@ qc.shlsat x10, x3, x17
# CHECK-PLUS: :[[@LINE+2]]:22: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:22: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.shlusat x23, x25, 27
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{20: error: too few operands for instruction|1: error: invalid instruction}}
qc.shlusat x23, x25
# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.shlusat x0, x25, x27
# CHECK-PLUS: :[[@LINE+2]]:17: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:17: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.shlusat x23, x0, x27
# CHECK-PLUS: :[[@LINE+2]]:22: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:22: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.shlusat x23, x25, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension)
@@ -51,22 +51,22 @@ qc.shlusat x23, x25, x27
# CHECK-PLUS: :[[@LINE+2]]:21: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:21: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.addsat x17, x14, 7
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{19: error: too few operands for instruction|1: error: invalid instruction}}
qc.addsat x17, x14
# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.addsat x0, x14, x7
# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.addsat x17, x0, x7
# CHECK-PLUS: :[[@LINE+2]]:21: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:21: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.addsat x17, x14, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension)
@@ -74,22 +74,22 @@ qc.addsat x17, x14, x7
# CHECK-PLUS: :[[@LINE+2]]:21: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:21: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.addusat x8, x18, 28
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{19: error: too few operands for instruction|1: error: invalid instruction}}
qc.addusat x8, x18
# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.addusat x0, x18, x28
# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.addusat x8, x0, x28
# CHECK-PLUS: :[[@LINE+2]]:21: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:21: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.addusat x8, x18, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension)
@@ -97,22 +97,22 @@ qc.addusat x8, x18, x28
# CHECK-PLUS: :[[@LINE+2]]:20: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.subsat x22, x2, 12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|1: error: invalid instruction}}
qc.subsat x22, x2
# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.subsat x0, x2, x12
# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.subsat x22, x0, x12
# CHECK-PLUS: :[[@LINE+2]]:20: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.subsat x22, x2, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension)
@@ -120,22 +120,22 @@ qc.subsat x22, x2, x12
# CHECK-PLUS: :[[@LINE+2]]:21: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:21: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.subusat x9, x14, 17
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{19: error: too few operands for instruction|1: error: invalid instruction}}
qc.subusat x9, x14
# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.subusat x0, x14, x17
# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.subusat x9, x0, x17
# CHECK-PLUS: :[[@LINE+2]]:21: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:21: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.subusat x9, x14, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension)
@@ -143,37 +143,37 @@ qc.subusat x9, x14, x17
# CHECK-PLUS: :[[@LINE+2]]:18: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:18: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.wrap x3, x30, 23
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{16: error: too few operands for instruction|1: error: invalid instruction}}
qc.wrap x3, x30
# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.wrap x0, x30, x23
# CHECK-PLUS: :[[@LINE+2]]:18: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:18: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.wrap x3, x30, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension)
qc.wrap x3, x30, x23
-# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK-PLUS: :[[@LINE+2]]:1: error: invalid instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.wrapi x0, 12, 2047
# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.wrapi x0, x12, 2047
# CHECK-PLUS: :[[@LINE+2]]:14: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.wrapi x6, x0, 2047
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{17: error: too few operands for instruction|1: error: invalid instruction}}
qc.wrapi x6, x12
# CHECK-PLUS: :[[@LINE+1]]:19: error: immediate must be an integer in the range [0, 2047]
@@ -184,18 +184,18 @@ qc.wrapi x6, x12, 2047
# CHECK-PLUS: :[[@LINE+2]]:13: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.norm x3, 7
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{11: error: too few operands for instruction|1: error: invalid instruction}}
qc.norm x3
# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.norm x0, x7
# CHECK-PLUS: :[[@LINE+2]]:13: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.norm x3, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension)
@@ -203,18 +203,18 @@ qc.norm x3, x7
# CHECK-PLUS: :[[@LINE+2]]:15: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:15: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.normu x11, 17
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{13: error: too few operands for instruction|1: error: invalid instruction}}
qc.normu x11
# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.normu x0, x17
# CHECK-PLUS: :[[@LINE+2]]:15: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:15: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.normu x11, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension)
@@ -222,18 +222,18 @@ qc.normu x11, x17
# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.normeu x26, 31
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{14: error: too few operands for instruction|1: error: invalid instruction}}
qc.normeu x26
# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.normeu x0, x31
# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.normeu x26, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension)
diff --git a/llvm/test/MC/RISCV/xqciac-invalid.s b/llvm/test/MC/RISCV/xqciac-invalid.s
index e4e16d3cf9152..7f95dd3ae8e00 100644
--- a/llvm/test/MC/RISCV/xqciac-invalid.s
+++ b/llvm/test/MC/RISCV/xqciac-invalid.s
@@ -8,7 +8,7 @@
# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
qc.c.muliadd x5, x10, 4
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{17: error: too few operands for instruction|1: error: invalid instruction}}
qc.c.muliadd x15
# CHECK-IMM: :[[@LINE+1]]:24: error: immediate must be an integer in the range [0, 31]
@@ -22,7 +22,7 @@ qc.c.muliadd x10, x15, 20
# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
qc.muliadd x0, x10, 1048577
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{15: error: too few operands for instruction|1: error: invalid instruction}}
qc.muliadd x10
# CHECK-IMM: :[[@LINE+1]]:22: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
@@ -36,7 +36,7 @@ qc.muliadd x10, x15, 577
# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
qc.shladd 0, x10, 1048577
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{14: error: too few operands for instruction|1: error: invalid instruction}}
qc.shladd x10
# CHECK-IMM: :[[@LINE+1]]:26: error: immediate must be an integer in the range [4, 31]
diff --git a/llvm/test/MC/RISCV/xqcibi-invalid.s b/llvm/test/MC/RISCV/xqcibi-invalid.s
index 78568c458dfe3..6ec72fceafc2d 100644
--- a/llvm/test/MC/RISCV/xqcibi-invalid.s
+++ b/llvm/test/MC/RISCV/xqcibi-invalid.s
@@ -5,10 +5,10 @@
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-MINUS %s
# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.beqi x0, 12, 346
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{15: error: too few operands for instruction|1: error: invalid instruction}}
qc.beqi x8, 12
# CHECK-PLUS: :[[@LINE+1]]:13: error: immediate must be non-zero in the range [-16, 15]
@@ -22,10 +22,10 @@ qc.beqi x8, 12, 346
# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.bnei x0, 15, 4094
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{15: error: too few operands for instruction|1: error: invalid instruction}}
qc.bnei x4, 15
# CHECK-PLUS: :[[@LINE+1]]:13: error: immediate must be non-zero in the range [-16, 15]
@@ -39,10 +39,10 @@ qc.bnei x4, 15, 4094
# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.bgei x0, 1, -4096
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{15: error: too few operands for instruction|1: error: invalid instruction}}
qc.bgei x10, 1
# CHECK-PLUS: :[[@LINE+1]]:14: error: immediate must be non-zero in the range [-16, 15]
@@ -56,10 +56,10 @@ qc.bgei x10, 1, -4096
# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.blti x0, 6, 2000
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{14: error: too few operands for instruction|1: error: invalid instruction}}
qc.blti x1, 6
# CHECK-PLUS: :[[@LINE+1]]:13: error: immediate must be non-zero in the range [-16, 15]
@@ -73,10 +73,10 @@ qc.blti x1, 6, 2000
# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.bgeui x0, 11, 128
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{17: error: too few operands for instruction|1: error: invalid instruction}}
qc.bgeui x12, 11
# CHECK-PLUS: :[[@LINE+1]]:15: error: immediate must be an integer in the range [1, 31]
@@ -90,10 +90,10 @@ qc.bgeui x12, 11, 128
# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.bltui x0, 7, 666
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{15: error: too few operands for instruction|1: error: invalid instruction}}
qc.bltui x2, 7
# CHECK-PLUS: :[[@LINE+1]]:14: error: immediate must be an integer in the range [1, 31]
@@ -107,10 +107,10 @@ qc.bltui x2, 7, 666
# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.e.beqi x0, 1, 2
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{16: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.beqi x1, 1
# CHECK-PLUS: :[[@LINE+1]]:15: error: immediate must be non-zero in the range [-32768, 32767]
@@ -124,10 +124,10 @@ qc.e.beqi x1, 1, 2
# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.e.bnei x0, 115, 4094
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.bnei x4, 115
# CHECK-PLUS: :[[@LINE+1]]:15: error: immediate must be non-zero in the range [-32768, 32767]
@@ -141,10 +141,10 @@ qc.e.bnei x4, 115, 4094
# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.e.bgei x0, -32768, -4096
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{22: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.bgei x10, -32768
# CHECK-PLUS: :[[@LINE+1]]:16: error: immediate must be non-zero in the range [-32768, 32767]
@@ -158,10 +158,10 @@ qc.e.bgei x10, -32768, -4096
# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.e.blti x0, 32767, 2000
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{20: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.blti x1, 32767
# CHECK-PLUS: :[[@LINE+1]]:15: error: immediate must be non-zero in the range [-32768, 32767]
@@ -175,10 +175,10 @@ qc.e.blti x1, 32767, 2000
# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.e.bgeui x0, 711, 128
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{20: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.bgeui x12, 711
# CHECK-PLUS: :[[@LINE+1]]:17: error: immediate must be an integer in the range [1, 65535]
@@ -192,10 +192,10 @@ qc.e.bgeui x12, 711, 128
# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.e.bltui x0, 7, 666
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{17: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.bltui x2, 7
# CHECK-PLUS: :[[@LINE+1]]:16: error: immediate must be an integer in the range [1, 65535]
diff --git a/llvm/test/MC/RISCV/xqcibm-invalid.s b/llvm/test/MC/RISCV/xqcibm-invalid.s
index 0f9392c944f50..3071834e5fdb4 100644
--- a/llvm/test/MC/RISCV/xqcibm-invalid.s
+++ b/llvm/test/MC/RISCV/xqcibm-invalid.s
@@ -5,18 +5,18 @@
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-MINUS %s --implicit-check-not="error:"
# CHECK-PLUS: :[[@LINE+2]]:18: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:18: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.compress2 x7, 5
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{16: error: too few operands for instruction|1: error: invalid instruction}}
qc.compress2 x7
# CHECK-PLUS: :[[@LINE+2]]:14: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.compress2 x0,x5
# CHECK-PLUS: :[[@LINE+2]]:18: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:18: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.compress2 x7, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -24,18 +24,18 @@ qc.compress2 x7, x5
# CHECK-PLUS: :[[@LINE+2]]:19: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:19: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.compress3 x10, 22
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{17: error: too few operands for instruction|1: error: invalid instruction}}
qc.compress3 x10
# CHECK-PLUS: :[[@LINE+2]]:14: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.compress3 x0, x22
# CHECK-PLUS: :[[@LINE+2]]:19: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:19: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.compress3 x10, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -43,18 +43,18 @@ qc.compress3 x10, x22
# CHECK-PLUS: :[[@LINE+2]]:17: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:17: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.expand2 x23, 23
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{15: error: too few operands for instruction|1: error: invalid instruction}}
qc.expand2 x23
# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.expand2 x0, x23
# CHECK-PLUS: :[[@LINE+2]]:17: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:17: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.expand2 x23, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -62,18 +62,18 @@ qc.expand2 x23, x23
# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.expand3 x2, 6
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{14: error: too few operands for instruction|1: error: invalid instruction}}
qc.expand3 x2
# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.expand3 x0, x6
# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.expand3 x2, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -81,18 +81,18 @@ qc.expand3 x2, x6
# CHECK-PLUS: :[[@LINE+2]]:13: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.clo x23, 24
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{11: error: too few operands for instruction|1: error: invalid instruction}}
qc.clo x23
# CHECK-PLUS: :[[@LINE+2]]:8: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:8: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.clo x0, x24
# CHECK-PLUS: :[[@LINE+2]]:13: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.clo x23, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -100,18 +100,18 @@ qc.clo x23, x24
# CHECK-PLUS: :[[@LINE+2]]:13: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.cto x12, 13
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{11: error: too few operands for instruction|1: error: invalid instruction}}
qc.cto x12
# CHECK-PLUS: :[[@LINE+2]]:8: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:8: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.cto x0, x13
# CHECK-PLUS: :[[@LINE+2]]:13: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.cto x12, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -119,18 +119,18 @@ qc.cto x12, x13
# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.brev32 x20, 24
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{14: error: too few operands for instruction|1: error: invalid instruction}}
qc.brev32 x20
# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.brev32 x0, x24
# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.brev32 x20, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -138,22 +138,22 @@ qc.brev32 x20, x24
# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbri x10, 20, -1024
# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbri x0, x20, -1024
# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbri x10, x0, -1024
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{19: error: too few operands for instruction|1: error: invalid instruction}}
qc.insbri x10, x20
# CHECK-PLUS: :[[@LINE+2]]:21: error: immediate must be an integer in the range [-1024, 1023]
-# CHECK-MINUS: :[[@LINE+1]]:21: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbri x10, x20, -1027
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -161,66 +161,66 @@ qc.insbri x10, x20, -1024
# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbi x0, -10, 12, 15
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{21: error: too few operands for instruction|1: error: invalid instruction}}
qc.insbi x6, -10, 12
# CHECK-PLUS: :[[@LINE+2]]:14: error: immediate must be an integer in the range [-16, 15]
-# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbi x6, -17, 12, 15
# CHECK-PLUS: :[[@LINE+2]]:19: error: immediate must be an integer in the range [1, 32]
-# CHECK-MINUS: :[[@LINE+1]]:19: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbi x6, -10, 45, 15
# CHECK-PLUS: :[[@LINE+2]]:23: error: immediate must be an integer in the range [0, 31]
-# CHECK-MINUS: :[[@LINE+1]]:23: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbi x6, -10, 12, 65
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
qc.insbi x6, -10, 12, 15
-# CHECK: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{14: error: invalid operand for instruction|1: error: invalid instruction}}
qc.insb x10, 7, 6, 31
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{19: error: too few operands for instruction|1: error: invalid instruction}}
qc.insb x10, x7, 6
# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insb x0, x7, 6, 31
# CHECK-PLUS: :[[@LINE+2]]:18: error: immediate must be an integer in the range [1, 32]
-# CHECK-MINUS: :[[@LINE+1]]:18: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insb x10, x7, 46, 31
# CHECK-PLUS: :[[@LINE+2]]:21: error: immediate must be an integer in the range [0, 31]
-# CHECK-MINUS: :[[@LINE+1]]:21: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insb x10, x7, 6, 61
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
qc.insb x10, x7, 6, 31
-# CHECK: :[[@LINE+1]]:15: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{15: error: invalid operand for instruction|1: error: invalid instruction}}
qc.insbh x20, 12, 8, 12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{21: error: too few operands for instruction|1: error: invalid instruction}}
qc.insbh x20, x12, 8
# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbh x0, x12, 8, 12
# CHECK-PLUS: :[[@LINE+2]]:20: error: immediate must be an integer in the range [1, 32]
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbh x20, x12, 48, 12
# CHECK-PLUS: :[[@LINE+2]]:23: error: immediate must be an integer in the range [0, 31]
-# CHECK-MINUS: :[[@LINE+1]]:23: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbh x20, x12, 8, 72
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -228,26 +228,26 @@ qc.insbh x20, x12, 8, 12
# CHECK-PLUS: :[[@LINE+2]]:14: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extu x15, 12, 20, 20
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{21: error: too few operands for instruction|1: error: invalid instruction}}
qc.extu x15, x12, 20
# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extu x0, x12, 20, 20
# CHECK-PLUS: :[[@LINE+2]]:14: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extu x15, x0, 20, 20
# CHECK-PLUS: :[[@LINE+2]]:19: error: immediate must be an integer in the range [1, 32]
-# CHECK-MINUS: :[[@LINE+1]]:19: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extu x15, x12, 0, 20
# CHECK-PLUS: :[[@LINE+2]]:23: error: immediate must be an integer in the range [0, 31]
-# CHECK-MINUS: :[[@LINE+1]]:23: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extu x15, x12, 20, 60
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -255,26 +255,26 @@ qc.extu x15, x12, 20, 20
# CHECK-PLUS: :[[@LINE+2]]:13: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.ext x27, 6, 31, 1
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{19: error: too few operands for instruction|1: error: invalid instruction}}
qc.ext x27, x6, 31
# CHECK-PLUS: :[[@LINE+2]]:8: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:8: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.ext x0, x6, 31, 1
# CHECK-PLUS: :[[@LINE+2]]:13: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.ext x27, x0, 31, 1
# CHECK-PLUS: :[[@LINE+2]]:17: error: immediate must be an integer in the range [1, 32]
-# CHECK-MINUS: :[[@LINE+1]]:17: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.ext x27, x6, 0, 1
# CHECK-PLUS: :[[@LINE+2]]:21: error: immediate must be an integer in the range [0, 31]
-# CHECK-MINUS: :[[@LINE+1]]:21: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.ext x27, x6, 31, 41
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -282,22 +282,22 @@ qc.ext x27, x6, 31, 1
# CHECK-PLUS: :[[@LINE+2]]:14: error: register must be a GPR excluding t6 (x31)
-# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdu x1, 8, 8, 8
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{19: error: too few operands for instruction|1: error: invalid instruction}}
qc.extdu x1, x8, 8
# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdu x0, x8, 8, 8
# CHECK-PLUS: :[[@LINE+2]]:18: error: immediate must be an integer in the range [1, 32]
-# CHECK-MINUS: :[[@LINE+1]]:18: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdu x1, x8, 48, 8
# CHECK-PLUS: :[[@LINE+2]]:21: error: immediate must be an integer in the range [0, 31]
-# CHECK-MINUS: :[[@LINE+1]]:21: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdu x1, x8, 8, 78
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -305,22 +305,22 @@ qc.extdu x1, x8, 8, 8
# CHECK-PLUS: :[[@LINE+2]]:14: error: register must be a GPR excluding t6 (x31)
-# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extd x13, 21, 10, 15
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{21: error: too few operands for instruction|1: error: invalid instruction}}
qc.extd x13, x21, 10
# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extd x0, x21, 10, 15
# CHECK-PLUS: :[[@LINE+2]]:19: error: immediate must be an integer in the range [1, 32]
-# CHECK-MINUS: :[[@LINE+1]]:19: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extd x13, x21, 60, 15
# CHECK-PLUS: :[[@LINE+2]]:23: error: immediate must be an integer in the range [0, 31]
-# CHECK-MINUS: :[[@LINE+1]]:23: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extd x13, x21, 10, 85
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -328,18 +328,18 @@ qc.extd x13, x21, 10, 15
# CHECK-PLUS: :[[@LINE+2]]:20: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbr x10, x19, 5
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|1: error: invalid instruction}}
qc.insbr x10, x20
# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbr x0, x19, x5
# CHECK-PLUS: :[[@LINE+2]]:20: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbr x10, x19, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -347,18 +347,18 @@ qc.insbr x10, x19, x5
# CHECK-PLUS: :[[@LINE+2]]:20: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbhr x15, x4, 6
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|1: error: invalid instruction}}
qc.insbhr x15, x4
# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbhr x0, x4, x6
# CHECK-PLUS: :[[@LINE+2]]:20: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbhr x15, x4, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -366,18 +366,18 @@ qc.insbhr x15, x4, x6
# CHECK-PLUS: :[[@LINE+2]]:20: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbpr x21, x8, 9
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|1: error: invalid instruction}}
qc.insbpr x21, x8
# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbpr x0, x8, x9
# CHECK-PLUS: :[[@LINE+2]]:20: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbpr x21, x8, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -385,18 +385,18 @@ qc.insbpr x21, x8, x9
# CHECK-PLUS: :[[@LINE+2]]:20: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbprh x2, x3, 11
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|1: error: invalid instruction}}
qc.insbprh x2, x3
# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbprh x0, x3, x11
# CHECK-PLUS: :[[@LINE+2]]:20: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.insbprh x2, x3, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -404,22 +404,22 @@ qc.insbprh x2, x3, x11
# CHECK-PLUS: :[[@LINE+2]]:20: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdur x9, x19, 29
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|1: error: invalid instruction}}
qc.extdur x9, x19
# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdur x0, x19, x29
# CHECK-PLUS: :[[@LINE+2]]:15: error: register must be a GPR excluding t6 (x31)
-# CHECK-MINUS: :[[@LINE+1]]:15: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdur x9, x31, x29
# CHECK-PLUS: :[[@LINE+2]]:20: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdur x9, x19, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -427,22 +427,22 @@ qc.extdur x9, x19, x29
# CHECK-PLUS: :[[@LINE+2]]:20: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdr x12, x29, 30
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|1: error: invalid instruction}}
qc.extdr x12, x29
# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdr x0, x29, x30
# CHECK-PLUS: :[[@LINE+2]]:15: error: register must be a GPR excluding t6 (x31)
-# CHECK-MINUS: :[[@LINE+1]]:15: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdr x12, x31, x30
# CHECK-PLUS: :[[@LINE+2]]:20: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdr x12, x29, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -450,22 +450,22 @@ qc.extdr x12, x29, x30
# CHECK-PLUS: :[[@LINE+2]]:22: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:22: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdupr x13, x23, 3
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{20: error: too few operands for instruction|1: error: invalid instruction}}
qc.extdupr x13, x23
# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdupr x0, x23, x3
# CHECK-PLUS: :[[@LINE+2]]:17: error: register must be a GPR excluding t6 (x31)
-# CHECK-MINUS: :[[@LINE+1]]:17: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdupr x13, x31, x3
# CHECK-PLUS: :[[@LINE+2]]:22: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:22: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdupr x13, x23, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -473,22 +473,22 @@ qc.extdupr x13, x23, x3
# CHECK-PLUS: :[[@LINE+2]]:22: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:22: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extduprh x18, x8, 9
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{20: error: too few operands for instruction|1: error: invalid instruction}}
qc.extduprh x18, x8
# CHECK-PLUS: :[[@LINE+2]]:13: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extduprh x0, x8, x9
# CHECK-PLUS: :[[@LINE+2]]:18: error: register must be a GPR excluding t6 (x31)
-# CHECK-MINUS: :[[@LINE+1]]:18: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extduprh x18, x31, x9
# CHECK-PLUS: :[[@LINE+2]]:22: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:22: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extduprh x18, x8, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -496,22 +496,22 @@ qc.extduprh x18, x8, x9
# CHECK-PLUS: :[[@LINE+2]]:19: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:19: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdpr x1, x4, 15
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{17: error: too few operands for instruction|1: error: invalid instruction}}
qc.extdpr x1, x4
# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdpr x0, x4, x15
# CHECK-PLUS: :[[@LINE+2]]:15: error: register must be a GPR excluding t6 (x31)
-# CHECK-MINUS: :[[@LINE+1]]:15: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdpr x1, x31, x15
# CHECK-PLUS: :[[@LINE+2]]:19: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:19: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdpr x1, x4, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -519,22 +519,22 @@ qc.extdpr x1, x4, x15
# CHECK-PLUS: :[[@LINE+2]]:21: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:21: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdprh x6, x24, 25
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{19: error: too few operands for instruction|1: error: invalid instruction}}
qc.extdprh x6, x24
# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdprh x0, x24, x25
# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding t6 (x31)
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdprh x6, x31, x25
# CHECK-PLUS: :[[@LINE+2]]:21: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:21: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.extdprh x6, x24, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -542,14 +542,14 @@ qc.extdprh x6, x24, x25
# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR from x8 to x15
-# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.c.bexti x1, 8
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{15: error: too few operands for instruction|1: error: invalid instruction}}
qc.c.bexti x15
# CHECK-PLUS: :[[@LINE+2]]:17: error: immediate must be an integer in the range [1, 31]
-# CHECK-MINUS: :[[@LINE+1]]:17: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.c.bexti x15, 43
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -557,14 +557,14 @@ qc.c.bexti x9, 8
# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR from x8 to x15
-# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.c.bseti x2, 10
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{15: error: too few operands for instruction|1: error: invalid instruction}}
qc.c.bseti x12
# CHECK-PLUS: :[[@LINE+2]]:17: error: immediate must be an integer in the range [1, 31]
-# CHECK-MINUS: :[[@LINE+1]]:17: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.c.bseti x12, -10
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
@@ -572,14 +572,14 @@ qc.c.bseti x12, 30
# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.c.extu x0, 10
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{13: error: too few operands for instruction|1: error: invalid instruction}}
qc.c.extu x5
# CHECK-PLUS: :[[@LINE+2]]:16: error: immediate must be an integer in the range [6, 32]
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.c.extu x17, 3
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcibm' (Qualcomm uC Bit Manipulation Extension)
diff --git a/llvm/test/MC/RISCV/xqcicli-invalid.s b/llvm/test/MC/RISCV/xqcicli-invalid.s
index ff3309cb0555e..715cf1bee1238 100644
--- a/llvm/test/MC/RISCV/xqcicli-invalid.s
+++ b/llvm/test/MC/RISCV/xqcicli-invalid.s
@@ -5,18 +5,18 @@
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-MINUS %s
# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lieq x0, x4, x6, 10
# CHECK-PLUS: :[[@LINE+2]]:13: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lieq x2, x0, x6, 10
# CHECK-PLUS: :[[@LINE+2]]:17: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:17: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lieq x2, x4, x0, 10
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{19: error: too few operands for instruction|1: error: invalid instruction}}
qc.lieq x2, x4, x6
# CHECK-PLUS: :[[@LINE+1]]:21: error: immediate must be an integer in the range [-16, 15]
@@ -27,18 +27,18 @@ qc.lieq x2, x4, x6, 10
# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lige x0, x8, x20, 2
# CHECK-PLUS: :[[@LINE+2]]:13: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lige x4, x0, x20, 2
# CHECK-PLUS: :[[@LINE+2]]:17: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:17: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lige x4, x8, x0, 2
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{20: error: too few operands for instruction|1: error: invalid instruction}}
qc.lige x4, x8, x20
# CHECK-PLUS: :[[@LINE+1]]:22: error: immediate must be an integer in the range [-16, 15]
@@ -49,18 +49,18 @@ qc.lige x4, x8, x20, 2
# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lilt x0, x9, x10, 3
# CHECK-PLUS: :[[@LINE+2]]:14: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lilt x19, x0, x10, 3
# CHECK-PLUS: :[[@LINE+2]]:18: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:18: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lilt x19, x9, x0, 3
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{21: error: too few operands for instruction|1: error: invalid instruction}}
qc.lilt x19, x9, x10
# CHECK-PLUS: :[[@LINE+1]]:23: error: immediate must be an integer in the range [-16, 15]
@@ -71,18 +71,18 @@ qc.lilt x19, x9, x10, 3
# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.line x0, x14, x6, 10
# CHECK-PLUS: :[[@LINE+2]]:14: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.line x18, x0, x6, 10
# CHECK-PLUS: :[[@LINE+2]]:19: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:19: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.line x18, x14, x0, 10
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{21: error: too few operands for instruction|1: error: invalid instruction}}
qc.line x18, x14, x6
# CHECK-PLUS: :[[@LINE+1]]:23: error: immediate must be an integer in the range [-16, 15]
@@ -93,18 +93,18 @@ qc.line x18, x14, x6, 10
# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.ligeu x0, x4, x6, 10
# CHECK-PLUS: :[[@LINE+2]]:14: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.ligeu x2, x0, x6, 10
# CHECK-PLUS: :[[@LINE+2]]:18: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:18: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.ligeu x2, x4, x0, 10
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{20: error: too few operands for instruction|1: error: invalid instruction}}
qc.ligeu x2, x4, x6
# CHECK-PLUS: :[[@LINE+1]]:22: error: immediate must be an integer in the range [-16, 15]
@@ -115,18 +115,18 @@ qc.ligeu x2, x4, x6, 10
# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.liltu x0, x19, x12, 13
# CHECK-PLUS: :[[@LINE+2]]:14: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.liltu x1, x0, x12, 13
# CHECK-PLUS: :[[@LINE+2]]:19: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:19: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.liltu x1, x19, x0, 13
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{22: error: too few operands for instruction|1: error: invalid instruction}}
qc.liltu x1, x19, x12
# CHECK-PLUS: :[[@LINE+1]]:24: error: immediate must be an integer in the range [-16, 15]
@@ -137,14 +137,14 @@ qc.liltu x1, x19, x12, 13
# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lieqi x0, x1, 15, 12
# CHECK-PLUS: :[[@LINE+2]]:14: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lieqi x7, x0, 15, 12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{20: error: too few operands for instruction|1: error: invalid instruction}}
qc.lieqi x7, x1, 15
# CHECK-PLUS: :[[@LINE+1]]:18: error: immediate must be an integer in the range [-16, 15]
@@ -158,14 +158,14 @@ qc.lieqi x7, x1, 15, 12
# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.ligei x0, x11, -4, 9
# CHECK-PLUS: :[[@LINE+2]]:15: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:15: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.ligei x17, x0, -4, 9
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{22: error: too few operands for instruction|1: error: invalid instruction}}
qc.ligei x17, x11, -4
# CHECK-PLUS: :[[@LINE+1]]:20: error: immediate must be an integer in the range [-16, 15]
@@ -179,14 +179,14 @@ qc.ligei x17, x11, -4, 9
# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lilti x0, x11, -14, 2
# CHECK-PLUS: :[[@LINE+2]]:14: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lilti x9, x0, -14, 2
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{22: error: too few operands for instruction|1: error: invalid instruction}}
qc.lilti x9, x11, -14
# CHECK-PLUS: :[[@LINE+1]]:19: error: immediate must be an integer in the range [-16, 15]
@@ -200,14 +200,14 @@ qc.lilti x9, x11, -14, 2
# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.linei x0, x1, 10, 12
# CHECK-PLUS: :[[@LINE+2]]:14: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.linei x5, x0, 10, 12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{20: error: too few operands for instruction|1: error: invalid instruction}}
qc.linei x5, x1, 10
# CHECK-PLUS: :[[@LINE+1]]:18: error: immediate must be an integer in the range [-16, 15]
@@ -221,14 +221,14 @@ qc.linei x5, x1, 10, 12
# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.ligeui x0, x12, 7, -12
# CHECK-PLUS: :[[@LINE+2]]:15: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:15: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.ligeui x2, x0, 7, -12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{21: error: too few operands for instruction|1: error: invalid instruction}}
qc.ligeui x2, x12, 7
# CHECK-PLUS: :[[@LINE+1]]:20: error: immediate must be an integer in the range [0, 31]
@@ -242,14 +242,14 @@ qc.ligeui x2, x12, 7, -12
# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.liltui x0, x25, 31, 12
# CHECK-PLUS: :[[@LINE+2]]:15: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:15: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.liltui x3, x0, 31, 12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{22: error: too few operands for instruction|1: error: invalid instruction}}
qc.liltui x3, x25, 31
# CHECK-PLUS: :[[@LINE+1]]:20: error: immediate must be an integer in the range [0, 31]
diff --git a/llvm/test/MC/RISCV/xqcicm-invalid.s b/llvm/test/MC/RISCV/xqcicm-invalid.s
index aaf4c8adebcf9..48f33a64b688f 100644
--- a/llvm/test/MC/RISCV/xqcicm-invalid.s
+++ b/llvm/test/MC/RISCV/xqcicm-invalid.s
@@ -8,7 +8,7 @@
# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
qc.c.mveqz 9, x10
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{14: error: too few operands for instruction|1: error: invalid instruction}}
qc.c.mveqz x9
# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcicm' (Qualcomm uC Conditional Move Extension)
@@ -19,7 +19,7 @@ qc.c.mveqz x9, x10
# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
qc.mveq 9, x10, x11, x12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{11: error: too few operands for instruction|1: error: invalid instruction}}
qc.mveq x9
# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcicm' (Qualcomm uC Conditional Move Extension)
@@ -30,7 +30,7 @@ qc.mveq x9, x10, x11, x12
# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
qc.mvge 9, x10, x11, x12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{11: error: too few operands for instruction|1: error: invalid instruction}}
qc.mvge x9
# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcicm' (Qualcomm uC Conditional Move Extension)
@@ -41,7 +41,7 @@ qc.mvge x9, x10, x11, x12
# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
qc.mvgeu 9, x10, x11, x12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{12: error: too few operands for instruction|1: error: invalid instruction}}
qc.mvgeu x9
# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcicm' (Qualcomm uC Conditional Move Extension)
@@ -52,7 +52,7 @@ qc.mvgeu x9, x10, x11, x12
# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
qc.mvlt 9, x10, x11, x12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{11: error: too few operands for instruction|1: error: invalid instruction}}
qc.mvlt x9
# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcicm' (Qualcomm uC Conditional Move Extension)
@@ -63,7 +63,7 @@ qc.mvlt x9, x10, x11, x12
# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
qc.mvltu 9, x10, x11, x12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{12: error: too few operands for instruction|1: error: invalid instruction}}
qc.mvltu x9
# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcicm' (Qualcomm uC Conditional Move Extension)
@@ -74,7 +74,7 @@ qc.mvltu x9, x10, x11, x12
# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
qc.mvne 9, x10, x11, x12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{11: error: too few operands for instruction|1: error: invalid instruction}}
qc.mvne x9
# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcicm' (Qualcomm uC Conditional Move Extension)
@@ -85,7 +85,7 @@ qc.mvne x9, x10, x11, x12
# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
qc.mveqi 9, x10, 5, x12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{12: error: too few operands for instruction|1: error: invalid instruction}}
qc.mveqi x9
# CHECK-IMM: :[[@LINE+1]]:19: error: immediate must be an integer in the range [-16, 15]
@@ -99,7 +99,7 @@ qc.mveqi x9, x10, 5, x12
# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
qc.mvgei 9, x10, 5, x12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{12: error: too few operands for instruction|1: error: invalid instruction}}
qc.mvgei x9
# CHECK-IMM: :[[@LINE+1]]:19: error: immediate must be an integer in the range [-16, 15]
@@ -113,7 +113,7 @@ qc.mvgei x9, x10, 5, x12
# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
qc.mvlti 9, x10, 5, x12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{12: error: too few operands for instruction|1: error: invalid instruction}}
qc.mvlti x9
# CHECK-IMM: :[[@LINE+1]]:19: error: immediate must be an integer in the range [-16, 15]
@@ -127,7 +127,7 @@ qc.mvlti x9, x10, 5, x12
# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
qc.mvnei 9, x10, 5, x12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{12: error: too few operands for instruction|1: error: invalid instruction}}
qc.mvnei x9
# CHECK-IMM: :[[@LINE+1]]:19: error: immediate must be an integer in the range [-16, 15]
@@ -141,7 +141,7 @@ qc.mvnei x9, x10, 5, x12
# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
qc.mvltui 9, x10, 5, x12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{13: error: too few operands for instruction|1: error: invalid instruction}}
qc.mvltui x9
# CHECK-IMM: :[[@LINE+1]]:20: error: immediate must be an integer in the range [0, 31]
@@ -155,7 +155,7 @@ qc.mvltui x9, x10, 5, x12
# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
qc.mvgeui 9, x10, 5, x12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{13: error: too few operands for instruction|1: error: invalid instruction}}
qc.mvgeui x9
# CHECK-IMM: :[[@LINE+1]]:20: error: immediate must be an integer in the range [0, 31]
diff --git a/llvm/test/MC/RISCV/xqcics-invalid.s b/llvm/test/MC/RISCV/xqcics-invalid.s
index 6d3a41a7fedc9..7577db56f9ee5 100644
--- a/llvm/test/MC/RISCV/xqcics-invalid.s
+++ b/llvm/test/MC/RISCV/xqcics-invalid.s
@@ -8,7 +8,7 @@
# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
qc.selecteqi 9, 15, x4, x3
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{24: error: too few operands for instruction|1: error: invalid instruction}}
qc.selecteqi x9, 15, x4
# CHECK-IMM: :[[@LINE+1]]:18: error: immediate must be an integer in the range [-16, 15]
@@ -22,7 +22,7 @@ qc.selecteqi x9, 15, x4, x3
# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
qc.selectieq 8, x4, x3, 12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{24: error: too few operands for instruction|1: error: invalid instruction}}
qc.selectieq x8, x4, x3
# CHECK-IMM: :[[@LINE+1]]:26: error: immediate must be an integer in the range [-16, 15]
@@ -36,7 +36,7 @@ qc.selectieq x8, x4, x3, 12
# CHECK-MINUS: :[[@LINE+1]]:15: error: invalid operand for instruction
qc.selectieqi 9, 11, x3, 12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{25: error: too few operands for instruction|1: error: invalid instruction}}
qc.selectieqi x9, 11, x3
# CHECK-IMM: :[[@LINE+1]]:19: error: immediate must be an integer in the range [-16, 15]
@@ -53,7 +53,7 @@ qc.selectieqi x9, 11, x3, 12
# CHECK-MINUS: :[[@LINE+1]]:15: error: invalid operand for instruction
qc.selectiieq 9, x3, 11, 12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{25: error: too few operands for instruction|1: error: invalid instruction}}
qc.selectiieq x9, x3, 11
# CHECK-IMM: :[[@LINE+1]]:23: error: immediate must be an integer in the range [-16, 15]
@@ -70,7 +70,7 @@ qc.selectiieq x9, x3, 11, 12
# CHECK-MINUS: :[[@LINE+1]]:15: error: invalid operand for instruction
qc.selectiine 8, x3, 10, 11
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{25: error: too few operands for instruction|1: error: invalid instruction}}
qc.selectiine x8, x3, 10
# CHECK-IMM: :[[@LINE+1]]:23: error: immediate must be an integer in the range [-16, 15]
@@ -87,7 +87,7 @@ qc.selectiine x8, x3, 10, 11
# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
qc.selectine 8, x3, x4, 11
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{24: error: too few operands for instruction|1: error: invalid instruction}}
qc.selectine x8, x3, x4
# CHECK-IMM: :[[@LINE+1]]:26: error: immediate must be an integer in the range [-16, 15]
@@ -101,7 +101,7 @@ qc.selectine x8, x3, x4, 11
# CHECK-MINUS: :[[@LINE+1]]:15: error: invalid operand for instruction
qc.selectinei 8, 11, x3, 12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{25: error: too few operands for instruction|1: error: invalid instruction}}
qc.selectinei x8, 11, x3
# CHECK-IMM: :[[@LINE+1]]:19: error: immediate must be an integer in the range [-16, 15]
@@ -118,7 +118,7 @@ qc.selectinei x8, 11, x3, 12
# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
qc.selectnei 8, 11, x3, x5
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{24: error: too few operands for instruction|1: error: invalid instruction}}
qc.selectnei x8, 11, x3
# CHECK-IMM: :[[@LINE+1]]:18: error: immediate must be an integer in the range [-16, 15]
diff --git a/llvm/test/MC/RISCV/xqcicsr-invalid.s b/llvm/test/MC/RISCV/xqcicsr-invalid.s
index 986aad5fae756..8c7d4f8cea5fe 100644
--- a/llvm/test/MC/RISCV/xqcicsr-invalid.s
+++ b/llvm/test/MC/RISCV/xqcicsr-invalid.s
@@ -5,10 +5,10 @@
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-MINUS %s
# CHECK-PLUS: :[[@LINE+2]]:20: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.csrrwr x10, x5, x0
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|1: error: invalid instruction}}
qc.csrrwr x10, x5
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcicsr' (Qualcomm uC CSR Extension)
@@ -16,13 +16,13 @@ qc.csrrwr x10, x5, x20
# CHECK-PLUS: :[[@LINE+2]]:21: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:21: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.csrrwri x20, 31, x0
# CHECK-PLUS: :[[@LINE+1]]:17: error: immediate must be an integer in the range [0, 31]
qc.csrrwri x20, 45, x12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{19: error: too few operands for instruction|1: error: invalid instruction}}
qc.csrrwri x20, 23
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcicsr' (Qualcomm uC CSR Extension)
diff --git a/llvm/test/MC/RISCV/xqciint-invalid.s b/llvm/test/MC/RISCV/xqciint-invalid.s
index 8aeeec3e85214..34a45d4af3c96 100644
--- a/llvm/test/MC/RISCV/xqciint-invalid.s
+++ b/llvm/test/MC/RISCV/xqciint-invalid.s
@@ -5,13 +5,13 @@
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-MINUS %s
# CHECK-PLUS: :[[@LINE+2]]:12: error: immediate must be an integer in the range [0, 1023]
-# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.setinti 1025
-# CHECK: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{16: error: too many operands for instruction|1: error: invalid instruction}}
qc.setinti 11, 12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.setinti
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
@@ -21,10 +21,10 @@ qc.setinti 10
# CHECK-PLUS: :[[@LINE+1]]:12: error: immediate must be an integer in the range [0, 1023]
qc.clrinti 2000
-# CHECK: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{16: error: too many operands for instruction|1: error: invalid instruction}}
qc.clrinti 22, x4
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.clrinti
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
@@ -32,17 +32,17 @@ qc.clrinti 8
# CHECK-PLUS: :[[@LINE+2]]:13: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.c.clrint 22
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.c.clrint
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
qc.c.clrint x8
-# CHECK: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{9: error: too many operands for instruction|1: error: invalid instruction}}
qc.c.di 22
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
@@ -50,17 +50,17 @@ qc.c.di
# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.c.dir 22
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.c.dir
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
qc.c.dir x8
-# CHECK: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{9: error: too many operands for instruction|1: error: invalid instruction}}
qc.c.ei 22
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
@@ -68,31 +68,31 @@ qc.c.ei
# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.c.eir 22
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.c.eir
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
qc.c.eir x8
-# CHECK: :[[@LINE+1]]:19: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{19: error: too many operands for instruction|1: error: invalid instruction}}
qc.c.mienter.nest 22
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
qc.c.mienter.nest
-# CHECK: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{14: error: too many operands for instruction|1: error: invalid instruction}}
qc.c.mienter 22
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
qc.c.mienter
-# CHECK: :[[@LINE+1]]:17: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{17: error: too many operands for instruction|1: error: invalid instruction}}
qc.c.mileaveret 22
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
@@ -100,24 +100,24 @@ qc.c.mileaveret
# CHECK-PLUS: :[[@LINE+2]]:13: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.c.setint 22
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.c.setint
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
qc.c.setint x8
-# CHECK: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{11: error: too many operands for instruction|1: error: invalid instruction}}
qc.c.mret x8
# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
qc.c.mret
-# CHECK: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{12: error: too many operands for instruction|1: error: invalid instruction}}
qc.c.mnret 10
# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
diff --git a/llvm/test/MC/RISCV/xqciio-invalid.s b/llvm/test/MC/RISCV/xqciio-invalid.s
index 55f60e44a07ed..0913175c917cb 100644
--- a/llvm/test/MC/RISCV/xqciio-invalid.s
+++ b/llvm/test/MC/RISCV/xqciio-invalid.s
@@ -7,10 +7,10 @@
# CHECK: :[[@LINE+1]]:18: error: expected register
qc.outw x5, 2048(10)
-# CHECK-PLUS: :[[@LINE+1]]:13: error: immediate must be a multiple of 4 bytes in the range [0, 16380]
+# CHECK-PLUS: :[[@LINE+1]]:1: error: invalid instruction
qc.outw x5, x10
-# CHECK-MINUS: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.outw x5, x10
# CHECK-PLUS: :[[@LINE+1]]:13: error: immediate must be a multiple of 4 bytes in the range [0, 16380]
@@ -23,14 +23,14 @@ qc.outw x5, 2048(x10)
# CHECK: :[[@LINE+1]]:19: error: expected register
qc.inw x23, 16380(17)
-# CHECK-PLUS: :[[@LINE+1]]:13: error: immediate must be a multiple of 4 bytes in the range [0, 16380]
+# CHECK-PLUS: :[[@LINE+1]]:1: error: invalid instruction
qc.inw x23, x17
-# CHECK-MINUS: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.inw x23, x17
# CHECK-PLUS: :[[@LINE+2]]:8: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:8: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.inw x0, 16380(x17)
# CHECK-PLUS: :[[@LINE+1]]:13: error: immediate must be a multiple of 4 bytes in the range [0, 16380]
diff --git a/llvm/test/MC/RISCV/xqcilb-invalid.s b/llvm/test/MC/RISCV/xqcilb-invalid.s
index b7428e679f5bd..d2f102b2b07ba 100644
--- a/llvm/test/MC/RISCV/xqcilb-invalid.s
+++ b/llvm/test/MC/RISCV/xqcilb-invalid.s
@@ -4,7 +4,7 @@
# RUN: not llvm-mc -triple riscv32 -mattr=-xqcilb < %s 2>&1 \
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-MINUS %s
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.e.j
# CHECK-PLUS: :[[@LINE+1]]:9: error: operand must be a multiple of 2 bytes in the range [-2147483648, 2147483646]
@@ -16,7 +16,7 @@ qc.e.j -2147483648
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcilb' (Qualcomm uC Long Branch Extension)
qc.e.j foo
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.e.jal
# CHECK-PLUS: :[[@LINE+1]]:10: error: operand must be a multiple of 2 bytes in the range [-2147483648, 2147483646]
diff --git a/llvm/test/MC/RISCV/xqcili-invalid.s b/llvm/test/MC/RISCV/xqcili-invalid.s
index d4ad16398ed5a..b81701a4fc96c 100644
--- a/llvm/test/MC/RISCV/xqcili-invalid.s
+++ b/llvm/test/MC/RISCV/xqcili-invalid.s
@@ -5,13 +5,15 @@
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-MINUS,CHECK-EXT %s
# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.e.li 9, 33554432
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{11: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.li x9
-# CHECK-IMM: :[[@LINE+1]]:13: error: immediate must be an integer in the range [-2147483648, 4294967295]
+# CHECK-IMM: :[[@LINE+3]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-IMM: :[[@LINE+2]]:13: note: immediate must be an integer in the range [-2147483648, 4294967295]
+# CHECK-IMM: :[[@LINE+1]]:13: note: immediate must be an integer in the range [-2147483648, 4294967295]
qc.e.li x9, 4294967296
# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcili' (Qualcomm uC Load Large Immediate Extension)
@@ -19,10 +21,10 @@ qc.e.li x9, 4294967295
# CHECK-PLUS: :[[@LINE+2]]:7: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:7: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.li x0, 114514
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{10: error: too few operands for instruction|1: error: invalid instruction}}
qc.li x10
# CHECK-IMM: :[[@LINE+1]]:12: error: operand must be a symbol with a %qc.abs20 specifier or an integer in the range [-524288, 524287]
diff --git a/llvm/test/MC/RISCV/xqcilia-invalid.s b/llvm/test/MC/RISCV/xqcilia-invalid.s
index 517eb5ea48224..9c81f84e39743 100644
--- a/llvm/test/MC/RISCV/xqcilia-invalid.s
+++ b/llvm/test/MC/RISCV/xqcilia-invalid.s
@@ -5,10 +5,10 @@
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-MINUS,CHECK-EXT %s
# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.e.addai 9, 33554432
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{14: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.addai x9
# CHECK-IMM: :[[@LINE+1]]:16: error: immediate must be an integer in the range [-2147483648, 4294967295]
@@ -19,10 +19,10 @@ qc.e.addai x9, 33554432
# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.e.addi x10, 9, 554432
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.addi x10, x9
# CHECK-IMM: :[[@LINE+1]]:20: error: immediate must be an integer in the range [-33554432, 33554431]
@@ -33,10 +33,10 @@ qc.e.addi x10, x9, 554432
# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.e.andai 9, 33554432
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{14: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.andai x9
# CHECK-IMM: :[[@LINE+1]]:16: error: immediate must be an integer in the range [-2147483648, 4294967295]
@@ -47,10 +47,10 @@ qc.e.andai x9, 33554432
# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.e.andi x10, 9, 554432
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.andi x10, x9
# CHECK-IMM: :[[@LINE+1]]:20: error: immediate must be an integer in the range [-33554432, 33554431]
@@ -61,10 +61,10 @@ qc.e.andi x10, x9, 554432
# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.e.orai 9, 33554432
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{13: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.orai x9
# CHECK-IMM: :[[@LINE+1]]:15: error: immediate must be an integer in the range [-2147483648, 4294967295]
@@ -75,10 +75,10 @@ qc.e.orai x9, 33554432
# CHECK-PLUS: :[[@LINE+2]]:15: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:15: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.e.ori x10, 9, 554432
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{17: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.ori x10, x9
# CHECK-IMM: :[[@LINE+1]]:19: error: immediate must be an integer in the range [-33554432, 33554431]
@@ -90,10 +90,10 @@ qc.e.ori x10, x9, 554432
# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.e.xorai 9, 33554432
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{14: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.xorai x9
# CHECK-IMM: :[[@LINE+1]]:16: error: immediate must be an integer in the range [-2147483648, 4294967295]
@@ -104,10 +104,10 @@ qc.e.xorai x9, 33554432
# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.e.xori x10, 9, 554432
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.xori x10, x9
# CHECK-IMM: :[[@LINE+1]]:20: error: immediate must be an integer in the range [-33554432, 33554431]
diff --git a/llvm/test/MC/RISCV/xqcilo-invalid.s b/llvm/test/MC/RISCV/xqcilo-invalid.s
index c40af77383dbe..4ec961149669c 100644
--- a/llvm/test/MC/RISCV/xqcilo-invalid.s
+++ b/llvm/test/MC/RISCV/xqcilo-invalid.s
@@ -4,10 +4,10 @@
# RUN: not llvm-mc -triple riscv32 -mattr=-xqcilo < %s 2>&1 \
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-EXT %s
-# CHECK: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{9: error: invalid operand for instruction|1: error: invalid instruction}}
qc.e.lb 11, 12(x10)
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{12: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.lb x11
# CHECK-IMM: :[[@LINE+1]]:14: error: immediate must be an integer in the range [-33554432, 33554431]
@@ -17,10 +17,10 @@ qc.e.lb x11, 33445562212(x10)
qc.e.lb x11, 12(x10)
-# CHECK: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{10: error: invalid operand for instruction|1: error: invalid instruction}}
qc.e.lbu 11, 12(x10)
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{13: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.lbu x11
# CHECK-IMM: :[[@LINE+1]]:15: error: immediate must be an integer in the range [-33554432, 33554431]
@@ -30,10 +30,10 @@ qc.e.lbu x11, 33445562212(x10)
qc.e.lbu x11, 12(x10)
-# CHECK: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{9: error: invalid operand for instruction|1: error: invalid instruction}}
qc.e.lh 11, 12(x10)
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{12: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.lh x11
# CHECK-IMM: :[[@LINE+1]]:14: error: immediate must be an integer in the range [-33554432, 33554431]
@@ -43,10 +43,10 @@ qc.e.lh x11, 33445562212(x10)
qc.e.lh x11, 12(x10)
-# CHECK: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{10: error: invalid operand for instruction|1: error: invalid instruction}}
qc.e.lhu 11, 12(x10)
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{13: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.lhu x11
# CHECK-IMM: :[[@LINE+1]]:15: error: immediate must be an integer in the range [-33554432, 33554431]
@@ -56,10 +56,10 @@ qc.e.lhu x11, 33445562212(x10)
qc.e.lhu x11, 12(x10)
-# CHECK: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{9: error: invalid operand for instruction|1: error: invalid instruction}}
qc.e.lw 11, 12(x10)
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{12: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.lw x11
# CHECK-IMM: :[[@LINE+1]]:14: error: immediate must be an integer in the range [-33554432, 33554431]
@@ -69,10 +69,10 @@ qc.e.lw x11, 33445562212(x10)
qc.e.lw x11, 12(x10)
-# CHECK: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{9: error: invalid operand for instruction|1: error: invalid instruction}}
qc.e.sb 11, 12(x10)
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{12: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.sb x11
# CHECK-IMM: :[[@LINE+1]]:14: error: immediate must be an integer in the range [-33554432, 33554431]
@@ -82,10 +82,10 @@ qc.e.sb x11, 33445562212(x10)
qc.e.sb x11, 12(x10)
-# CHECK: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{9: error: invalid operand for instruction|1: error: invalid instruction}}
qc.e.sh 11, 12(x10)
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{12: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.sh x11
# CHECK-IMM: :[[@LINE+1]]:14: error: immediate must be an integer in the range [-33554432, 33554431]
@@ -95,10 +95,10 @@ qc.e.sh x11, 33445562212(x10)
qc.e.sh x11, 12(x10)
-# CHECK: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{9: error: invalid operand for instruction|1: error: invalid instruction}}
qc.e.sw 11, 12(x10)
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{12: error: too few operands for instruction|1: error: invalid instruction}}
qc.e.sw x11
# CHECK-IMM: :[[@LINE+1]]:14: error: immediate must be an integer in the range [-33554432, 33554431]
diff --git a/llvm/test/MC/RISCV/xqcilo-pseudos-invalid.s b/llvm/test/MC/RISCV/xqcilo-pseudos-invalid.s
index d3f0ee5db90bc..16c862b46172a 100644
--- a/llvm/test/MC/RISCV/xqcilo-pseudos-invalid.s
+++ b/llvm/test/MC/RISCV/xqcilo-pseudos-invalid.s
@@ -4,40 +4,52 @@
# RUN: not llvm-mc %s -triple=riscv32 -mattr=-xqcilo \
# RUN: 2>&1 | FileCheck -check-prefixes=CHECK-DISABLED %s
-# CHECK-ENABLED: [[@LINE+2]]:1: error: too few operands for instruction
-# CHECK-DISABLED: [[@LINE+1]]:1: error: too few operands for instruction
+# CHECK-ENABLED: [[@LINE+4]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-ENABLED: [[@LINE+3]]:13: note: operand must be a bare symbol name
+# CHECK-ENABLED: [[@LINE+2]]:19: note: too few operands for instruction
+# CHECK-DISABLED: [[@LINE+1]]:1: error: invalid instruction
qc.e.lb a0, 0xf000
-# CHECK-ENABLED: [[@LINE+2]]:1: error: too few operands for instruction
-# CHECK-DISABLED: [[@LINE+1]]:1: error: too few operands for instruction
+# CHECK-ENABLED: [[@LINE+4]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-ENABLED: [[@LINE+3]]:13: note: operand must be a bare symbol name
+# CHECK-ENABLED: [[@LINE+2]]:19: note: too few operands for instruction
+# CHECK-DISABLED: [[@LINE+1]]:1: error: invalid instruction
qc.e.lb a0, 0xf000
-# CHECK-ENABLED: [[@LINE+2]]:1: error: too few operands for instruction
-# CHECK-DISABLED: [[@LINE+1]]:1: error: too few operands for instruction
+# CHECK-ENABLED: [[@LINE+4]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-ENABLED: [[@LINE+3]]:14: note: operand must be a bare symbol name
+# CHECK-ENABLED: [[@LINE+2]]:20: note: too few operands for instruction
+# CHECK-DISABLED: [[@LINE+1]]:1: error: invalid instruction
qc.e.lbu a0, 0xf000
-# CHECK-ENABLED: [[@LINE+2]]:1: error: too few operands for instruction
-# CHECK-DISABLED: [[@LINE+1]]:1: error: too few operands for instruction
+# CHECK-ENABLED: [[@LINE+4]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-ENABLED: [[@LINE+3]]:13: note: operand must be a bare symbol name
+# CHECK-ENABLED: [[@LINE+2]]:19: note: too few operands for instruction
+# CHECK-DISABLED: [[@LINE+1]]:1: error: invalid instruction
qc.e.lh a0, 0xf000
-# CHECK-ENABLED: [[@LINE+2]]:1: error: too few operands for instruction
-# CHECK-DISABLED: [[@LINE+1]]:1: error: too few operands for instruction
+# CHECK-ENABLED: [[@LINE+4]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-ENABLED: [[@LINE+3]]:14: note: operand must be a bare symbol name
+# CHECK-ENABLED: [[@LINE+2]]:20: note: too few operands for instruction
+# CHECK-DISABLED: [[@LINE+1]]:1: error: invalid instruction
qc.e.lhu a0, 0xf000
-# CHECK-ENABLED: [[@LINE+2]]:1: error: too few operands for instruction
-# CHECK-DISABLED: [[@LINE+1]]:1: error: too few operands for instruction
+# CHECK-ENABLED: [[@LINE+4]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-ENABLED: [[@LINE+3]]:13: note: operand must be a bare symbol name
+# CHECK-ENABLED: [[@LINE+2]]:19: note: too few operands for instruction
+# CHECK-DISABLED: [[@LINE+1]]:1: error: invalid instruction
qc.e.lw a0, 0xf000
-# CHECK-ENABLED: [[@LINE+2]]:21: error: invalid operand for instruction
-# CHECK-DISABLED: [[@LINE+1]]:21: error: invalid operand for instruction
+# CHECK-ENABLED: [[@LINE+2]]:13: error: operand must be a bare symbol name
+# CHECK-DISABLED: [[@LINE+1]]:1: error: invalid instruction
qc.e.sb a0, 0xf000, t0
-# CHECK-ENABLED: [[@LINE+2]]:21: error: invalid operand for instruction
-# CHECK-DISABLED: [[@LINE+1]]:21: error: invalid operand for instruction
+# CHECK-ENABLED: [[@LINE+2]]:13: error: operand must be a bare symbol name
+# CHECK-DISABLED: [[@LINE+1]]:1: error: invalid instruction
qc.e.sh a0, 0xf000, t0
-# CHECK-ENABLED: [[@LINE+2]]:21: error: invalid operand for instruction
-# CHECK-DISABLED: [[@LINE+1]]:21: error: invalid operand for instruction
+# CHECK-ENABLED: [[@LINE+2]]:13: error: operand must be a bare symbol name
+# CHECK-DISABLED: [[@LINE+1]]:1: error: invalid instruction
qc.e.sw a0, 0xf000, t0
# CHECK-DISABLED: [[@LINE+1]]:1: error: instruction requires the following: 'Xqcili' (Qualcomm uC Load Large Immediate Extension), 'Xqcilo' (Qualcomm uC Large Offset Load Store Extension)
@@ -57,14 +69,14 @@ qc.e.sh a0, undefined, t0
# CHECK-DISABLED: [[@LINE+1]]:1: error: instruction requires the following: 'Xqcili' (Qualcomm uC Load Large Immediate Extension), 'Xqcilo' (Qualcomm uC Large Offset Load Store Extension)
qc.e.sw a0, undefined, t0
-# CHECK-ENABLED: [[@LINE+2]]:1: error: too few operands for instruction
-# CHECK-DISABLED: [[@LINE+1]]:1: error: too few operands for instruction
+# CHECK-ENABLED: [[@LINE+2]]:22: error: too few operands for instruction
+# CHECK-DISABLED: [[@LINE+1]]:1: error: invalid instruction
qc.e.sb a0, undefined
-# CHECK-ENABLED: [[@LINE+2]]:1: error: too few operands for instruction
-# CHECK-DISABLED: [[@LINE+1]]:1: error: too few operands for instruction
+# CHECK-ENABLED: [[@LINE+2]]:22: error: too few operands for instruction
+# CHECK-DISABLED: [[@LINE+1]]:1: error: invalid instruction
qc.e.sh a0, undefined
-# CHECK-ENABLED: [[@LINE+2]]:1: error: too few operands for instruction
-# CHECK-DISABLED: [[@LINE+1]]:1: error: too few operands for instruction
+# CHECK-ENABLED: [[@LINE+2]]:22: error: too few operands for instruction
+# CHECK-DISABLED: [[@LINE+1]]:1: error: invalid instruction
qc.e.sw a0, undefined
diff --git a/llvm/test/MC/RISCV/xqcilsm-invalid.s b/llvm/test/MC/RISCV/xqcilsm-invalid.s
index 8a8792a9cee35..69d7da411c550 100644
--- a/llvm/test/MC/RISCV/xqcilsm-invalid.s
+++ b/llvm/test/MC/RISCV/xqcilsm-invalid.s
@@ -8,14 +8,14 @@
qc.swm x5, x20, 12(20)
# CHECK-PLUS: :[[@LINE+2]]:8: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:8: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.swm x0, x20, 12(x3)
# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.swm x5, x0, 12(x3)
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{14: error: too few operands for instruction|1: error: invalid instruction}}
qc.swm x5, x3
# CHECK-PLUS: :[[@LINE+1]]:17: error: immediate must be a multiple of 4 bytes in the range [0, 124]
@@ -29,10 +29,10 @@ qc.swm x5, x20, 12(x3)
qc.swmi x10, 4, 20(4)
# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.swmi x0, 4, 20(x4)
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{19: error: too few operands for instruction|1: error: invalid instruction}}
qc.swmi x10, 4, 20
# CHECK-PLUS: :[[@LINE+1]]:14: error: immediate must be an integer in the range [1, 31]
@@ -52,10 +52,10 @@ qc.swmi x10, 4, 20(x4)
qc.setwm x4, x30, 124(2)
# CHECK-PLUS: :[[@LINE+2]]:14: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.setwm x4, x0, 124(x2)
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{22: error: too few operands for instruction|1: error: invalid instruction}}
qc.setwm x4, x30, 124
# CHECK-PLUS: :[[@LINE+1]]:19: error: immediate must be a multiple of 4 bytes in the range [0, 124]
@@ -68,7 +68,7 @@ qc.setwm x4, x30, 124(x2)
# CHECK: :[[@LINE+1]]:22: error: expected register
qc.setwmi x5, 31, 12(12)
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{21: error: too few operands for instruction|1: error: invalid instruction}}
qc.setwmi x5, 31, 12
# CHECK-PLUS: :[[@LINE+1]]:15: error: immediate must be an integer in the range [1, 31]
@@ -87,11 +87,11 @@ qc.setwmi x5, 31, 12(x12)
# CHECK: :[[@LINE+1]]:19: error: expected register
qc.lwm x7, x1, 24(20)
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|1: error: invalid instruction}}
qc.lwm x7, x1, 24
# CHECK-PLUS: :[[@LINE+2]]:8: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:8: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lwm x0, x1, 24(x20)
# CHECK-PLUS: :[[@LINE+1]]:16: error: immediate must be a multiple of 4 bytes in the range [0, 124]
@@ -104,11 +104,11 @@ qc.lwm x7, x1, 24(x20)
# CHECK: :[[@LINE+1]]:19: error: expected register
qc.lwmi x13, 9, 4(23)
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|1: error: invalid instruction}}
qc.lwmi x13, 9, 4
# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lwmi x0, 9, 4(x23)
# CHECK-PLUS: :[[@LINE+1]]:14: error: immediate must be an integer in the range [1, 31]
diff --git a/llvm/test/MC/RISCV/xqcisim-invalid.s b/llvm/test/MC/RISCV/xqcisim-invalid.s
index 0e740a5984538..f73fa754400d9 100644
--- a/llvm/test/MC/RISCV/xqcisim-invalid.s
+++ b/llvm/test/MC/RISCV/xqcisim-invalid.s
@@ -7,10 +7,10 @@
# CHECK-PLUS: :[[@LINE+1]]:14: error: immediate must be an integer in the range [0, 1023]
qc.psyscalli 1024
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.psyscalli
-# CHECK: :[[@LINE+1]]:18: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{18: error: too many operands for instruction|1: error: invalid instruction}}
qc.psyscalli 23, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisim' (Qualcomm uC Simulation Hint Extension)
@@ -20,105 +20,105 @@ qc.psyscalli 1023
# CHECK-PLUS: :[[@LINE+1]]:11: error: immediate must be an integer in the range [0, 255]
qc.pputci 256
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.pputci
-# CHECK: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{16: error: too many operands for instruction|1: error: invalid instruction}}
qc.pputci 200, x8
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisim' (Qualcomm uC Simulation Hint Extension)
qc.pputci 255
-# CHECK: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{13: error: too many operands for instruction|1: error: invalid instruction}}
qc.c.ptrace x0
-# CHECK: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{13: error: too many operands for instruction|1: error: invalid instruction}}
qc.c.ptrace 1
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisim' (Qualcomm uC Simulation Hint Extension)
qc.c.ptrace
-# CHECK: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{14: error: too many operands for instruction|1: error: invalid instruction}}
qc.pcoredump 12
-# CHECK: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{14: error: too many operands for instruction|1: error: invalid instruction}}
qc.pcoredump x4
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisim' (Qualcomm uC Simulation Hint Extension)
qc.pcoredump
-# CHECK: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{11: error: too many operands for instruction|1: error: invalid instruction}}
qc.ppregs x1
-# CHECK: :[[@LINE+1]]:11: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{11: error: too many operands for instruction|1: error: invalid instruction}}
qc.ppregs 23
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisim' (Qualcomm uC Simulation Hint Extension)
qc.ppregs
-# CHECK: :[[@LINE+1]]:15: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{15: error: too many operands for instruction|1: error: invalid instruction}}
qc.ppreg x10, x2
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.ppreg
-# CHECK: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{10: error: invalid operand for instruction|1: error: invalid instruction}}
qc.ppreg 23
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisim' (Qualcomm uC Simulation Hint Extension)
qc.ppreg a0
-# CHECK: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{14: error: too many operands for instruction|1: error: invalid instruction}}
qc.pputc x7, x3
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.pputc
-# CHECK: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{10: error: invalid operand for instruction|1: error: invalid instruction}}
qc.pputc 34
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisim' (Qualcomm uC Simulation Hint Extension)
qc.pputc t2
-# CHECK: :[[@LINE+1]]:15: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{15: error: too many operands for instruction|1: error: invalid instruction}}
qc.pputs x15, x18
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.pputs
-# CHECK: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{10: error: invalid operand for instruction|1: error: invalid instruction}}
qc.pputs 45
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisim' (Qualcomm uC Simulation Hint Extension)
qc.pputs a5
-# CHECK: :[[@LINE+1]]:15: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{15: error: too many operands for instruction|1: error: invalid instruction}}
qc.pexit x26, x23
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.pexit
-# CHECK: :[[@LINE+1]]:10: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{10: error: invalid operand for instruction|1: error: invalid instruction}}
qc.pexit 78
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisim' (Qualcomm uC Simulation Hint Extension)
qc.pexit s10
-# CHECK: :[[@LINE+1]]:18: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{18: error: too many operands for instruction|1: error: invalid instruction}}
qc.psyscall x11, x5
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.psyscall
-# CHECK: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{13: error: invalid operand for instruction|1: error: invalid instruction}}
qc.psyscall 98
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisim' (Qualcomm uC Simulation Hint Extension)
diff --git a/llvm/test/MC/RISCV/xqcisls-invalid.s b/llvm/test/MC/RISCV/xqcisls-invalid.s
index 4553168405230..192655823bc66 100644
--- a/llvm/test/MC/RISCV/xqcisls-invalid.s
+++ b/llvm/test/MC/RISCV/xqcisls-invalid.s
@@ -5,17 +5,17 @@
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-MINUS %s
# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lrb x5, x2, x0, 4
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|1: error: invalid instruction}}
qc.lrb x5, x2, x4
# CHECK-PLUS: :[[@LINE+2]]:20: error: immediate must be an integer in the range [0, 7]
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lrb x5, x2, x4, 12
-# CHECK: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{12: error: invalid operand for instruction|1: error: invalid instruction}}
qc.lrb x5, 2, x4, 4
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisls' (Qualcomm uC Scaled Load Store Extension)
@@ -23,17 +23,17 @@ qc.lrb x5, x2, x4, 4
# CHECK-PLUS: :[[@LINE+2]]:17: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:17: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lrh x1, x12, x0, 2
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{19: error: too few operands for instruction|1: error: invalid instruction}}
qc.lrh x1, x12, x6
# CHECK-PLUS: :[[@LINE+2]]:21: error: immediate must be an integer in the range [0, 7]
-# CHECK-MINUS: :[[@LINE+1]]:21: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lrh x1, x12, x6, 22
-# CHECK: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{12: error: invalid operand for instruction|1: error: invalid instruction}}
qc.lrh x1, 12, x6, 2
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisls' (Qualcomm uC Scaled Load Store Extension)
@@ -41,17 +41,17 @@ qc.lrh x1, x12, x6, 2
# CHECK-PLUS: :[[@LINE+2]]:17: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:17: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lrw x15, x7, x0, 1
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{20: error: too few operands for instruction|1: error: invalid instruction}}
qc.lrw x15, x7, x14
# CHECK-PLUS: :[[@LINE+2]]:22: error: immediate must be an integer in the range [0, 7]
-# CHECK-MINUS: :[[@LINE+1]]:22: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lrw x15, x7, x14, 11
-# CHECK: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{13: error: invalid operand for instruction|1: error: invalid instruction}}
qc.lrw x15, 7, x14, 1
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisls' (Qualcomm uC Scaled Load Store Extension)
@@ -59,17 +59,17 @@ qc.lrw x15, x7, x14, 1
# CHECK-PLUS: :[[@LINE+2]]:18: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:18: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lrbu x9, x11, x0, 7
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{20: error: too few operands for instruction|1: error: invalid instruction}}
qc.lrbu x9, x11, x4
# CHECK-PLUS: :[[@LINE+2]]:22: error: immediate must be an integer in the range [0, 7]
-# CHECK-MINUS: :[[@LINE+1]]:22: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lrbu x9, x11, x4, 37
-# CHECK: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{13: error: invalid operand for instruction|1: error: invalid instruction}}
qc.lrbu x9, 11, x4, 7
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisls' (Qualcomm uC Scaled Load Store Extension)
@@ -77,17 +77,17 @@ qc.lrbu x9, x11, x4, 7
# CHECK-PLUS: :[[@LINE+2]]:18: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:18: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lrhu x16, x6, x0, 4
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{21: error: too few operands for instruction|1: error: invalid instruction}}
qc.lrhu x16, x6, x10
# CHECK-PLUS: :[[@LINE+2]]:23: error: immediate must be an integer in the range [0, 7]
-# CHECK-MINUS: :[[@LINE+1]]:23: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.lrhu x16, x6, x10, 44
-# CHECK: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{14: error: invalid operand for instruction|1: error: invalid instruction}}
qc.lrhu x16, 6, x10, 4
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisls' (Qualcomm uC Scaled Load Store Extension)
@@ -95,17 +95,17 @@ qc.lrhu x16, x6, x10, 4
# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.srb x0, x2, x0, 3
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|1: error: invalid instruction}}
qc.srb x0, x2, x8
# CHECK-PLUS: :[[@LINE+2]]:20: error: immediate must be an integer in the range [0, 7]
-# CHECK-MINUS: :[[@LINE+1]]:20: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.srb x0, x2, x8, 93
-# CHECK: :[[@LINE+1]]:12: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{12: error: invalid operand for instruction|1: error: invalid instruction}}
qc.srb x0, 2, x8, 3
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisls' (Qualcomm uC Scaled Load Store Extension)
@@ -113,17 +113,17 @@ qc.srb x0, x2, x8, 3
# CHECK-PLUS: :[[@LINE+2]]:17: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:17: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.srh x13, x0, x0, 6
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{20: error: too few operands for instruction|1: error: invalid instruction}}
qc.srh x13, x0, x20
# CHECK-PLUS: :[[@LINE+2]]:22: error: immediate must be an integer in the range [0, 7]
-# CHECK-MINUS: :[[@LINE+1]]:22: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.srh x13, x0, x20, 76
-# CHECK: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{13: error: invalid operand for instruction|1: error: invalid instruction}}
qc.srh x13, 0, x20, 6
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisls' (Qualcomm uC Scaled Load Store Extension)
@@ -131,17 +131,17 @@ qc.srh x13, x0, x20, 6
# CHECK-PLUS: :[[@LINE+2]]:18: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:18: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.srw x17, x18, x0, 0
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:{{21: error: too few operands for instruction|1: error: invalid instruction}}
qc.srw x17, x18, x19
# CHECK-PLUS: :[[@LINE+2]]:23: error: immediate must be an integer in the range [0, 7]
-# CHECK-MINUS: :[[@LINE+1]]:23: error: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.srw x17, x18, x19, 10
-# CHECK: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{13: error: invalid operand for instruction|1: error: invalid instruction}}
qc.srw x17, 18, x19, 0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisls' (Qualcomm uC Scaled Load Store Extension)
diff --git a/llvm/test/MC/RISCV/xqcisync-invalid.s b/llvm/test/MC/RISCV/xqcisync-invalid.s
index 7f037e01d62ab..1eefc6271f210 100644
--- a/llvm/test/MC/RISCV/xqcisync-invalid.s
+++ b/llvm/test/MC/RISCV/xqcisync-invalid.s
@@ -7,10 +7,10 @@
# CHECK-PLUS: :[[@LINE+1]]:12: error: immediate must be an integer in the range [1, 31]
qc.c.delay 34
-# CHECK: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{16: error: too many operands for instruction|1: error: invalid instruction}}
qc.c.delay 11, 12
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.c.delay
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisync' (Qualcomm uC Sync Delay Extension)
@@ -20,10 +20,10 @@ qc.c.delay 10
# CHECK-PLUS: :[[@LINE+1]]:9: error: immediate must be an integer in the range [0, 31]
qc.sync 45
-# CHECK: :[[@LINE+1]]:13: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{13: error: too many operands for instruction|1: error: invalid instruction}}
qc.sync 22, x4
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.sync
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisync' (Qualcomm uC Sync Delay Extension)
@@ -33,10 +33,10 @@ qc.sync 8
# CHECK-PLUS: :[[@LINE+1]]:10: error: immediate must be an integer in the range [0, 31]
qc.syncr 56
-# CHECK: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{14: error: too many operands for instruction|1: error: invalid instruction}}
qc.syncr 31, 45
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.syncr
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisync' (Qualcomm uC Sync Delay Extension)
@@ -46,10 +46,10 @@ qc.syncr 23
# CHECK-PLUS: :[[@LINE+1]]:11: error: immediate must be an integer in the range [0, 31]
qc.syncwf 88
-# CHECK: :[[@LINE+1]]:14: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{14: error: too many operands for instruction|1: error: invalid instruction}}
qc.syncwf 5, 44
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.syncwf
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisync' (Qualcomm uC Sync Delay Extension)
@@ -59,10 +59,10 @@ qc.syncwf 31
# CHECK-PLUS: :[[@LINE+1]]:11: error: immediate must be an integer in the range [0, 31]
qc.syncwl 99
-# CHECK: :[[@LINE+1]]:15: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{15: error: too many operands for instruction|1: error: invalid instruction}}
qc.syncwl 11, x10
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.syncwl
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisync' (Qualcomm uC Sync Delay Extension)
@@ -72,10 +72,10 @@ qc.syncwl 1
# CHECK-PLUS: :[[@LINE+1]]:11: error: immediate must be one of: 0, 1, 2, 4, 8, 15, 16, 31
qc.c.sync 45
-# CHECK: :[[@LINE+1]]:15: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{15: error: too many operands for instruction|1: error: invalid instruction}}
qc.c.sync 31, x4
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.c.sync
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisync' (Qualcomm uC Sync Delay Extension)
@@ -85,10 +85,10 @@ qc.c.sync 8
# CHECK-PLUS: :[[@LINE+1]]:12: error: immediate must be one of: 0, 1, 2, 4, 8, 15, 16, 31
qc.c.syncr 56
-# CHECK: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{16: error: too many operands for instruction|1: error: invalid instruction}}
qc.c.syncr 31, 45
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.c.syncr
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisync' (Qualcomm uC Sync Delay Extension)
@@ -98,10 +98,10 @@ qc.c.syncr 8
# CHECK-PLUS: :[[@LINE+1]]:13: error: immediate must be one of: 0, 1, 2, 4, 8, 15, 16, 31
qc.c.syncwf 88
-# CHECK: :[[@LINE+1]]:16: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{16: error: too many operands for instruction|1: error: invalid instruction}}
qc.c.syncwf 8, 44
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.c.syncwf
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisync' (Qualcomm uC Sync Delay Extension)
@@ -111,10 +111,10 @@ qc.c.syncwf 31
# CHECK-PLUS: :[[@LINE+1]]:13: error: immediate must be one of: 0, 1, 2, 4, 8, 15, 16, 31
qc.c.syncwl 99
-# CHECK: :[[@LINE+1]]:17: error: invalid operand for instruction
+# CHECK: :[[@LINE+1]]:{{17: error: too many operands for instruction|1: error: invalid instruction}}
qc.c.syncwl 15, x10
-# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
+# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.c.syncwl
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisync' (Qualcomm uC Sync Delay Extension)
diff --git a/llvm/test/MC/RISCV/xsifive-invalid.s b/llvm/test/MC/RISCV/xsifive-invalid.s
index 5210d29f9d363..afb14242ed9c8 100644
--- a/llvm/test/MC/RISCV/xsifive-invalid.s
+++ b/llvm/test/MC/RISCV/xsifive-invalid.s
@@ -1,9 +1,9 @@
# RUN: not llvm-mc -triple riscv32 < %s 2>&1 | FileCheck %s
# RUN: not llvm-mc -triple riscv64 < %s 2>&1 | FileCheck %s
-sf.cflush.d.l1 0x10 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
+sf.cflush.d.l1 0x10 # CHECK: :[[@LINE]]:1: error: invalid instruction
-sf.cdiscard.d.l1 0x10 # CHECK: :[[@LINE]]:18: error: invalid operand for instruction
+sf.cdiscard.d.l1 0x10 # CHECK: :[[@LINE]]:1: error: invalid instruction
sf.cflush.d.l1 x0 # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'XSiFivecflushdlone' (SiFive sf.cflush.d.l1 Instruction){{$}}
@@ -13,8 +13,8 @@ sf.cdiscard.d.l1 x0 # CHECK: :[[@LINE]]:1: error: instruction requires the follo
sf.cdiscard.d.l1 x7 # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'XSiFivecdiscarddlone' (SiFive sf.cdiscard.d.l1 Instruction){{$}}
-sf.cease x1 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
+sf.cease x1 # CHECK: :[[@LINE]]:1: error: invalid instruction
-sf.cease 0x10 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
+sf.cease 0x10 # CHECK: :[[@LINE]]:1: error: invalid instruction
sf.cease # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'XSfcease' (SiFive sf.cease Instruction){{$}}
diff --git a/llvm/test/MC/RISCV/xtheadcmo-invalid.s b/llvm/test/MC/RISCV/xtheadcmo-invalid.s
index be704269044c6..1a91861d5405d 100644
--- a/llvm/test/MC/RISCV/xtheadcmo-invalid.s
+++ b/llvm/test/MC/RISCV/xtheadcmo-invalid.s
@@ -15,11 +15,11 @@ th.dcache.cipa # CHECK: :[[@LINE]]:1: error: too few operands for instruction
th.icache.iva # CHECK: :[[@LINE]]:1: error: too few operands for instruction
th.icache.ipa # CHECK: :[[@LINE]]:1: error: too few operands for instruction
-th.dcache.call t0 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
-th.dcache.iall t0 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
-th.dcache.ciall t0 # CHECK: :[[@LINE]]:17: error: invalid operand for instruction
-th.icache.iall t0 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
-th.icache.ialls t0 # CHECK: :[[@LINE]]:17: error: invalid operand for instruction
-th.l2cache.call t0 # CHECK: :[[@LINE]]:17: error: invalid operand for instruction
-th.l2cache.iall t0 # CHECK: :[[@LINE]]:17: error: invalid operand for instruction
-th.l2cache.ciall t0 # CHECK: :[[@LINE]]:18: error: invalid operand for instruction
+th.dcache.call t0 # CHECK: :[[@LINE]]:16: error: too many operands for instruction
+th.dcache.iall t0 # CHECK: :[[@LINE]]:16: error: too many operands for instruction
+th.dcache.ciall t0 # CHECK: :[[@LINE]]:17: error: too many operands for instruction
+th.icache.iall t0 # CHECK: :[[@LINE]]:16: error: too many operands for instruction
+th.icache.ialls t0 # CHECK: :[[@LINE]]:17: error: too many operands for instruction
+th.l2cache.call t0 # CHECK: :[[@LINE]]:17: error: too many operands for instruction
+th.l2cache.iall t0 # CHECK: :[[@LINE]]:17: error: too many operands for instruction
+th.l2cache.ciall t0 # CHECK: :[[@LINE]]:18: error: too many operands for instruction
diff --git a/llvm/test/MC/RISCV/xtheadcondmov-invalid.s b/llvm/test/MC/RISCV/xtheadcondmov-invalid.s
index 7a7a3b6f8e2a6..0f1bf8de499cd 100644
--- a/llvm/test/MC/RISCV/xtheadcondmov-invalid.s
+++ b/llvm/test/MC/RISCV/xtheadcondmov-invalid.s
@@ -1,9 +1,9 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+xtheadcondmov < %s 2>&1 | FileCheck %s
# RUN: not llvm-mc -triple riscv64 -mattr=+xtheadcondmov < %s 2>&1 | FileCheck %s
-th.mveqz a0,a1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
-th.mveqz a0,a1,a2,a3 # CHECK: :[[@LINE]]:19: error: invalid operand for instruction
+th.mveqz a0,a1 # CHECK: :[[@LINE]]:15: error: too few operands for instruction
+th.mveqz a0,a1,a2,a3 # CHECK: :[[@LINE]]:19: error: too many operands for instruction
th.mveqz a0,a1,1 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
-th.mvnez a0,a1 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
-th.mvnez a0,a1,a2,a3 # CHECK: :[[@LINE]]:19: error: invalid operand for instruction
+th.mvnez a0,a1 # CHECK: :[[@LINE]]:15: error: too few operands for instruction
+th.mvnez a0,a1,a2,a3 # CHECK: :[[@LINE]]:19: error: too many operands for instruction
th.mvnez a0,a1,1 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/xtheadmac-invalid.s b/llvm/test/MC/RISCV/xtheadmac-invalid.s
index 48bedbef013dd..a81b1952ed90a 100644
--- a/llvm/test/MC/RISCV/xtheadmac-invalid.s
+++ b/llvm/test/MC/RISCV/xtheadmac-invalid.s
@@ -1,7 +1,7 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+xtheadmac < %s 2>&1 | FileCheck %s
# RUN: not llvm-mc -triple riscv64 -mattr=+xtheadmac < %s 2>&1 | FileCheck %s
-th.mula t0, t1, 0(t2) # CHECK: :[[@LINE]]:18: error: invalid operand for instruction
+th.mula t0, t1, 0(t2) # CHECK: :[[@LINE]]:1: error: invalid instruction
th.muls t0, 12, t2 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
th.mulsh t0, t1, 34 # CHECK: :[[@LINE]]:18: error: invalid operand for instruction
-th.mulsw t0, -56, t2 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
+th.mulsw t0, -56, t2 # CHECK: :[[@LINE]]:{{1: error: invalid instruction|14: error: invalid operand for instruction}}
diff --git a/llvm/test/MC/RISCV/xtheadsync-invalid.s b/llvm/test/MC/RISCV/xtheadsync-invalid.s
index cb54da054f4e9..a341fa012ae52 100644
--- a/llvm/test/MC/RISCV/xtheadsync-invalid.s
+++ b/llvm/test/MC/RISCV/xtheadsync-invalid.s
@@ -1,8 +1,8 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+xtheadsync < %s 2>&1 | FileCheck %s
# RUN: not llvm-mc -triple riscv64 -mattr=+xtheadsync < %s 2>&1 | FileCheck %s
-th.sfence.vmas t0 # CHECK: :[[@LINE]]:1: error: too few operands for instruction
-th.sync t0 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
-th.sync.s t0 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
-th.sync.i t0 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
-th.sync.is t0 # CHECK: :[[@LINE]]:12: error: invalid operand for instruction
+th.sfence.vmas t0 # CHECK: :[[@LINE]]:18: error: too few operands for instruction
+th.sync t0 # CHECK: :[[@LINE]]:9: error: too many operands for instruction
+th.sync.s t0 # CHECK: :[[@LINE]]:11: error: too many operands for instruction
+th.sync.i t0 # CHECK: :[[@LINE]]:11: error: too many operands for instruction
+th.sync.is t0 # CHECK: :[[@LINE]]:12: error: too many operands for instruction
>From d772eacae93be44163837af18bcb8ee755546c08 Mon Sep 17 00:00:00 2001
From: Mark Zhuang <mark.zhuang at spacemit.com>
Date: Sun, 28 Jun 2026 00:40:24 +0800
Subject: [PATCH 2/8] [RISCV] Address review feedback on near-miss reporting
Apply the directly-actionable AsmParser review comments:
- RISCV.td: use `true` instead of `1` for ReportMultipleNearMisses.
- FilterNearMisses: drop the `else` after `return` in the operand
dedup lambda (no-else-after-return).
- FilterNearMisses: fold the feature-set dedup into a single
`SmallSet::insert(...).second` check.
- FilterNearMisses: stop rephrasing the "too many operands" case.
Keep emitting "invalid operand for instruction" as before so this
PR does not change existing error wording; revert the affected
test expectations accordingly.
- rv32i-aliases-invalid.s: reformat multi-check cases so the input
instruction is on its own line followed by stacked CHECK/notes.
Assisted-by: claude-opus
---
.../Target/RISCV/AsmParser/RISCVAsmParser.cpp | 10 +-
llvm/lib/Target/RISCV/RISCV.td | 2 +-
llvm/test/MC/RISCV/corev/XCValu-invalid.s | 62 ++--
.../test/MC/RISCV/corev/XCVbitmanip-invalid.s | 16 +-
llvm/test/MC/RISCV/corev/XCVmac-invalid.s | 44 +--
llvm/test/MC/RISCV/corev/XCVmem-invalid.s | 10 +-
llvm/test/MC/RISCV/corev/XCVsimd-invalid.s | 310 +++++++++---------
llvm/test/MC/RISCV/insn-invalid.s | 4 +-
llvm/test/MC/RISCV/insn_c-invalid.s | 4 +-
llvm/test/MC/RISCV/insn_xqci-invalid.s | 8 +-
llvm/test/MC/RISCV/priv-invalid.s | 10 +-
llvm/test/MC/RISCV/rv32c-invalid.s | 4 +-
llvm/test/MC/RISCV/rv32h-invalid.s | 2 +-
llvm/test/MC/RISCV/rv32i-aliases-invalid.s | 259 +++++++++------
llvm/test/MC/RISCV/rv32i-invalid.s | 6 +-
llvm/test/MC/RISCV/rv32zalrsc-invalid.s | 2 +-
llvm/test/MC/RISCV/rv32zbb-invalid.s | 10 +-
llvm/test/MC/RISCV/rv32zcmop-invalid.s | 4 +-
llvm/test/MC/RISCV/rv64h-invalid.s | 2 +-
llvm/test/MC/RISCV/rv64zalrsc-invalid.s | 2 +-
llvm/test/MC/RISCV/rv64zbb-invalid.s | 6 +-
llvm/test/MC/RISCV/rvc-hints-invalid.s | 2 +-
llvm/test/MC/RISCV/rvv/invalid.s | 6 +-
llvm/test/MC/RISCV/rvv/zvvfmm-invalid.s | 10 +-
llvm/test/MC/RISCV/rvv/zvvmm-invalid.s | 8 +-
llvm/test/MC/RISCV/rvv/zvvmtls-invalid.s | 4 +-
llvm/test/MC/RISCV/rvv/zvvmttls-invalid.s | 4 +-
llvm/test/MC/RISCV/rvzicond-invalid.s | 4 +-
llvm/test/MC/RISCV/rvzihintntl-invalid.s | 8 +-
llvm/test/MC/RISCV/rvzihintntlc-invalid.s | 8 +-
llvm/test/MC/RISCV/smrnmi-invalid.s | 2 +-
llvm/test/MC/RISCV/tlsdesc.s | 4 +-
llvm/test/MC/RISCV/xmips-invalid.s | 6 +-
llvm/test/MC/RISCV/xqci-access-pseudos.s | 30 +-
llvm/test/MC/RISCV/xqciint-invalid.s | 18 +-
llvm/test/MC/RISCV/xqcisim-invalid.s | 26 +-
llvm/test/MC/RISCV/xqcisync-invalid.s | 18 +-
llvm/test/MC/RISCV/xtheadcmo-invalid.s | 16 +-
llvm/test/MC/RISCV/xtheadcondmov-invalid.s | 4 +-
llvm/test/MC/RISCV/xtheadsync-invalid.s | 8 +-
40 files changed, 509 insertions(+), 454 deletions(-)
diff --git a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
index 057eca5e83654..9141249d717c3 100644
--- a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+++ b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
@@ -1728,9 +1728,8 @@ void RISCVAsmParser::FilterNearMisses(
[DupCheckMatchClass](const std::pair<unsigned, unsigned> Pair) {
if (DupCheckMatchClass == ~0U || Pair.second == ~0U)
return Pair.second == DupCheckMatchClass;
- else
- return isSubclass((MatchClassKind)DupCheckMatchClass,
- (MatchClassKind)Pair.second);
+ return isSubclass((MatchClassKind)DupCheckMatchClass,
+ (MatchClassKind)Pair.second);
}))
break;
OperandMissesSeen.insert(
@@ -1740,8 +1739,6 @@ void RISCVAsmParser::FilterNearMisses(
Message.Loc = OperandLoc;
if (!OperandDiag.empty()) {
Message.Message = OperandDiag;
- } else if (I.getOperandClass() == InvalidMatchClass) {
- Message.Message = "too many operands for instruction";
} else {
Message.Message = "invalid operand for instruction";
LLVM_DEBUG(
@@ -1756,9 +1753,8 @@ void RISCVAsmParser::FilterNearMisses(
case NearMissInfo::NearMissFeature: {
const FeatureBitset &MissingFeatures = I.getFeatures();
// Don't report the same set of features twice.
- if (FeatureMissesSeen.count(MissingFeatures))
+ if (!FeatureMissesSeen.insert(MissingFeatures).second)
break;
- FeatureMissesSeen.insert(MissingFeatures);
NearMissMessage Message;
Message.Loc = IDLoc;
diff --git a/llvm/lib/Target/RISCV/RISCV.td b/llvm/lib/Target/RISCV/RISCV.td
index b1927224db47a..474618cbeff1e 100644
--- a/llvm/lib/Target/RISCV/RISCV.td
+++ b/llvm/lib/Target/RISCV/RISCV.td
@@ -91,7 +91,7 @@ def RISCVInstrInfo : InstrInfo {
def RISCVAsmParser : AsmParser {
let ShouldEmitMatchRegisterAltName = 1;
let AllowDuplicateRegisterNames = 1;
- let ReportMultipleNearMisses = 1;
+ let ReportMultipleNearMisses = true;
}
def RISCVAsmWriter : AsmWriter {
diff --git a/llvm/test/MC/RISCV/corev/XCValu-invalid.s b/llvm/test/MC/RISCV/corev/XCValu-invalid.s
index febb363cf9580..550d79c44f6b8 100644
--- a/llvm/test/MC/RISCV/corev/XCValu-invalid.s
+++ b/llvm/test/MC/RISCV/corev/XCValu-invalid.s
@@ -14,7 +14,7 @@ cv.addrnr t0, t1
# CHECK-ERROR: too few operands for instruction
cv.addrnr t0, t1, t2, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.addun t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -38,7 +38,7 @@ cv.addun t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.addun t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.extbz t0, 0
# CHECK-ERROR: invalid operand for instruction
@@ -50,7 +50,7 @@ cv.extbz t0
# CHECK-ERROR: too few operands for instruction
cv.extbz t0, t1, t2
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.addnr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -65,7 +65,7 @@ cv.addnr t0, t1
# CHECK-ERROR: too few operands for instruction
cv.addnr t0, t1, t2, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.clipu t0, t1, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -86,7 +86,7 @@ cv.clipu t0, t1
# CHECK-ERROR: too few operands for instruction
cv.clipu t0, t1, 0, 0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.minu t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -101,7 +101,7 @@ cv.minu t0, t1
# CHECK-ERROR: too few operands for instruction
cv.minu t0, t1, t2, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.abs t0, 0
# CHECK-ERROR: invalid operand for instruction
@@ -113,7 +113,7 @@ cv.abs t0
# CHECK-ERROR: too few operands for instruction
cv.abs t0, t1, t2
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.addrn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -137,7 +137,7 @@ cv.addrn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.addrn t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.suburn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -161,7 +161,7 @@ cv.suburn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.suburn t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.clip t0, t1, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -182,7 +182,7 @@ cv.clip t0, t1
# CHECK-ERROR: too few operands for instruction
cv.clip t0, t1, 0, 0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.addunr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -197,7 +197,7 @@ cv.addunr t0, t1
# CHECK-ERROR: too few operands for instruction
cv.addunr t0, t1, t2, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.addurn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -221,7 +221,7 @@ cv.addurn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.addurn t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.subun t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -245,7 +245,7 @@ cv.subun t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.subun t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.subn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -269,7 +269,7 @@ cv.subn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.subn t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.subrnr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -284,7 +284,7 @@ cv.subrnr t0, t1
# CHECK-ERROR: too few operands for instruction
cv.subrnr t0, t1, t2, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.slet t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -299,7 +299,7 @@ cv.slet t0, t1
# CHECK-ERROR: too few operands for instruction
cv.slet t0, t1, t2, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.suburnr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -314,7 +314,7 @@ cv.suburnr t0, t1
# CHECK-ERROR: too few operands for instruction
cv.suburnr t0, t1, t2, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.maxu t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -329,7 +329,7 @@ cv.maxu t0, t1
# CHECK-ERROR: too few operands for instruction
cv.maxu t0, t1, t2, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.extbs t0, 0
# CHECK-ERROR: invalid operand for instruction
@@ -341,7 +341,7 @@ cv.extbs t0
# CHECK-ERROR: too few operands for instruction
cv.extbs t0, t1, t2
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.exths t0, 0
# CHECK-ERROR: invalid operand for instruction
@@ -353,7 +353,7 @@ cv.exths t0
# CHECK-ERROR: too few operands for instruction
cv.exths t0, t1, t2
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.max t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -368,7 +368,7 @@ cv.max t0, t1
# CHECK-ERROR: too few operands for instruction
cv.max t0, t1, t2, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.subunr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -383,7 +383,7 @@ cv.subunr t0, t1
# CHECK-ERROR: too few operands for instruction
cv.subunr t0, t1, t2, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.exthz t0, 0
# CHECK-ERROR: invalid operand for instruction
@@ -395,7 +395,7 @@ cv.exthz t0
# CHECK-ERROR: too few operands for instruction
cv.exthz t0, t1, t2
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.clipur t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -410,7 +410,7 @@ cv.clipur t0, t1
# CHECK-ERROR: too few operands for instruction
cv.clipur t0, t1, t2, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.addurnr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -425,7 +425,7 @@ cv.addurnr t0, t1
# CHECK-ERROR: too few operands for instruction
cv.addurnr t0, t1, t2, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.addn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -449,7 +449,7 @@ cv.addn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.addn t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.subrn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -473,7 +473,7 @@ cv.subrn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.subrn t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.subnr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -488,7 +488,7 @@ cv.subnr t0, t1
# CHECK-ERROR: too few operands for instruction
cv.subnr t0, t1, t2, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.clipr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -503,7 +503,7 @@ cv.clipr t0, t1
# CHECK-ERROR: too few operands for instruction
cv.clipr t0, t1, t2, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sletu t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -518,7 +518,7 @@ cv.sletu t0, t1
# CHECK-ERROR: too few operands for instruction
cv.sletu t0, t1, t2, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.min t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -533,4 +533,4 @@ cv.min t0, t1
# CHECK-ERROR: too few operands for instruction
cv.min t0, t1, t2, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/corev/XCVbitmanip-invalid.s b/llvm/test/MC/RISCV/corev/XCVbitmanip-invalid.s
index 3bd14c7b7d2d0..7ecdb64c86372 100644
--- a/llvm/test/MC/RISCV/corev/XCVbitmanip-invalid.s
+++ b/llvm/test/MC/RISCV/corev/XCVbitmanip-invalid.s
@@ -224,10 +224,10 @@ cv.ff1 t0, 0
# CHECK-ERROR: invalid operand for instruction
cv.ff1 t0, t1, 0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.ff1 t0, t1, t2
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.fl1 t0
# CHECK-ERROR: too few operands for instruction
@@ -236,10 +236,10 @@ cv.fl1 t0, 0
# CHECK-ERROR: invalid operand for instruction
cv.fl1 t0, t1, 0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.fl1 t0, t1, t2
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.clb t0
# CHECK-ERROR: too few operands for instruction
@@ -248,10 +248,10 @@ cv.clb t0, 0
# CHECK-ERROR: invalid operand for instruction
cv.clb t0, t1, 0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.clb t0, t1, t2
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cnt t0
# CHECK-ERROR: too few operands for instruction
@@ -260,8 +260,8 @@ cv.cnt t0, 0
# CHECK-ERROR: invalid operand for instruction
cv.cnt t0, t1, 0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cnt t0, t1, t2
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/corev/XCVmac-invalid.s b/llvm/test/MC/RISCV/corev/XCVmac-invalid.s
index 6b8779b75eeab..e1a102cd8405a 100644
--- a/llvm/test/MC/RISCV/corev/XCVmac-invalid.s
+++ b/llvm/test/MC/RISCV/corev/XCVmac-invalid.s
@@ -14,7 +14,7 @@ cv.mac t0, t1
# CHECK-ERROR: too few operands for instruction
cv.mac t0, t1, t2, t4
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.machhsn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -38,7 +38,7 @@ cv.machhsn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.machhsn t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.machhsrn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -62,7 +62,7 @@ cv.machhsrn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.machhsrn t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.machhun t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -86,7 +86,7 @@ cv.machhun t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.machhun t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.machhurn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -110,7 +110,7 @@ cv.machhurn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.machhurn t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.macsn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -134,7 +134,7 @@ cv.macsn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.macsn t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.macsrn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -158,7 +158,7 @@ cv.macsrn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.macsrn t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.macun t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -182,7 +182,7 @@ cv.macun t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.macun t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.macurn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -206,7 +206,7 @@ cv.macurn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.macurn t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.msu t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -221,7 +221,7 @@ cv.msu t0, t1
# CHECK-ERROR: too few operands for instruction
cv.msu t0, t1, t2, t4
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.mulhhs t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -236,7 +236,7 @@ cv.mulhhs t0, t1
# CHECK-ERROR: too few operands for instruction
cv.mulhhs t0, t1, t2, t4
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.mulhhsn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -260,7 +260,7 @@ cv.mulhhsn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.mulhhsn t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.mulhhsrn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -284,7 +284,7 @@ cv.mulhhsrn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.mulhhsrn t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.mulhhu t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -299,7 +299,7 @@ cv.mulhhu t0, t1
# CHECK-ERROR: too few operands for instruction
cv.mulhhu t0, t1, t2, t4
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.mulhhun t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -323,7 +323,7 @@ cv.mulhhun t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.mulhhun t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.mulhhurn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -347,7 +347,7 @@ cv.mulhhurn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.mulhhurn t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.muls t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -362,7 +362,7 @@ cv.muls t0, t1
# CHECK-ERROR: too few operands for instruction
cv.muls t0, t1, t2, t4
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.mulsn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -386,7 +386,7 @@ cv.mulsn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.mulsn t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.mulsrn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -410,7 +410,7 @@ cv.mulsrn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.mulsrn t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.mulu t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -425,7 +425,7 @@ cv.mulu t0, t1
# CHECK-ERROR: too few operands for instruction
cv.mulu t0, t1, t2, t4
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.mulun t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -449,7 +449,7 @@ cv.mulun t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.mulun t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.mulurn t0, t1, t2, -1
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -473,4 +473,4 @@ cv.mulurn t0, t1, t2
# CHECK-ERROR: too few operands for instruction
cv.mulurn t0, t1, t2, 0, a0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/corev/XCVmem-invalid.s b/llvm/test/MC/RISCV/corev/XCVmem-invalid.s
index 517aa153fd39b..d1f1bd971aeb0 100644
--- a/llvm/test/MC/RISCV/corev/XCVmem-invalid.s
+++ b/llvm/test/MC/RISCV/corev/XCVmem-invalid.s
@@ -33,7 +33,7 @@ cv.lb t0, (t2)
# CHECK-ERROR: :[[@LINE-1]]:15: error: too few operands for instruction
cv.lb t0, (t1), t2, t3
-# CHECK-ERROR: :[[@LINE-1]]:21: error: too many operands for instruction
+# CHECK-ERROR: :[[@LINE-1]]:21: error: invalid operand for instruction
cv.lbu t0, (0), 0
# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
@@ -67,7 +67,7 @@ cv.lbu t0, (t2)
# CHECK-ERROR: :[[@LINE-1]]:16: error: too few operands for instruction
cv.lbu t0, (t1), t2, t3
-# CHECK-ERROR: :[[@LINE-1]]:22: error: too many operands for instruction
+# CHECK-ERROR: :[[@LINE-1]]:22: error: invalid operand for instruction
cv.lh t0, (0), 0
# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
@@ -104,7 +104,7 @@ cv.lh t0, (t1)
# CHECK-ERROR: :[[@LINE-1]]:15: error: too few operands for instruction
cv.lh t0, (t1), t2, t3
-# CHECK-ERROR: :[[@LINE-1]]:21: error: too many operands for instruction
+# CHECK-ERROR: :[[@LINE-1]]:21: error: invalid operand for instruction
cv.lhu t0, (0), 0
# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
@@ -141,7 +141,7 @@ cv.lhu t0, (t1)
# CHECK-ERROR: :[[@LINE-1]]:16: error: too few operands for instruction
cv.lhu t0, (t1), t2, t3
-# CHECK-ERROR: :[[@LINE-1]]:22: error: too many operands for instruction
+# CHECK-ERROR: :[[@LINE-1]]:22: error: invalid operand for instruction
cv.lw t0, (0), 0
# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
@@ -178,7 +178,7 @@ cv.lw t0, (t1)
# CHECK-ERROR: :[[@LINE-1]]:15: error: too few operands for instruction
cv.lw t0, (t1), t2, t3
-# CHECK-ERROR: :[[@LINE-1]]:21: error: too many operands for instruction
+# CHECK-ERROR: :[[@LINE-1]]:21: error: invalid operand for instruction
cv.sb t0, (0), 0
# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/corev/XCVsimd-invalid.s b/llvm/test/MC/RISCV/corev/XCVsimd-invalid.s
index b67e5d4b3ecbd..dd835e06939a3 100644
--- a/llvm/test/MC/RISCV/corev/XCVsimd-invalid.s
+++ b/llvm/test/MC/RISCV/corev/XCVsimd-invalid.s
@@ -12,7 +12,7 @@ cv.add.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.add.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -34,7 +34,7 @@ cv.add.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.add.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -56,7 +56,7 @@ cv.add.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.add.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -78,7 +78,7 @@ cv.add.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.add.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -144,7 +144,7 @@ cv.sub.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sub.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -166,7 +166,7 @@ cv.sub.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sub.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -188,7 +188,7 @@ cv.sub.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sub.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -210,7 +210,7 @@ cv.sub.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sub.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -276,7 +276,7 @@ cv.avg.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avg.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.avg.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -298,7 +298,7 @@ cv.avg.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avg.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.avg.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -320,7 +320,7 @@ cv.avg.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avg.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.avg.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -342,7 +342,7 @@ cv.avg.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avg.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.avg.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -408,7 +408,7 @@ cv.avgu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avgu.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.avgu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -430,7 +430,7 @@ cv.avgu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avgu.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.avgu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -452,7 +452,7 @@ cv.avgu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avgu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.avgu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -474,7 +474,7 @@ cv.avgu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avgu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.avgu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -546,7 +546,7 @@ cv.min.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.min.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.min.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -568,7 +568,7 @@ cv.min.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.min.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.min.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -590,7 +590,7 @@ cv.min.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.min.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.min.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -612,7 +612,7 @@ cv.min.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.min.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.min.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -678,7 +678,7 @@ cv.minu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.minu.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.minu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -700,7 +700,7 @@ cv.minu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.minu.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.minu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -722,7 +722,7 @@ cv.minu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.minu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.minu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -744,7 +744,7 @@ cv.minu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.minu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.minu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -816,7 +816,7 @@ cv.max.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.max.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.max.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -838,7 +838,7 @@ cv.max.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.max.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.max.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -860,7 +860,7 @@ cv.max.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.max.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.max.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -882,7 +882,7 @@ cv.max.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.max.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.max.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -948,7 +948,7 @@ cv.maxu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.maxu.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.maxu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -970,7 +970,7 @@ cv.maxu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.maxu.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.maxu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -992,7 +992,7 @@ cv.maxu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.maxu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.maxu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1014,7 +1014,7 @@ cv.maxu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.maxu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.maxu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1086,7 +1086,7 @@ cv.srl.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.srl.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.srl.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1108,7 +1108,7 @@ cv.srl.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.srl.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.srl.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1130,7 +1130,7 @@ cv.srl.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.srl.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.srl.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1152,7 +1152,7 @@ cv.srl.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.srl.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.srl.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1224,7 +1224,7 @@ cv.sra.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sra.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sra.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1246,7 +1246,7 @@ cv.sra.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sra.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sra.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1268,7 +1268,7 @@ cv.sra.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sra.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sra.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1290,7 +1290,7 @@ cv.sra.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sra.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sra.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1362,7 +1362,7 @@ cv.sll.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sll.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sll.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1384,7 +1384,7 @@ cv.sll.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sll.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sll.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1406,7 +1406,7 @@ cv.sll.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sll.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sll.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1428,7 +1428,7 @@ cv.sll.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sll.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sll.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1500,7 +1500,7 @@ cv.or.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.or.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.or.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1522,7 +1522,7 @@ cv.or.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.or.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.or.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1544,7 +1544,7 @@ cv.or.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.or.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.or.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1566,7 +1566,7 @@ cv.or.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.or.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.or.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1632,7 +1632,7 @@ cv.xor.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.xor.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.xor.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1654,7 +1654,7 @@ cv.xor.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.xor.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.xor.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1676,7 +1676,7 @@ cv.xor.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.xor.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.xor.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1698,7 +1698,7 @@ cv.xor.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.xor.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.xor.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1764,7 +1764,7 @@ cv.and.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.and.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.and.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1786,7 +1786,7 @@ cv.and.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.and.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.and.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1808,7 +1808,7 @@ cv.and.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.and.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.and.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1830,7 +1830,7 @@ cv.and.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.and.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.and.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1899,13 +1899,13 @@ cv.abs.h t0, t1, t2, t3
# CHECK-ERROR: error: invalid instruction
cv.abs.h t0, t1, t2
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.abs.h t0, t1, 0
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.abs.h t0, t1, 0
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
//===----------------------------------------------------------------------===//
// cv.abs.b
@@ -1921,13 +1921,13 @@ cv.abs.b t0, t1, t2, t3
# CHECK-ERROR: error: invalid instruction
cv.abs.b t0, t1, t2
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.abs.b t0, t1, 0
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.abs.b t0, t1, 0
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
//===----------------------------------------------------------------------===//
// cv.dotup.h
@@ -1940,7 +1940,7 @@ cv.dotup.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotup.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.dotup.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1962,7 +1962,7 @@ cv.dotup.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotup.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.dotup.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1984,7 +1984,7 @@ cv.dotup.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotup.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.dotup.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2006,7 +2006,7 @@ cv.dotup.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotup.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.dotup.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2078,7 +2078,7 @@ cv.dotusp.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotusp.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.dotusp.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2100,7 +2100,7 @@ cv.dotusp.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotusp.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.dotusp.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2122,7 +2122,7 @@ cv.dotusp.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotusp.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.dotusp.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2144,7 +2144,7 @@ cv.dotusp.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotusp.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.dotusp.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2210,7 +2210,7 @@ cv.dotsp.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotsp.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.dotsp.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2232,7 +2232,7 @@ cv.dotsp.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotsp.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.dotsp.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2254,7 +2254,7 @@ cv.dotsp.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotsp.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.dotsp.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2276,7 +2276,7 @@ cv.dotsp.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotsp.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.dotsp.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2342,7 +2342,7 @@ cv.sdotup.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotup.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sdotup.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2364,7 +2364,7 @@ cv.sdotup.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotup.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sdotup.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2386,7 +2386,7 @@ cv.sdotup.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotup.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sdotup.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2408,7 +2408,7 @@ cv.sdotup.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotup.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sdotup.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2480,7 +2480,7 @@ cv.sdotusp.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sdotusp.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2502,7 +2502,7 @@ cv.sdotusp.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sdotusp.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2524,7 +2524,7 @@ cv.sdotusp.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sdotusp.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2546,7 +2546,7 @@ cv.sdotusp.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sdotusp.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2612,7 +2612,7 @@ cv.sdotsp.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sdotsp.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2634,7 +2634,7 @@ cv.sdotsp.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sdotsp.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2656,7 +2656,7 @@ cv.sdotsp.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sdotsp.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2678,7 +2678,7 @@ cv.sdotsp.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sdotsp.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2894,7 +2894,7 @@ cv.shuffle.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.shuffle.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.shuffle.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2916,7 +2916,7 @@ cv.shuffle.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.shuffle.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.shuffle.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3063,7 +3063,7 @@ cv.shuffle2.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.shuffle2.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.shuffle2.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3085,7 +3085,7 @@ cv.shuffle2.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.shuffle2.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.shuffle2.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3107,7 +3107,7 @@ cv.pack t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.pack t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.pack t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3129,7 +3129,7 @@ cv.pack.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.pack.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.pack.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3151,7 +3151,7 @@ cv.packhi.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.packhi.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.packhi.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3173,7 +3173,7 @@ cv.packlo.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.packlo.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.packlo.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3195,7 +3195,7 @@ cv.cmpeq.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpeq.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3217,7 +3217,7 @@ cv.cmpeq.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpeq.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3239,7 +3239,7 @@ cv.cmpeq.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpeq.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3261,7 +3261,7 @@ cv.cmpeq.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpeq.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3327,7 +3327,7 @@ cv.cmpne.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpne.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpne.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3349,7 +3349,7 @@ cv.cmpne.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpne.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpne.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3371,7 +3371,7 @@ cv.cmpne.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpne.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpne.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3393,7 +3393,7 @@ cv.cmpne.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpne.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpne.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3459,7 +3459,7 @@ cv.cmpgt.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpgt.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3481,7 +3481,7 @@ cv.cmpgt.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpgt.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3503,7 +3503,7 @@ cv.cmpgt.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpgt.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3525,7 +3525,7 @@ cv.cmpgt.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpgt.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3591,7 +3591,7 @@ cv.cmpge.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpge.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpge.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3613,7 +3613,7 @@ cv.cmpge.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpge.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpge.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3635,7 +3635,7 @@ cv.cmpge.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpge.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpge.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3657,7 +3657,7 @@ cv.cmpge.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpge.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpge.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3723,7 +3723,7 @@ cv.cmplt.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmplt.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmplt.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3745,7 +3745,7 @@ cv.cmplt.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmplt.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmplt.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3767,7 +3767,7 @@ cv.cmplt.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmplt.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmplt.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3789,7 +3789,7 @@ cv.cmplt.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmplt.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmplt.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3855,7 +3855,7 @@ cv.cmple.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmple.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmple.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3877,7 +3877,7 @@ cv.cmple.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmple.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmple.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3899,7 +3899,7 @@ cv.cmple.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmple.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmple.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3921,7 +3921,7 @@ cv.cmple.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmple.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmple.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3987,7 +3987,7 @@ cv.cmpgtu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpgtu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4009,7 +4009,7 @@ cv.cmpgtu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpgtu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4031,7 +4031,7 @@ cv.cmpgtu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpgtu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4053,7 +4053,7 @@ cv.cmpgtu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpgtu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4125,7 +4125,7 @@ cv.cmpgeu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpgeu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4147,7 +4147,7 @@ cv.cmpgeu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpgeu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4169,7 +4169,7 @@ cv.cmpgeu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpgeu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4191,7 +4191,7 @@ cv.cmpgeu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpgeu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4263,7 +4263,7 @@ cv.cmpltu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpltu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4285,7 +4285,7 @@ cv.cmpltu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpltu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4307,7 +4307,7 @@ cv.cmpltu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpltu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4329,7 +4329,7 @@ cv.cmpltu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpltu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4401,7 +4401,7 @@ cv.cmpleu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpleu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4423,7 +4423,7 @@ cv.cmpleu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpleu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4445,7 +4445,7 @@ cv.cmpleu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpleu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4467,7 +4467,7 @@ cv.cmpleu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cmpleu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4539,7 +4539,7 @@ cv.cplxmul.r t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.r t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cplxmul.r t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4561,7 +4561,7 @@ cv.cplxmul.i t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.i t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cplxmul.i t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4583,7 +4583,7 @@ cv.cplxmul.r.div2 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.r.div2 t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cplxmul.r.div2 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4605,7 +4605,7 @@ cv.cplxmul.i.div2 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.i.div2 t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cplxmul.i.div2 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4627,7 +4627,7 @@ cv.cplxmul.r.div4 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.r.div4 t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cplxmul.r.div4 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4649,7 +4649,7 @@ cv.cplxmul.i.div4 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.i.div4 t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cplxmul.i.div4 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4671,7 +4671,7 @@ cv.cplxmul.r.div8 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.r.div8 t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cplxmul.r.div8 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4693,7 +4693,7 @@ cv.cplxmul.i.div8 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.i.div8 t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cplxmul.i.div8 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4718,13 +4718,13 @@ cv.cplxconj t0, t1, t2, t3
# CHECK-ERROR: error: invalid instruction
cv.cplxconj t0, t1, t2
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cplxconj t0, t1, 0
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.cplxconj t0, t1, 0
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
//===----------------------------------------------------------------------===//
// cv.subrotmj
@@ -4737,7 +4737,7 @@ cv.subrotmj t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.subrotmj t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.subrotmj t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4759,7 +4759,7 @@ cv.subrotmj.div2 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.subrotmj.div2 t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.subrotmj.div2 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4781,7 +4781,7 @@ cv.subrotmj.div4 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.subrotmj.div4 t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.subrotmj.div4 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4803,7 +4803,7 @@ cv.subrotmj.div8 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.subrotmj.div8 t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.subrotmj.div8 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4825,7 +4825,7 @@ cv.add.div2 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.div2 t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.add.div2 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4847,7 +4847,7 @@ cv.add.div4 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.div4 t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.add.div4 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4869,7 +4869,7 @@ cv.add.div8 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.div8 t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.add.div8 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4891,7 +4891,7 @@ cv.sub.div2 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.div2 t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sub.div2 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4913,7 +4913,7 @@ cv.sub.div4 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.div4 t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sub.div4 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4935,7 +4935,7 @@ cv.sub.div8 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.div8 t0, t1, t2, t3
-# CHECK-ERROR: error: too many operands for instruction
+# CHECK-ERROR: error: invalid operand for instruction
cv.sub.div8 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/insn-invalid.s b/llvm/test/MC/RISCV/insn-invalid.s
index 957603fd8ebe1..8d7d7a1d7cb3e 100644
--- a/llvm/test/MC/RISCV/insn-invalid.s
+++ b/llvm/test/MC/RISCV/insn-invalid.s
@@ -1,8 +1,8 @@
# RUN: not llvm-mc -triple riscv32 < %s 2>&1 | FileCheck %s
# Too many operands
-.insn i 0x13, 0, a0, a1, 13, 14 # CHECK: :[[@LINE]]:33: error: too many operands for instruction
-.insn r 0x43, 0, 0, fa0, fa1, fa2, fa3, fa4 # CHECK: :[[@LINE]]:44: error: too many operands for instruction
+.insn i 0x13, 0, a0, a1, 13, 14 # CHECK: :[[@LINE]]:33: error: invalid operand for instruction
+.insn r 0x43, 0, 0, fa0, fa1, fa2, fa3, fa4 # CHECK: :[[@LINE]]:44: error: invalid operand for instruction
# Too few operands
.insn r 0x33, 0, 0, a0, a1 # CHECK: :[[@LINE]]:30: error: too few operands for instruction
diff --git a/llvm/test/MC/RISCV/insn_c-invalid.s b/llvm/test/MC/RISCV/insn_c-invalid.s
index ed97db62facf0..746f20d4937f6 100644
--- a/llvm/test/MC/RISCV/insn_c-invalid.s
+++ b/llvm/test/MC/RISCV/insn_c-invalid.s
@@ -1,8 +1,8 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+c < %s 2>&1 | FileCheck %s
# Too many operands
-.insn ci 1, 0, a0, 13, 14 # CHECK: :[[#@LINE]]:25: error: too many operands for instruction
-.insn cr 2, 9, a0, a1, a2 # CHECK: :[[#@LINE]]:25: error: too many operands for instruction
+.insn ci 1, 0, a0, 13, 14 # CHECK: :[[#@LINE]]:25: error: invalid operand for instruction
+.insn cr 2, 9, a0, a1, a2 # CHECK: :[[#@LINE]]:25: error: invalid operand for instruction
## Too few operands
.insn ci 1, 0, a0 # CHECK: :[[#@LINE]]:19: error: too few operands for instruction
diff --git a/llvm/test/MC/RISCV/insn_xqci-invalid.s b/llvm/test/MC/RISCV/insn_xqci-invalid.s
index 13671f13fa69b..70af799b37ca3 100644
--- a/llvm/test/MC/RISCV/insn_xqci-invalid.s
+++ b/llvm/test/MC/RISCV/insn_xqci-invalid.s
@@ -17,7 +17,7 @@
# CHECK-ERR: [[@LINE-1]]:30: error: immediate must be an integer in the range [-2147483648, 4294967295]
.insn qc.eai 126, 7, 1, x31, 0xFFFFFFFF, extra
-# CHECK-ERR: [[@LINE-1]]:42: error: too many operands for instruction
+# CHECK-ERR: [[@LINE-1]]:42: error: invalid operand for instruction
.insn qc.ei 128, 0, 0, x31, x0, 0
# CHECK-ERR: [[@LINE-1]]:13: error: opcode must be a valid opcode name or an immediate in the range [0, 127]
@@ -38,7 +38,7 @@
# CHECK-ERR: [[@LINE-1]]:34: error: immediate must be an integer in the range [-33554432, 33554431]
.insn qc.ei 127, 7, 3, x31, x31, 0x1000000, extra
-# CHECK-ERR: [[@LINE-1]]:45: error: too many operands for instruction
+# CHECK-ERR: [[@LINE-1]]:45: error: invalid operand for instruction
.insn qc.ei 126, 7, 3, x31, 0x2000000(x0)
# CHECK-ERR: [[@LINE-1]]:29: error: immediate must be an integer in the range [-33554432, 33554431]
@@ -65,7 +65,7 @@
# CHECK-ERR: [[@LINE-1]]:38: error: immediate must be a multiple of 2 bytes in the range [-4096, 4094]
.insn qc.eb 127, 7, 31, x31, 0x4000, 0x800, extra
-# CHECK-ERR: [[@LINE-1]]:45: error: too many operands for instruction
+# CHECK-ERR: [[@LINE-1]]:45: error: invalid operand for instruction
.insn qc.ej 128, 0, 0, 0, 0
@@ -84,7 +84,7 @@
# CHECK-ERR: [[@LINE-1]]:28: error: operand must be a multiple of 2 bytes in the range [-2147483648, 2147483646]
.insn qc.ej 127, 7, 3, 31, 0x80000000, extra
-# CHECK-ERR: [[@LINE-1]]:40: error: too many operands for instruction
+# CHECK-ERR: [[@LINE-1]]:40: error: invalid operand for instruction
.insn qc.es 128, 0, 0, x0, 0(x0)
# CHECK-ERR: [[@LINE-1]]:13: error: opcode must be a valid opcode name or an immediate in the range [0, 127]
diff --git a/llvm/test/MC/RISCV/priv-invalid.s b/llvm/test/MC/RISCV/priv-invalid.s
index 89e13948a9862..9c07d3e58b14f 100644
--- a/llvm/test/MC/RISCV/priv-invalid.s
+++ b/llvm/test/MC/RISCV/priv-invalid.s
@@ -1,10 +1,10 @@
# RUN: not llvm-mc -triple riscv32 < %s 2>&1 | FileCheck %s
-mret 0x10 # CHECK: :[[@LINE]]:6: error: too many operands for instruction
+mret 0x10 # CHECK: :[[@LINE]]:6: error: invalid operand for instruction
-sfence.vma zero, a1, a2 # CHECK: :[[@LINE]]:22: error: too many operands for instruction
+sfence.vma zero, a1, a2 # CHECK: :[[@LINE]]:22: error: invalid operand for instruction
-sfence.vma a0, 0x10 # CHECK: :[[@LINE]]:16: error: too many operands for instruction
+sfence.vma a0, 0x10 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
sinval.vma zero, a1, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
@@ -16,11 +16,11 @@ sfence.inval.ir 0x10 # CHECK: :[[@LINE]]:1: error: invalid instruction
hfence.vvma zero, a1, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
-hfence.vvma a0, 0x10 # CHECK: :[[@LINE]]:17: error: too many operands for instruction
+hfence.vvma a0, 0x10 # CHECK: :[[@LINE]]:17: error: invalid operand for instruction
hfence.gvma zero, a1, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
-hfence.gvma a0, 0x10 # CHECK: :[[@LINE]]:17: error: too many operands for instruction
+hfence.gvma a0, 0x10 # CHECK: :[[@LINE]]:17: error: invalid operand for instruction
hinval.vvma zero, a1, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rv32c-invalid.s b/llvm/test/MC/RISCV/rv32c-invalid.s
index 8ae59f1b0be19..12be594491d02 100644
--- a/llvm/test/MC/RISCV/rv32c-invalid.s
+++ b/llvm/test/MC/RISCV/rv32c-invalid.s
@@ -42,7 +42,7 @@ c.jalr zero
c.mv ra, x0
# CHECK: :[[#@LINE-1]]:11: error: register must be a GPR excluding zero (x0)
c.add ra, ra, x0
-# CHECK: :[[#@LINE-1]]:16: error: too many operands for instruction
+# CHECK: :[[#@LINE-1]]:16: error: invalid operand for instruction
## GPRNoX2
c.lui x2, 4
@@ -93,7 +93,7 @@ c.addi t0, %hi(foo)
## simm6nonzero
c.nop 32
# CHECK: :[[#@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[#@LINE-2]]:7: note: too many operands for instruction
+# CHECK: :[[#@LINE-2]]:7: note: invalid operand for instruction
# CHECK: :[[#@LINE-3]]:7: note: immediate must be non-zero in the range [-32, 31]
## c_lui_imm
diff --git a/llvm/test/MC/RISCV/rv32h-invalid.s b/llvm/test/MC/RISCV/rv32h-invalid.s
index 8ac0efd93a619..1128b22195bb8 100644
--- a/llvm/test/MC/RISCV/rv32h-invalid.s
+++ b/llvm/test/MC/RISCV/rv32h-invalid.s
@@ -5,7 +5,7 @@
hfence.vvma zero, zero
# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-2]]:19: note: too many operands for instruction
+# CHECK: :[[@LINE-2]]:19: note: invalid operand for instruction
# CHECK: :[[@LINE-3]]:1: note: instruction requires the following: 'H' (Hypervisor)
hlv.h a0, 0(a1) # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'H' (Hypervisor)
diff --git a/llvm/test/MC/RISCV/rv32i-aliases-invalid.s b/llvm/test/MC/RISCV/rv32i-aliases-invalid.s
index 489a6d533cc06..5393737dabc28 100644
--- a/llvm/test/MC/RISCV/rv32i-aliases-invalid.s
+++ b/llvm/test/MC/RISCV/rv32i-aliases-invalid.s
@@ -5,110 +5,169 @@
# TODO ld
# TODO sd
-li x0, 4294967296 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
-# CHECK: :[[@LINE-2]]:8: note: immediate must be an integer in the range [-2147483648, 4294967295]
-li x0, -2147483649 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
-# CHECK: :[[@LINE-2]]:8: note: immediate must be an integer in the range [-2147483648, 4294967295]
-li t4, foo # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
-# CHECK: :[[@LINE-2]]:8: note: immediate must be an integer in the range [-2147483648, 4294967295]
-
-la x0, 4294967296 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la x0, -2147483649 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la a1, foo+foo # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la x1, %pcrel_hi(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la x1, %pcrel_lo(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la x1, %pcrel_hi(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la x1, %pcrel_lo(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la x1, %hi(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la x1, %lo(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la x1, %hi(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-la x1, %lo(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-
-lla x0, 4294967296 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla x0, -2147483649 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla a1, foo+foo # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla x1, %pcrel_hi(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla x1, %pcrel_lo(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla x1, %pcrel_hi(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla x1, %pcrel_lo(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla x1, %hi(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla x1, %lo(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla x1, %hi(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
-lla x1, %lo(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+li x0, 4294967296
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK: :[[@LINE-3]]:8: note: immediate must be an integer in the range [-2147483648, 4294967295]
+
+li x0, -2147483649
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK: :[[@LINE-3]]:8: note: immediate must be an integer in the range [-2147483648, 4294967295]
+
+li t4, foo
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK: :[[@LINE-3]]:8: note: immediate must be an integer in the range [-2147483648, 4294967295]
+
+la x0, 4294967296
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+la x0, -2147483649
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+la a1, foo+foo
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+la x1, %pcrel_hi(1234)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+la x1, %pcrel_lo(1234)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+la x1, %pcrel_hi(foo)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+la x1, %pcrel_lo(foo)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+la x1, %hi(1234)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+la x1, %lo(1234)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+la x1, %hi(foo)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+la x1, %lo(foo)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+lla x0, 4294967296
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+lla x0, -2147483649
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+lla a1, foo+foo
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+lla x1, %pcrel_hi(1234)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+lla x1, %pcrel_lo(1234)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+lla x1, %pcrel_hi(foo)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+lla x1, %pcrel_lo(foo)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+lla x1, %hi(1234)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+lla x1, %lo(1234)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+lla x1, %hi(foo)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
+lla x1, %lo(foo)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
lla a2, foo at plt # CHECK: :[[@LINE]]:12: error: unexpected token
negw x1, x2 # CHECK: :[[@LINE]]:1: error: instruction requires the following: RV64I Base Instruction Set{{$}}
sext.w x3, x4 # CHECK: :[[@LINE]]:1: error: instruction requires the following: RV64I Base Instruction Set{{$}}
-zext.w x3, x4 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:1: note: instruction requires the following: 'Zba' (Address Generation Instructions), RV64I Base Instruction Set
-# CHECK: :[[@LINE-2]]:1: note: instruction requires the following: RV64I Base Instruction Set{{$}}
-
-sll x2, x3, 32 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 31]
-srl x2, x3, 32 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 31]
-sra x2, x3, 32 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 31]
-
-sll x2, x3, -1 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 31]
-srl x2, x3, -2 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 31]
-sra x2, x3, -3 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 31]
+
+zext.w x3, x4
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:1: note: instruction requires the following: 'Zba' (Address Generation Instructions), RV64I Base Instruction Set
+# CHECK: :[[@LINE-3]]:1: note: instruction requires the following: RV64I Base Instruction Set{{$}}
+
+sll x2, x3, 32
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:13: note: immediate must be an integer in the range [0, 31]
+
+srl x2, x3, 32
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:13: note: immediate must be an integer in the range [0, 31]
+
+sra x2, x3, 32
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:13: note: immediate must be an integer in the range [0, 31]
+
+sll x2, x3, -1
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:13: note: immediate must be an integer in the range [0, 31]
+
+srl x2, x3, -2
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:13: note: immediate must be an integer in the range [0, 31]
+
+sra x2, x3, -3
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:13: note: immediate must be an integer in the range [0, 31]
addi x1, . # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rv32i-invalid.s b/llvm/test/MC/RISCV/rv32i-invalid.s
index e3b516c33fe0c..11533308782d1 100644
--- a/llvm/test/MC/RISCV/rv32i-invalid.s
+++ b/llvm/test/MC/RISCV/rv32i-invalid.s
@@ -148,7 +148,7 @@ auipc a0, %pcrel_lo(foo) # CHECK: :[[@LINE]]:11: error: operand must be a symbol
# TP-relative symbol names require a %tprel_add modifier.
add a0, a0, tp, zero # CHECK: :[[@LINE]]:17: error: expected '%' relocation specifier
add a0, a0, tp, %hi(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:17: note: too many operands for instruction
+# CHECK: :[[@LINE-1]]:17: note: invalid operand for instruction
# CHECK: :[[@LINE-2]]:17: note: operand must be a symbol with %tprel_add specifier
add a0, tp, a0, %tprel_add(foo) # CHECK: :[[@LINE]]:13: error: the second input operand must be tp/x4 when using %tprel_add specifier
@@ -177,10 +177,10 @@ xori sp, 22, 220 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
sub t0, t2, 1 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
# Too many operands
-sltiu s2, s3, 0x50, 0x60 # CHECK: :[[@LINE]]:21: error: too many operands for instruction
+sltiu s2, s3, 0x50, 0x60 # CHECK: :[[@LINE]]:21: error: invalid operand for instruction
# Memory operand not formatted correctly
-lw a4, a5, 111 # CHECK: :[[@LINE]]:12: error: too many operands for instruction
+lw a4, a5, 111 # CHECK: :[[@LINE]]:12: error: invalid operand for instruction
# Too few operands
ori a0, a1 # CHECK: :[[@LINE]]:11: error: too few operands for instruction
diff --git a/llvm/test/MC/RISCV/rv32zalrsc-invalid.s b/llvm/test/MC/RISCV/rv32zalrsc-invalid.s
index 5a2826d168e1e..b1eb982a9763d 100644
--- a/llvm/test/MC/RISCV/rv32zalrsc-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zalrsc-invalid.s
@@ -5,4 +5,4 @@
lr.w a4, a5 # CHECK: :[[@LINE]]:10: error: expected '(' or optional integer offset
# lr only takes two operands
-lr.w s0, (s1), s2 # CHECK: :[[@LINE]]:16: error: too many operands for instruction
+lr.w s0, (s1), s2 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rv32zbb-invalid.s b/llvm/test/MC/RISCV/rv32zbb-invalid.s
index 31c2eaf2b1a37..48b55db444a0b 100644
--- a/llvm/test/MC/RISCV/rv32zbb-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zbb-invalid.s
@@ -1,15 +1,15 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+zbb < %s 2>&1 | FileCheck %s
# Too many operands
-clz t0, t1, t2 # CHECK: :[[@LINE]]:13: error: too many operands for instruction
+clz t0, t1, t2 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
# Too many operands
-ctz t0, t1, t2 # CHECK: :[[@LINE]]:13: error: too many operands for instruction
+ctz t0, t1, t2 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
# Too many operands
-cpop t0, t1, t2 # CHECK: :[[@LINE]]:14: error: too many operands for instruction
+cpop t0, t1, t2 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
# Too many operands
-sext.b t0, t1, t2 # CHECK: :[[@LINE]]:16: error: too many operands for instruction
+sext.b t0, t1, t2 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
# Too many operands
-sext.h t0, t1, t2 # CHECK: :[[@LINE]]:16: error: too many operands for instruction
+sext.h t0, t1, t2 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
# Too few operands
min t0, t1 # CHECK: :[[@LINE]]:11: error: too few operands for instruction
# Too few operands
diff --git a/llvm/test/MC/RISCV/rv32zcmop-invalid.s b/llvm/test/MC/RISCV/rv32zcmop-invalid.s
index c550d903ace26..c434421e02752 100644
--- a/llvm/test/MC/RISCV/rv32zcmop-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zcmop-invalid.s
@@ -2,6 +2,6 @@
c.mop.0 # CHECK: :[[@LINE]]:1: error: unrecognized instruction mnemonic, did you mean: c.mop.1, c.mop.3, c.mop.5, c.mop.7, c.mop.9?
-c.mop.1 t0 # CHECK: :[[@LINE]]:9: error: too many operands for instruction
+c.mop.1 t0 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
-c.mop.1 0x0 # CHECK: :[[@LINE]]:9: error: too many operands for instruction
+c.mop.1 0x0 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rv64h-invalid.s b/llvm/test/MC/RISCV/rv64h-invalid.s
index f77d6e7ac2a86..46bf99e1df93a 100644
--- a/llvm/test/MC/RISCV/rv64h-invalid.s
+++ b/llvm/test/MC/RISCV/rv64h-invalid.s
@@ -4,7 +4,7 @@
# RUN: | FileCheck %s -check-prefixes=CHECK,CHECK-OFFSET
hfence.vvma zero, zero # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:19: note: too many operands for instruction
+# CHECK: :[[@LINE-1]]:19: note: invalid operand for instruction
# CHECK: :[[@LINE-2]]:1: note: instruction requires the following: 'H' (Hypervisor)
hlv.h a0, 0(a1) # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'H' (Hypervisor)
diff --git a/llvm/test/MC/RISCV/rv64zalrsc-invalid.s b/llvm/test/MC/RISCV/rv64zalrsc-invalid.s
index cfd0e6ceed5ba..4a9d55e752f06 100644
--- a/llvm/test/MC/RISCV/rv64zalrsc-invalid.s
+++ b/llvm/test/MC/RISCV/rv64zalrsc-invalid.s
@@ -5,4 +5,4 @@
lr.d a4, a5 # CHECK: :[[@LINE]]:10: error: expected '(' or optional integer offset
# lr only takes two operands
-lr.d s0, (s1), s2 # CHECK: :[[@LINE]]:16: error: too many operands for instruction
+lr.d s0, (s1), s2 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rv64zbb-invalid.s b/llvm/test/MC/RISCV/rv64zbb-invalid.s
index 1b3d1e8a30e35..4b0cb1c57c779 100644
--- a/llvm/test/MC/RISCV/rv64zbb-invalid.s
+++ b/llvm/test/MC/RISCV/rv64zbb-invalid.s
@@ -1,11 +1,11 @@
# RUN: not llvm-mc -triple riscv64 -mattr=+zbb < %s 2>&1 | FileCheck %s
# Too many operands
-clzw t0, t1, t2 # CHECK: :[[@LINE]]:14: error: too many operands for instruction
+clzw t0, t1, t2 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
# Too many operands
-ctzw t0, t1, t2 # CHECK: :[[@LINE]]:14: error: too many operands for instruction
+ctzw t0, t1, t2 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
# Too many operands
-cpopw t0, t1, t2 # CHECK: :[[@LINE]]:15: error: too many operands for instruction
+cpopw t0, t1, t2 # CHECK: :[[@LINE]]:15: error: invalid operand for instruction
# Too few operands
rolw t0, t1 # CHECK: :[[@LINE]]:12: error: too few operands for instruction
# Too few operands
diff --git a/llvm/test/MC/RISCV/rvc-hints-invalid.s b/llvm/test/MC/RISCV/rvc-hints-invalid.s
index 444fdb111d814..0ff2845f41a83 100644
--- a/llvm/test/MC/RISCV/rvc-hints-invalid.s
+++ b/llvm/test/MC/RISCV/rvc-hints-invalid.s
@@ -5,7 +5,7 @@
c.nop 0
# CHECK: :[[#@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[#@LINE-2]]:7: note: too many operands for instruction
+# CHECK: :[[#@LINE-2]]:7: note: invalid operand for instruction
# CHECK: :[[#@LINE-3]]:7: note: immediate must be non-zero in the range [-32, 31]
c.addi x0, 33
diff --git a/llvm/test/MC/RISCV/rvv/invalid.s b/llvm/test/MC/RISCV/rvv/invalid.s
index 886553b1f8073..63b920d9cd255 100644
--- a/llvm/test/MC/RISCV/rvv/invalid.s
+++ b/llvm/test/MC/RISCV/rvv/invalid.s
@@ -559,7 +559,7 @@ vadd.vi v0, v2, 1, v0.t
vmsge.vx v0, v4, a0, v0.t
# CHECK-ERROR: invalid instruction, any one of the following would fix this:
# CHECK-ERROR-LABEL: vmsge.vx v0, v4, a0, v0.t
-# CHECK-ERROR: note: too many operands for instruction
+# CHECK-ERROR: note: invalid operand for instruction
# CHECK-ERROR: note: invalid operand for instruction
# CHECK-ERROR: note: too few operands for instruction
@@ -740,10 +740,10 @@ vmv8r.v v0, v7
# CHECK-ERROR: invalid operand for instruction
vmsge.vx v2, v4, a0, v0.t, v0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
vmsgeu.vx v2, v4, a0, v0.t, v0
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
vmsge.vx v2, v4, a0, v0.t, v2
# CHECK-ERROR: the temporary vector register cannot be the same as the destination register
diff --git a/llvm/test/MC/RISCV/rvv/zvvfmm-invalid.s b/llvm/test/MC/RISCV/rvv/zvvfmm-invalid.s
index b74c7e7bffe76..5a1ff88d3d60e 100644
--- a/llvm/test/MC/RISCV/rvv/zvvfmm-invalid.s
+++ b/llvm/test/MC/RISCV/rvv/zvvfmm-invalid.s
@@ -2,12 +2,12 @@
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
vfmmacc.vv v8, v4, v20, v0.t
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
# CHECK-ERROR-LABEL: vfmmacc.vv v8, v4, v20, v0.t
# vm=0 is reserved for non-widening vfmmacc.vv.
vfmmacc.vv v8, v4, v20, v0.scale
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
# CHECK-ERROR-LABEL: vfmmacc.vv v8, v4, v20, v0.scale
vfwmmacc.vv v8, v4, v20, v0.t
@@ -16,7 +16,7 @@ vfwmmacc.vv v8, v4, v20, v0.t
vfwmmacc.vv v8, v4, v20, v1.scale
# CHECK-ERROR: error: invalid instruction, any one of the following would fix this:
-# CHECK-ERROR: note: too many operands for instruction
+# CHECK-ERROR: note: invalid operand for instruction
# CHECK-ERROR: note: operand must be v0.scale
# CHECK-ERROR: vfwmmacc.vv v8, v4, v20, v1.scale
@@ -26,7 +26,7 @@ vfqmmacc.vv v8, v4, v20, v0.t
vfqmmacc.vv v8, v4, v20, v1.scale
# CHECK-ERROR: error: invalid instruction, any one of the following would fix this:
-# CHECK-ERROR: note: too many operands for instruction
+# CHECK-ERROR: note: invalid operand for instruction
# CHECK-ERROR: note: operand must be v0.scale
# CHECK-ERROR: vfqmmacc.vv v8, v4, v20, v1.scale
@@ -36,7 +36,7 @@ vf8wmmacc.vv v8, v4, v20, v0.t
vf8wmmacc.vv v8, v4, v20, v1.scale
# CHECK-ERROR: error: invalid instruction, any one of the following would fix this:
-# CHECK-ERROR: note: too many operands for instruction
+# CHECK-ERROR: note: invalid operand for instruction
# CHECK-ERROR: note: operand must be v0.scale
# CHECK-ERROR: vf8wmmacc.vv v8, v4, v20, v1.scale
diff --git a/llvm/test/MC/RISCV/rvv/zvvmm-invalid.s b/llvm/test/MC/RISCV/rvv/zvvmm-invalid.s
index 298a04faf7d90..7cccf11b8d1ea 100644
--- a/llvm/test/MC/RISCV/rvv/zvvmm-invalid.s
+++ b/llvm/test/MC/RISCV/rvv/zvvmm-invalid.s
@@ -2,17 +2,17 @@
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
vmmacc.vv v8, v4, v20, v0.t
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
# CHECK-ERROR-LABEL: vmmacc.vv v8, v4, v20, v0.t
vwmmacc.vv v8, v4, v20, v0.t
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
# CHECK-ERROR-LABEL: vwmmacc.vv v8, v4, v20, v0.t
vqmmacc.vv v8, v4, v20, v0.t
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
# CHECK-ERROR-LABEL: vqmmacc.vv v8, v4, v20, v0.t
v8wmmacc.vv v8, v4, v20, v0.t
-# CHECK-ERROR: too many operands for instruction
+# CHECK-ERROR: invalid operand for instruction
# CHECK-ERROR-LABEL: v8wmmacc.vv v8, v4, v20, v0.t
diff --git a/llvm/test/MC/RISCV/rvv/zvvmtls-invalid.s b/llvm/test/MC/RISCV/rvv/zvvmtls-invalid.s
index 7e23830fa8145..20a5b3400097b 100644
--- a/llvm/test/MC/RISCV/rvv/zvvmtls-invalid.s
+++ b/llvm/test/MC/RISCV/rvv/zvvmtls-invalid.s
@@ -14,7 +14,7 @@ vmtl.v v8, (a0), a1, L4, v1.t
# CHECK: error: operand must be v0.t
vmtl.v v8, (a0), a1, v0.t, L4
-# CHECK: error: too many operands for instruction
+# CHECK: error: invalid operand for instruction
vmts.v v12, (a0), a1, L0
# CHECK: error: operand must be L1, L2, L4, L8, L16, L32, or L64
@@ -29,4 +29,4 @@ vmts.v v12, (a0), a1, L4, v1.t
# CHECK: error: operand must be v0.t
vmts.v v12, (a0), a1, v0.t, L4
-# CHECK: error: too many operands for instruction
+# CHECK: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rvv/zvvmttls-invalid.s b/llvm/test/MC/RISCV/rvv/zvvmttls-invalid.s
index 14357bf51fc3b..226680f32b7c5 100644
--- a/llvm/test/MC/RISCV/rvv/zvvmttls-invalid.s
+++ b/llvm/test/MC/RISCV/rvv/zvvmttls-invalid.s
@@ -14,7 +14,7 @@ vmttl.v v8, (a0), a1, L4, v1.t
# CHECK: error: operand must be v0.t
vmttl.v v8, (a0), a1, v0.t, L4
-# CHECK: error: too many operands for instruction
+# CHECK: error: invalid operand for instruction
vmtts.v v12, (a0), a1, L0
# CHECK: error: operand must be L1, L2, L4, L8, L16, L32, or L64
@@ -29,4 +29,4 @@ vmtts.v v12, (a0), a1, L4, v1.t
# CHECK: error: operand must be v0.t
vmtts.v v12, (a0), a1, v0.t, L4
-# CHECK: error: too many operands for instruction
+# CHECK: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rvzicond-invalid.s b/llvm/test/MC/RISCV/rvzicond-invalid.s
index 6331ad7806e1e..79e67335941a3 100644
--- a/llvm/test/MC/RISCV/rvzicond-invalid.s
+++ b/llvm/test/MC/RISCV/rvzicond-invalid.s
@@ -11,8 +11,8 @@ czero.nez a4, a3, foo # CHECK: :[[@LINE]]:19: error: invalid operand for instruc
czero.eqz t1, 2, t3 # CHECK: :[[@LINE]]:15: error: invalid operand for instruction
# Too many operands
-czero.eqz t1, t2, t3, t4 # CHECK: :[[@LINE]]:23: error: too many operands for instruction
-czero.nez t1, t2, t3, 4 # CHECK: :[[@LINE]]:23: error: too many operands for instruction
+czero.eqz t1, t2, t3, t4 # CHECK: :[[@LINE]]:23: error: invalid operand for instruction
+czero.nez t1, t2, t3, 4 # CHECK: :[[@LINE]]:23: error: invalid operand for instruction
# Too few operands
czero.eqz t1, t2 # CHECK: :[[@LINE]]:17: error: too few operands for instruction
diff --git a/llvm/test/MC/RISCV/rvzihintntl-invalid.s b/llvm/test/MC/RISCV/rvzihintntl-invalid.s
index d30145ba32ad6..ca5c91c554517 100644
--- a/llvm/test/MC/RISCV/rvzihintntl-invalid.s
+++ b/llvm/test/MC/RISCV/rvzihintntl-invalid.s
@@ -7,10 +7,10 @@
# RUN: not llvm-mc -triple riscv32 < %s 2>&1 | FileCheck %s
# RUN: not llvm-mc -triple riscv64 < %s 2>&1 | FileCheck %s
-ntl.p1 1 # CHECK: :[[@LINE]]:8: error: too many operands for instruction
-ntl.pall 2 # CHECK: :[[@LINE]]:10: error: too many operands for instruction
-ntl.s1 3 # CHECK: :[[@LINE]]:8: error: too many operands for instruction
-ntl.all 4 # CHECK: :[[@LINE]]:9: error: too many operands for instruction
+ntl.p1 1 # CHECK: :[[@LINE]]:8: error: invalid operand for instruction
+ntl.pall 2 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
+ntl.s1 3 # CHECK: :[[@LINE]]:8: error: invalid operand for instruction
+ntl.all 4 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
ntl.p1 t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
ntl.pall t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rvzihintntlc-invalid.s b/llvm/test/MC/RISCV/rvzihintntlc-invalid.s
index 19def8333d48b..4308321bc31a3 100644
--- a/llvm/test/MC/RISCV/rvzihintntlc-invalid.s
+++ b/llvm/test/MC/RISCV/rvzihintntlc-invalid.s
@@ -1,10 +1,10 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+zihintntl,+c < %s 2>&1 | FileCheck %s
# RUN: not llvm-mc -triple riscv64 -mattr=+zihintntl,+c < %s 2>&1 | FileCheck %s
-c.ntl.p1 1 # CHECK: :[[@LINE]]:10: error: too many operands for instruction
-c.ntl.pall 2 # CHECK: :[[@LINE]]:12: error: too many operands for instruction
-c.ntl.s1 3 # CHECK: :[[@LINE]]:10: error: too many operands for instruction
-c.ntl.all 4 # CHECK: :[[@LINE]]:11: error: too many operands for instruction
+c.ntl.p1 1 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
+c.ntl.pall 2 # CHECK: :[[@LINE]]:12: error: invalid operand for instruction
+c.ntl.s1 3 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
+c.ntl.all 4 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
c.ntl.p1 t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
c.ntl.pall t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/smrnmi-invalid.s b/llvm/test/MC/RISCV/smrnmi-invalid.s
index 76eee88caa924..1a5e692148b37 100644
--- a/llvm/test/MC/RISCV/smrnmi-invalid.s
+++ b/llvm/test/MC/RISCV/smrnmi-invalid.s
@@ -1,4 +1,4 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+smrnmi < %s 2>&1 | FileCheck %s
# RUN: not llvm-mc -triple riscv64 -mattr=+smrnmi < %s 2>&1 | FileCheck %s
-mnret 0x10 # CHECK: :[[@LINE]]:7: error: too many operands for instruction
+mnret 0x10 # CHECK: :[[@LINE]]:7: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/tlsdesc.s b/llvm/test/MC/RISCV/tlsdesc.s
index 635eeae9f2c5b..3fa4d2757b23c 100644
--- a/llvm/test/MC/RISCV/tlsdesc.s
+++ b/llvm/test/MC/RISCV/tlsdesc.s
@@ -44,7 +44,7 @@ start: # @start
auipc x1, %tlsdesc_call(1234) # ERR: :[[#@LINE]]:12: error: operand must be a symbol with a %pcrel_hi/%got_pcrel_hi/%tls_ie_pcrel_hi/%tls_gd_pcrel_hi specifier or an integer in the range
auipc a0, %tlsdesc_hi(a+b) # ERR: :[[#@LINE]]:12: error: operand must be a symbol with a %pcrel_hi/%got_pcrel_hi/%tls_ie_pcrel_hi/%tls_gd_pcrel_hi specifier or an integer in the range
- lw a0, t0, %tlsdesc_load_lo(a_symbol) # ERR: :[[#@LINE]]:15: error: too many operands for instruction
+ lw a0, t0, %tlsdesc_load_lo(a_symbol) # ERR: :[[#@LINE]]:15: error: invalid operand for instruction
lw a0, t0, %tlsdesc_load_lo(a_symbol)(a4) # ERR: :[[#@LINE]]:2: error: invalid instruction
addi a0, t0, %tlsdesc_add_lo(a_symbol)(a4) # ERR: :[[#@LINE]]:2: error: invalid instruction
@@ -52,7 +52,7 @@ start: # @start
addi x1, %tlsdesc_load_lo(a_symbol)(a0) # ERR: :[[#@LINE]]:2: error: invalid instruction
jalr x5, 0(a1), %tlsdesc_hi(a_symbol) # ERR: :[[#@LINE]]:2: error: invalid instruction, any one of the following would fix this:
- # ERR: :[[#@LINE-1]]:18: note: too many operands for instruction
+ # ERR: :[[#@LINE-1]]:18: note: invalid operand for instruction
# ERR: :[[#@LINE-2]]:18: note: operand must be a symbol with %tlsdesc_call specifier
jalr x1, 0(a1), %tlsdesc_call(a_symbol) # ERR: :[[#@LINE]]:13: error: the output operand must be t0/x5 when using %tlsdesc_call specifier
.endif
diff --git a/llvm/test/MC/RISCV/xmips-invalid.s b/llvm/test/MC/RISCV/xmips-invalid.s
index 73d142c4d3249..7023538b2cf86 100644
--- a/llvm/test/MC/RISCV/xmips-invalid.s
+++ b/llvm/test/MC/RISCV/xmips-invalid.s
@@ -2,13 +2,13 @@
# RUN: not llvm-mc -triple=riscv64 -mattr=+xmipslsp,+xmipscmov,+xmipscbop,+xmipsexectl < %s 2>&1 | FileCheck %s
mips.pause 10
-# CHECK: error: too many operands for instruction
+# CHECK: error: invalid operand for instruction
mips.ehb 10
-# CHECK: error: too many operands for instruction
+# CHECK: error: invalid operand for instruction
mips.ihb 10
-# CHECK: error: too many operands for instruction
+# CHECK: error: invalid operand for instruction
mips.pref 8, 512(a0)
# CHECK: error: immediate offset must be in the range [0, 511]
diff --git a/llvm/test/MC/RISCV/xqci-access-pseudos.s b/llvm/test/MC/RISCV/xqci-access-pseudos.s
index c3e77047682b4..882e25b0386c9 100644
--- a/llvm/test/MC/RISCV/xqci-access-pseudos.s
+++ b/llvm/test/MC/RISCV/xqci-access-pseudos.s
@@ -21,7 +21,7 @@ lb a0, 0(a1), %qc.access(extern1)
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_32 extern1
# CHECK-RELOC-NEXT: R_RISCV_RELAX
# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK-RV64: [[@LINE-8]]:15: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-8]]:15: note: invalid operand for instruction
# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
lbu a0, 0(a1), %qc.access(extern1)
@@ -32,7 +32,7 @@ lbu a0, 0(a1), %qc.access(extern1)
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_32 extern1
# CHECK-RELOC-NEXT: R_RISCV_RELAX
# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK-RV64: [[@LINE-8]]:16: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-8]]:16: note: invalid operand for instruction
# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
lh a2, 0(a3), %qc.access(extern2)
@@ -43,7 +43,7 @@ lh a2, 0(a3), %qc.access(extern2)
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_32 extern2
# CHECK-RELOC-NEXT: R_RISCV_RELAX
# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK-RV64: [[@LINE-8]]:15: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-8]]:15: note: invalid operand for instruction
# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
lhu a2, 0(a3), %qc.access(extern2)
@@ -54,7 +54,7 @@ lhu a2, 0(a3), %qc.access(extern2)
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_32 extern2
# CHECK-RELOC-NEXT: R_RISCV_RELAX
# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK-RV64: [[@LINE-8]]:16: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-8]]:16: note: invalid operand for instruction
# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
lw a4, 0(a5), %qc.access(extern4)
@@ -65,7 +65,7 @@ lw a4, 0(a5), %qc.access(extern4)
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_32 extern4
# CHECK-RELOC-NEXT: R_RISCV_RELAX
# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK-RV64: [[@LINE-8]]:15: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-8]]:15: note: invalid operand for instruction
# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
sb a0, 0(a1), %qc.access(extern1)
@@ -76,7 +76,7 @@ sb a0, 0(a1), %qc.access(extern1)
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_32 extern1
# CHECK-RELOC-NEXT: R_RISCV_RELAX
# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK-RV64: [[@LINE-8]]:15: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-8]]:15: note: invalid operand for instruction
# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
sh a2, 0(a3), %qc.access(extern2)
@@ -87,7 +87,7 @@ sh a2, 0(a3), %qc.access(extern2)
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_32 extern2
# CHECK-RELOC-NEXT: R_RISCV_RELAX
# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK-RV64: [[@LINE-8]]:15: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-8]]:15: note: invalid operand for instruction
# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
sw a4, 0(a5), %qc.access(extern4)
@@ -98,7 +98,7 @@ sw a4, 0(a5), %qc.access(extern4)
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_32 extern4
# CHECK-RELOC-NEXT: R_RISCV_RELAX
# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK-RV64: [[@LINE-8]]:15: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-8]]:15: note: invalid operand for instruction
# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
## No c.lb
@@ -111,7 +111,7 @@ c.lbu a0, 0(a1), %qc.access(extern1)
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_16 extern1
# CHECK-RELOC-NEXT: R_RISCV_RELAX
# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK-RV64: [[@LINE-8]]:18: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-8]]:18: note: invalid operand for instruction
# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
c.lh a2, 0(a3), %qc.access(extern2)
@@ -122,7 +122,7 @@ c.lh a2, 0(a3), %qc.access(extern2)
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_16 extern2
# CHECK-RELOC-NEXT: R_RISCV_RELAX
# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK-RV64: [[@LINE-8]]:17: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-8]]:17: note: invalid operand for instruction
# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
c.lhu a2, 0(a3), %qc.access(extern2)
@@ -133,7 +133,7 @@ c.lhu a2, 0(a3), %qc.access(extern2)
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_16 extern2
# CHECK-RELOC-NEXT: R_RISCV_RELAX
# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK-RV64: [[@LINE-8]]:18: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-8]]:18: note: invalid operand for instruction
# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
c.lw a4, 0(a5), %qc.access(extern4)
@@ -144,7 +144,7 @@ c.lw a4, 0(a5), %qc.access(extern4)
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_16 extern4
# CHECK-RELOC-NEXT: R_RISCV_RELAX
# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK-RV64: [[@LINE-8]]:17: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-8]]:17: note: invalid operand for instruction
# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
c.sb a0, 0(a1), %qc.access(extern1)
@@ -155,7 +155,7 @@ c.sb a0, 0(a1), %qc.access(extern1)
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_16 extern1
# CHECK-RELOC-NEXT: R_RISCV_RELAX
# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK-RV64: [[@LINE-8]]:17: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-8]]:17: note: invalid operand for instruction
# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
c.sh a2, 0(a3), %qc.access(extern2)
@@ -166,7 +166,7 @@ c.sh a2, 0(a3), %qc.access(extern2)
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_16 extern2
# CHECK-RELOC-NEXT: R_RISCV_RELAX
# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK-RV64: [[@LINE-8]]:17: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-8]]:17: note: invalid operand for instruction
# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
c.sw a4, 0(a5), %qc.access(extern4)
@@ -177,5 +177,5 @@ c.sw a4, 0(a5), %qc.access(extern4)
# CHECK-RELOC-NEXT: R_RISCV_QC_ACCESS_16 extern4
# CHECK-RELOC-NEXT: R_RISCV_RELAX
# CHECK-RV64: [[@LINE-7]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK-RV64: [[@LINE-8]]:17: note: too many operands for instruction
+# CHECK-RV64: [[@LINE-8]]:17: note: invalid operand for instruction
# CHECK-RV64: [[@LINE-9]]:1: note: instruction requires the following: RV32I Base Instruction Set
diff --git a/llvm/test/MC/RISCV/xqciint-invalid.s b/llvm/test/MC/RISCV/xqciint-invalid.s
index 34a45d4af3c96..b26cef448694a 100644
--- a/llvm/test/MC/RISCV/xqciint-invalid.s
+++ b/llvm/test/MC/RISCV/xqciint-invalid.s
@@ -8,7 +8,7 @@
# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
qc.setinti 1025
-# CHECK: :[[@LINE+1]]:{{16: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{16: error: invalid operand for instruction|1: error: invalid instruction}}
qc.setinti 11, 12
# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
@@ -21,7 +21,7 @@ qc.setinti 10
# CHECK-PLUS: :[[@LINE+1]]:12: error: immediate must be an integer in the range [0, 1023]
qc.clrinti 2000
-# CHECK: :[[@LINE+1]]:{{16: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{16: error: invalid operand for instruction|1: error: invalid instruction}}
qc.clrinti 22, x4
# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
@@ -42,7 +42,7 @@ qc.c.clrint
qc.c.clrint x8
-# CHECK: :[[@LINE+1]]:{{9: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{9: error: invalid operand for instruction|1: error: invalid instruction}}
qc.c.di 22
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
@@ -60,7 +60,7 @@ qc.c.dir
qc.c.dir x8
-# CHECK: :[[@LINE+1]]:{{9: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{9: error: invalid operand for instruction|1: error: invalid instruction}}
qc.c.ei 22
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
@@ -78,21 +78,21 @@ qc.c.eir
qc.c.eir x8
-# CHECK: :[[@LINE+1]]:{{19: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{19: error: invalid operand for instruction|1: error: invalid instruction}}
qc.c.mienter.nest 22
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
qc.c.mienter.nest
-# CHECK: :[[@LINE+1]]:{{14: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{14: error: invalid operand for instruction|1: error: invalid instruction}}
qc.c.mienter 22
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
qc.c.mienter
-# CHECK: :[[@LINE+1]]:{{17: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{17: error: invalid operand for instruction|1: error: invalid instruction}}
qc.c.mileaveret 22
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
@@ -110,14 +110,14 @@ qc.c.setint
qc.c.setint x8
-# CHECK: :[[@LINE+1]]:{{11: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{11: error: invalid operand for instruction|1: error: invalid instruction}}
qc.c.mret x8
# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
qc.c.mret
-# CHECK: :[[@LINE+1]]:{{12: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{12: error: invalid operand for instruction|1: error: invalid instruction}}
qc.c.mnret 10
# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqciint' (Qualcomm uC Interrupts Extension)
diff --git a/llvm/test/MC/RISCV/xqcisim-invalid.s b/llvm/test/MC/RISCV/xqcisim-invalid.s
index f73fa754400d9..03fb9f7674007 100644
--- a/llvm/test/MC/RISCV/xqcisim-invalid.s
+++ b/llvm/test/MC/RISCV/xqcisim-invalid.s
@@ -10,7 +10,7 @@ qc.psyscalli 1024
# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.psyscalli
-# CHECK: :[[@LINE+1]]:{{18: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{18: error: invalid operand for instruction|1: error: invalid instruction}}
qc.psyscalli 23, x0
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisim' (Qualcomm uC Simulation Hint Extension)
@@ -23,44 +23,44 @@ qc.pputci 256
# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
qc.pputci
-# CHECK: :[[@LINE+1]]:{{16: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{16: error: invalid operand for instruction|1: error: invalid instruction}}
qc.pputci 200, x8
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisim' (Qualcomm uC Simulation Hint Extension)
qc.pputci 255
-# CHECK: :[[@LINE+1]]:{{13: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{13: error: invalid operand for instruction|1: error: invalid instruction}}
qc.c.ptrace x0
-# CHECK: :[[@LINE+1]]:{{13: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{13: error: invalid operand for instruction|1: error: invalid instruction}}
qc.c.ptrace 1
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisim' (Qualcomm uC Simulation Hint Extension)
qc.c.ptrace
-# CHECK: :[[@LINE+1]]:{{14: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{14: error: invalid operand for instruction|1: error: invalid instruction}}
qc.pcoredump 12
-# CHECK: :[[@LINE+1]]:{{14: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{14: error: invalid operand for instruction|1: error: invalid instruction}}
qc.pcoredump x4
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisim' (Qualcomm uC Simulation Hint Extension)
qc.pcoredump
-# CHECK: :[[@LINE+1]]:{{11: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{11: error: invalid operand for instruction|1: error: invalid instruction}}
qc.ppregs x1
-# CHECK: :[[@LINE+1]]:{{11: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{11: error: invalid operand for instruction|1: error: invalid instruction}}
qc.ppregs 23
# CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcisim' (Qualcomm uC Simulation Hint Extension)
qc.ppregs
-# CHECK: :[[@LINE+1]]:{{15: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{15: error: invalid operand for instruction|1: error: invalid instruction}}
qc.ppreg x10, x2
# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
@@ -73,7 +73,7 @@ qc.ppreg 23
qc.ppreg a0
-# CHECK: :[[@LINE+1]]:{{14: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{14: error: invalid operand for instruction|1: error: invalid instruction}}
qc.pputc x7, x3
# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
@@ -86,7 +86,7 @@ qc.pputc 34
qc.pputc t2
-# CHECK: :[[@LINE+1]]:{{15: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{15: error: invalid operand for instruction|1: error: invalid instruction}}
qc.pputs x15, x18
# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
@@ -99,7 +99,7 @@ qc.pputs 45
qc.pputs a5
-# CHECK: :[[@LINE+1]]:{{15: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{15: error: invalid operand for instruction|1: error: invalid instruction}}
qc.pexit x26, x23
# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
@@ -112,7 +112,7 @@ qc.pexit 78
qc.pexit s10
-# CHECK: :[[@LINE+1]]:{{18: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{18: error: invalid operand for instruction|1: error: invalid instruction}}
qc.psyscall x11, x5
# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
diff --git a/llvm/test/MC/RISCV/xqcisync-invalid.s b/llvm/test/MC/RISCV/xqcisync-invalid.s
index 1eefc6271f210..fbb28f04f35be 100644
--- a/llvm/test/MC/RISCV/xqcisync-invalid.s
+++ b/llvm/test/MC/RISCV/xqcisync-invalid.s
@@ -7,7 +7,7 @@
# CHECK-PLUS: :[[@LINE+1]]:12: error: immediate must be an integer in the range [1, 31]
qc.c.delay 34
-# CHECK: :[[@LINE+1]]:{{16: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{16: error: invalid operand for instruction|1: error: invalid instruction}}
qc.c.delay 11, 12
# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
@@ -20,7 +20,7 @@ qc.c.delay 10
# CHECK-PLUS: :[[@LINE+1]]:9: error: immediate must be an integer in the range [0, 31]
qc.sync 45
-# CHECK: :[[@LINE+1]]:{{13: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{13: error: invalid operand for instruction|1: error: invalid instruction}}
qc.sync 22, x4
# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
@@ -33,7 +33,7 @@ qc.sync 8
# CHECK-PLUS: :[[@LINE+1]]:10: error: immediate must be an integer in the range [0, 31]
qc.syncr 56
-# CHECK: :[[@LINE+1]]:{{14: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{14: error: invalid operand for instruction|1: error: invalid instruction}}
qc.syncr 31, 45
# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
@@ -46,7 +46,7 @@ qc.syncr 23
# CHECK-PLUS: :[[@LINE+1]]:11: error: immediate must be an integer in the range [0, 31]
qc.syncwf 88
-# CHECK: :[[@LINE+1]]:{{14: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{14: error: invalid operand for instruction|1: error: invalid instruction}}
qc.syncwf 5, 44
# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
@@ -59,7 +59,7 @@ qc.syncwf 31
# CHECK-PLUS: :[[@LINE+1]]:11: error: immediate must be an integer in the range [0, 31]
qc.syncwl 99
-# CHECK: :[[@LINE+1]]:{{15: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{15: error: invalid operand for instruction|1: error: invalid instruction}}
qc.syncwl 11, x10
# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
@@ -72,7 +72,7 @@ qc.syncwl 1
# CHECK-PLUS: :[[@LINE+1]]:11: error: immediate must be one of: 0, 1, 2, 4, 8, 15, 16, 31
qc.c.sync 45
-# CHECK: :[[@LINE+1]]:{{15: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{15: error: invalid operand for instruction|1: error: invalid instruction}}
qc.c.sync 31, x4
# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
@@ -85,7 +85,7 @@ qc.c.sync 8
# CHECK-PLUS: :[[@LINE+1]]:12: error: immediate must be one of: 0, 1, 2, 4, 8, 15, 16, 31
qc.c.syncr 56
-# CHECK: :[[@LINE+1]]:{{16: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{16: error: invalid operand for instruction|1: error: invalid instruction}}
qc.c.syncr 31, 45
# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
@@ -98,7 +98,7 @@ qc.c.syncr 8
# CHECK-PLUS: :[[@LINE+1]]:13: error: immediate must be one of: 0, 1, 2, 4, 8, 15, 16, 31
qc.c.syncwf 88
-# CHECK: :[[@LINE+1]]:{{16: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{16: error: invalid operand for instruction|1: error: invalid instruction}}
qc.c.syncwf 8, 44
# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
@@ -111,7 +111,7 @@ qc.c.syncwf 31
# CHECK-PLUS: :[[@LINE+1]]:13: error: immediate must be one of: 0, 1, 2, 4, 8, 15, 16, 31
qc.c.syncwl 99
-# CHECK: :[[@LINE+1]]:{{17: error: too many operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{17: error: invalid operand for instruction|1: error: invalid instruction}}
qc.c.syncwl 15, x10
# CHECK: :[[@LINE+1]]:1: error: {{too few operands for instruction|invalid instruction}}
diff --git a/llvm/test/MC/RISCV/xtheadcmo-invalid.s b/llvm/test/MC/RISCV/xtheadcmo-invalid.s
index 1a91861d5405d..be704269044c6 100644
--- a/llvm/test/MC/RISCV/xtheadcmo-invalid.s
+++ b/llvm/test/MC/RISCV/xtheadcmo-invalid.s
@@ -15,11 +15,11 @@ th.dcache.cipa # CHECK: :[[@LINE]]:1: error: too few operands for instruction
th.icache.iva # CHECK: :[[@LINE]]:1: error: too few operands for instruction
th.icache.ipa # CHECK: :[[@LINE]]:1: error: too few operands for instruction
-th.dcache.call t0 # CHECK: :[[@LINE]]:16: error: too many operands for instruction
-th.dcache.iall t0 # CHECK: :[[@LINE]]:16: error: too many operands for instruction
-th.dcache.ciall t0 # CHECK: :[[@LINE]]:17: error: too many operands for instruction
-th.icache.iall t0 # CHECK: :[[@LINE]]:16: error: too many operands for instruction
-th.icache.ialls t0 # CHECK: :[[@LINE]]:17: error: too many operands for instruction
-th.l2cache.call t0 # CHECK: :[[@LINE]]:17: error: too many operands for instruction
-th.l2cache.iall t0 # CHECK: :[[@LINE]]:17: error: too many operands for instruction
-th.l2cache.ciall t0 # CHECK: :[[@LINE]]:18: error: too many operands for instruction
+th.dcache.call t0 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
+th.dcache.iall t0 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
+th.dcache.ciall t0 # CHECK: :[[@LINE]]:17: error: invalid operand for instruction
+th.icache.iall t0 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
+th.icache.ialls t0 # CHECK: :[[@LINE]]:17: error: invalid operand for instruction
+th.l2cache.call t0 # CHECK: :[[@LINE]]:17: error: invalid operand for instruction
+th.l2cache.iall t0 # CHECK: :[[@LINE]]:17: error: invalid operand for instruction
+th.l2cache.ciall t0 # CHECK: :[[@LINE]]:18: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/xtheadcondmov-invalid.s b/llvm/test/MC/RISCV/xtheadcondmov-invalid.s
index 0f1bf8de499cd..5fc4bb039b077 100644
--- a/llvm/test/MC/RISCV/xtheadcondmov-invalid.s
+++ b/llvm/test/MC/RISCV/xtheadcondmov-invalid.s
@@ -2,8 +2,8 @@
# RUN: not llvm-mc -triple riscv64 -mattr=+xtheadcondmov < %s 2>&1 | FileCheck %s
th.mveqz a0,a1 # CHECK: :[[@LINE]]:15: error: too few operands for instruction
-th.mveqz a0,a1,a2,a3 # CHECK: :[[@LINE]]:19: error: too many operands for instruction
+th.mveqz a0,a1,a2,a3 # CHECK: :[[@LINE]]:19: error: invalid operand for instruction
th.mveqz a0,a1,1 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
th.mvnez a0,a1 # CHECK: :[[@LINE]]:15: error: too few operands for instruction
-th.mvnez a0,a1,a2,a3 # CHECK: :[[@LINE]]:19: error: too many operands for instruction
+th.mvnez a0,a1,a2,a3 # CHECK: :[[@LINE]]:19: error: invalid operand for instruction
th.mvnez a0,a1,1 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/xtheadsync-invalid.s b/llvm/test/MC/RISCV/xtheadsync-invalid.s
index a341fa012ae52..23ab046308953 100644
--- a/llvm/test/MC/RISCV/xtheadsync-invalid.s
+++ b/llvm/test/MC/RISCV/xtheadsync-invalid.s
@@ -2,7 +2,7 @@
# RUN: not llvm-mc -triple riscv64 -mattr=+xtheadsync < %s 2>&1 | FileCheck %s
th.sfence.vmas t0 # CHECK: :[[@LINE]]:18: error: too few operands for instruction
-th.sync t0 # CHECK: :[[@LINE]]:9: error: too many operands for instruction
-th.sync.s t0 # CHECK: :[[@LINE]]:11: error: too many operands for instruction
-th.sync.i t0 # CHECK: :[[@LINE]]:11: error: too many operands for instruction
-th.sync.is t0 # CHECK: :[[@LINE]]:12: error: too many operands for instruction
+th.sync t0 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+th.sync.s t0 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+th.sync.i t0 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+th.sync.is t0 # CHECK: :[[@LINE]]:12: error: invalid operand for instruction
>From 3ab0575e10dd44355229d05ee8d506def42e14e4 Mon Sep 17 00:00:00 2001
From: Mark Zhuang <mark.zhuang at spacemit.com>
Date: Sun, 28 Jun 2026 14:57:55 +0800
Subject: [PATCH 3/8] [AsmMatcher] Reject surplus operands in
ReportMultipleNearMisses path
The ReportMultipleNearMisses matcher matched all formal operands but never
checked for leftover ones, so an instruction with too many operands was
silently accepted when the encoding filled every formal slot exactly.
Record the first surplus operand as an invalid-operand near-miss. Fixes the
RISC-V `.insn qc.ei/qc.es ...(reg), extra` regression and restores its two
dropped test cases.
Assisted-by: claude-opus
---
llvm/test/MC/RISCV/insn_xqci-invalid.s | 6 ++++++
llvm/utils/TableGen/AsmMatcherEmitter.cpp | 18 +++++++++++++++++-
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/llvm/test/MC/RISCV/insn_xqci-invalid.s b/llvm/test/MC/RISCV/insn_xqci-invalid.s
index 70af799b37ca3..6cc9e86b7020a 100644
--- a/llvm/test/MC/RISCV/insn_xqci-invalid.s
+++ b/llvm/test/MC/RISCV/insn_xqci-invalid.s
@@ -46,6 +46,9 @@
.insn qc.ei 126, 7, 3, x31, 0x1000000(not_a_reg)
# CHECK-ERR: [[@LINE-1]]:39: error: expected register
+.insn qc.ei 126, 7, 3, x31, 0x1000000(x31), extra
+# CHECK-ERR: [[@LINE-1]]:45: error: invalid operand for instruction
+
.insn qc.eb 128, 0, 0, x0, 0, 0
# CHECK-ERR: [[@LINE-1]]:13: error: opcode must be a valid opcode name or an immediate in the range [0, 127]
@@ -103,3 +106,6 @@
.insn qc.es 127, 7, 3, x31, 0x1000000(not_a_reg)
# CHECK-ERR: [[@LINE-1]]:39: error: expected register
+
+.insn qc.es 127, 7, 3, x31, 0x1000000(x31), extra
+# CHECK-ERR: [[@LINE-1]]:45: error: invalid operand for instruction
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
index 4c61d64ec215a..22a4f65235e3c 100644
--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -3819,8 +3819,9 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
if (HasOptionalOperands)
OS << " OptionalOperandsMask.reset(0, "
<< MaxNumOperands + HasMnemonicFirst << ");\n";
+ OS << " unsigned ActualIdx = " << (HasMnemonicFirst ? "1" : "SIndex")
+ << ";\n";
OS << " for (unsigned FormalIdx = " << (HasMnemonicFirst ? "0" : "SIndex")
- << ", ActualIdx = " << (HasMnemonicFirst ? "1" : "SIndex")
<< "; FormalIdx != " << MaxNumOperands << "; ++FormalIdx) {\n";
OS << " auto Formal = "
<< "static_cast<MatchClassKind>(it->Classes[FormalIdx]);\n";
@@ -3956,6 +3957,21 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
OS << " break;\n";
OS << " }\n";
OS << " }\n\n";
+ OS << " // Reject surplus operands as one more operand mismatch.\n";
+ OS << " if (!MultipleInvalidOperands && ActualIdx < Operands.size()) {\n";
+ OS << " if (!OperandNearMiss) {\n";
+ OS << " DEBUG_WITH_TYPE(\"asm-matcher\", dbgs() << \"too many "
+ "operands, recording near-miss at index \"\n";
+ OS << " << ActualIdx << \"\\n\");\n";
+ OS << " OperandNearMiss = NearMissInfo::getMissedOperand(\n";
+ OS << " Match_InvalidOperand, InvalidMatchClass, it->Opcode, "
+ "ActualIdx);\n";
+ OS << " } else {\n";
+ OS << " DEBUG_WITH_TYPE(\"asm-matcher\", dbgs() << \"too many "
+ "operands after an earlier mismatch, skipping this opcode\\n\");\n";
+ OS << " MultipleInvalidOperands = true;\n";
+ OS << " }\n";
+ OS << " }\n\n";
} else {
OS << " // If this operand is broken for all of the instances of "
"this\n";
>From 4831a916196e08928c85531acd0818eee87b5ebe Mon Sep 17 00:00:00 2001
From: Mark Zhuang <mark.zhuang at spacemit.com>
Date: Sun, 28 Jun 2026 22:34:43 +0800
Subject: [PATCH 4/8] fix format
---
llvm/utils/TableGen/AsmMatcherEmitter.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
index 22a4f65235e3c..786b1025dece6 100644
--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -3958,7 +3958,8 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
OS << " }\n";
OS << " }\n\n";
OS << " // Reject surplus operands as one more operand mismatch.\n";
- OS << " if (!MultipleInvalidOperands && ActualIdx < Operands.size()) {\n";
+ OS << " if (!MultipleInvalidOperands && ActualIdx < Operands.size()) "
+ "{\n";
OS << " if (!OperandNearMiss) {\n";
OS << " DEBUG_WITH_TYPE(\"asm-matcher\", dbgs() << \"too many "
"operands, recording near-miss at index \"\n";
>From f0e04dcd7e3c04466e2c773e10f575535e3a8587 Mon Sep 17 00:00:00 2001
From: Mark Zhuang <mark.zhuang at spacemit.com>
Date: Wed, 1 Jul 2026 11:05:14 +0800
Subject: [PATCH 5/8] refresh tests after merge main
---
.../Target/RISCV/AsmParser/RISCVAsmParser.cpp | 2 +-
.../test/MC/RISCV/corev/XCVbitmanip-invalid.s | 44 +-
llvm/test/MC/RISCV/corev/XCVmem-invalid.s | 48 +-
llvm/test/MC/RISCV/corev/XCVsimd-invalid.s | 755 +++++++++---------
llvm/test/MC/RISCV/insn-invalid.s | 2 +-
llvm/test/MC/RISCV/rv32c-invalid.s | 13 +-
llvm/test/MC/RISCV/rv32d-invalid.s | 4 +-
llvm/test/MC/RISCV/rv32f-invalid.s | 4 +-
llvm/test/MC/RISCV/rv32i-aliases-invalid.s | 3 +-
llvm/test/MC/RISCV/rv32i-invalid.s | 35 +-
llvm/test/MC/RISCV/rv32q-invalid.s | 4 +-
llvm/test/MC/RISCV/rv32xqccmp-invalid.s | 8 +-
.../test/MC/RISCV/rv32xtheadmempair-invalid.s | 6 +-
llvm/test/MC/RISCV/rv32zcmp-invalid.s | 6 +-
llvm/test/MC/RISCV/rv32zdinx-invalid.s | 2 +-
llvm/test/MC/RISCV/rv32zfh-invalid.s | 8 +-
llvm/test/MC/RISCV/rv32zfinx-invalid.s | 2 +-
llvm/test/MC/RISCV/rv32zhinx-invalid.s | 2 +-
llvm/test/MC/RISCV/rv32zhinxmin-invalid.s | 2 +-
llvm/test/MC/RISCV/rv64d-invalid.s | 12 +-
llvm/test/MC/RISCV/rv64f-invalid.s | 8 +-
llvm/test/MC/RISCV/rv64h-invalid.s | 7 +-
llvm/test/MC/RISCV/rv64i-aliases-invalid.s | 253 +++---
llvm/test/MC/RISCV/rv64q-invalid.s | 8 +-
llvm/test/MC/RISCV/rv64xqccmp-invalid.s | 4 +-
.../test/MC/RISCV/rv64xtheadfmemidx-invalid.s | 6 +-
llvm/test/MC/RISCV/rv64xtheadmemidx-invalid.s | 10 +-
.../test/MC/RISCV/rv64xtheadmempair-invalid.s | 6 +-
llvm/test/MC/RISCV/rv64zcmp-invalid.s | 4 +-
llvm/test/MC/RISCV/rv64zdinx-invalid.s | 2 +-
llvm/test/MC/RISCV/rv64zfh-invalid.s | 8 +-
llvm/test/MC/RISCV/rv64zfinx-invalid.s | 2 +-
llvm/test/MC/RISCV/rv64zhinx-invalid.s | 2 +-
llvm/test/MC/RISCV/rv64zhinxmin-invalid.s | 4 +-
llvm/test/MC/RISCV/rve-invalid.s | 2 +-
llvm/test/MC/RISCV/rvv/invalid-alt.s | 4 +-
llvm/test/MC/RISCV/rvv/invalid.s | 14 +-
llvm/test/MC/RISCV/rvv/zvfbdota32f-invalid.s | 4 +-
llvm/test/MC/RISCV/rvv/zvfqwbdota8f-invalid.s | 4 +-
.../test/MC/RISCV/rvv/zvfwbdota16bf-invalid.s | 4 +-
llvm/test/MC/RISCV/rvv/zvqwbdota-invalid.s | 4 +-
llvm/test/MC/RISCV/rvy/rvy-basic-invalid.s | 2 +
llvm/test/MC/RISCV/rvzfbfmin-invalid.s | 4 +-
llvm/test/MC/RISCV/rvzfhmin-invalid.s | 4 +-
llvm/test/MC/RISCV/rvzicbop-invalid.s | 4 +-
llvm/test/MC/RISCV/rvzihintntl-invalid.s | 8 +-
llvm/test/MC/RISCV/rvzihintntlc-invalid.s | 8 +-
llvm/test/MC/RISCV/tlsdesc.s | 20 +-
llvm/test/MC/RISCV/xandesperf-invalid.s | 4 +-
llvm/test/MC/RISCV/xmips-invalid.s | 8 +-
llvm/test/MC/RISCV/xqcia-invalid.s | 4 +-
llvm/test/MC/RISCV/xqciio-invalid.s | 18 +-
llvm/test/MC/RISCV/xqcili-invalid.s | 2 +-
llvm/test/MC/RISCV/xqcilo-pseudos-invalid.s | 12 +-
llvm/test/MC/RISCV/xqcilsm-invalid.s | 22 +-
llvm/test/MC/RISCV/xtheadmac-invalid.s | 2 +-
56 files changed, 768 insertions(+), 676 deletions(-)
diff --git a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
index bab1569495352..cfab7277f5ef5 100644
--- a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+++ b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
@@ -1626,7 +1626,7 @@ std::string RISCVAsmParser::getCustomOperandDiag(unsigned MatchError) {
case Match_InvalidSImm20LI:
return Range(-(1 << 19), (1 << 19) - 1,
"operand must be a symbol with a %qc.abs20 specifier or an "
- "integer in the range");
+ "integer in the range");
case Match_InvalidUImm20LUI:
return Range(0, (1 << 20) - 1,
"operand must be a symbol with %hi/%tprel_hi specifier or an "
diff --git a/llvm/test/MC/RISCV/corev/XCVbitmanip-invalid.s b/llvm/test/MC/RISCV/corev/XCVbitmanip-invalid.s
index 7ecdb64c86372..684b3f220a994 100644
--- a/llvm/test/MC/RISCV/corev/XCVbitmanip-invalid.s
+++ b/llvm/test/MC/RISCV/corev/XCVbitmanip-invalid.s
@@ -8,10 +8,10 @@ cv.extract t0, t1, 0
# CHECK-ERROR: too few operands for instruction
cv.extract t0, t1, t2
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 31]
cv.extract t0, t1, t2, t3
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 31]
cv.extract t0, t1, 0, 32
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -32,10 +32,10 @@ cv.extractu t0, t1, 0
# CHECK-ERROR: too few operands for instruction
cv.extractu t0, t1, t2
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 31]
cv.extractu t0, t1, t2, t3
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 31]
cv.extractu t0, t1, 0, 32
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -56,10 +56,10 @@ cv.insert t0, t1, 0
# CHECK-ERROR: too few operands for instruction
cv.insert t0, t1, t2
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 31]
cv.insert t0, t1, t2, t3
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 31]
cv.insert t0, t1, 0, 32
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -80,10 +80,10 @@ cv.bclr t0, t1, 0
# CHECK-ERROR: too few operands for instruction
cv.bclr t0, t1, t2
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 31]
cv.bclr t0, t1, t2, t3
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 31]
cv.bclr t0, t1, 0, 32
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -104,10 +104,10 @@ cv.bset t0, t1, 0
# CHECK-ERROR: too few operands for instruction
cv.bset t0, t1, t2
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 31]
cv.bset t0, t1, t2, t3
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 31]
cv.bset t0, t1, 0, 32
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -128,10 +128,10 @@ cv.bitrev t0, t1, 0
# CHECK-ERROR: too few operands for instruction
cv.bitrev t0, t1, t2
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 3]
cv.bitrev t0, t1, t2, t3
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 3]
cv.bitrev t0, t1, 0, 32
# CHECK-ERROR: immediate must be an integer in the range [0, 31]
@@ -149,7 +149,7 @@ cv.extractr t0
# CHECK-ERROR: too few operands for instruction
cv.extractr t0, 0
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.extractr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -161,7 +161,7 @@ cv.extractur t0
# CHECK-ERROR: too few operands for instruction
cv.extractur t0, 0
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.extractur t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -173,7 +173,7 @@ cv.insertr t0
# CHECK-ERROR: too few operands for instruction
cv.insertr t0, 0
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.insertr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -185,7 +185,7 @@ cv.bclrr t0
# CHECK-ERROR: too few operands for instruction
cv.bclrr t0, 0
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.bclrr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -197,7 +197,7 @@ cv.bsetr t0
# CHECK-ERROR: too few operands for instruction
cv.bsetr t0, 0
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.bsetr t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -209,7 +209,7 @@ cv.ror t0
# CHECK-ERROR: too few operands for instruction
cv.ror t0, 0
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.ror t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -227,7 +227,7 @@ cv.ff1 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
cv.ff1 t0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.fl1 t0
# CHECK-ERROR: too few operands for instruction
@@ -239,7 +239,7 @@ cv.fl1 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
cv.fl1 t0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.clb t0
# CHECK-ERROR: too few operands for instruction
@@ -251,7 +251,7 @@ cv.clb t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
cv.clb t0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cnt t0
# CHECK-ERROR: too few operands for instruction
@@ -263,5 +263,5 @@ cv.cnt t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
cv.cnt t0, t1, t2
-# CHECK-ERROR: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/corev/XCVmem-invalid.s b/llvm/test/MC/RISCV/corev/XCVmem-invalid.s
index d1f1bd971aeb0..cbec2f406acc0 100644
--- a/llvm/test/MC/RISCV/corev/XCVmem-invalid.s
+++ b/llvm/test/MC/RISCV/corev/XCVmem-invalid.s
@@ -2,13 +2,13 @@
# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR
cv.lb t0, (0), 0
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
cv.lb 0, (t1), 0
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.lb 0, (0), t2
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.lb t0, (t1), -2049
# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
@@ -21,7 +21,7 @@ cv.lb t0, (t1), 2048
# CHECK-ERROR: :[[@LINE-3]]:17: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.lb t0, (0), t1
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
cv.lb 0, (t1), t1
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
@@ -36,13 +36,13 @@ cv.lb t0, (t1), t2, t3
# CHECK-ERROR: :[[@LINE-1]]:21: error: invalid operand for instruction
cv.lbu t0, (0), 0
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:12: error: invalid operand for instruction
cv.lbu 0, (t1), 0
# CHECK-ERROR: :[[@LINE-1]]:8: error: invalid operand for instruction
cv.lbu 0, (0), t0
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:8: error: invalid operand for instruction
cv.lbu t0, (t1), -2049
# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
@@ -55,7 +55,7 @@ cv.lbu t0, (t1), 2048
# CHECK-ERROR: :[[@LINE-3]]:18: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.lbu t0, (0), t1
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:12: error: invalid operand for instruction
cv.lbu 0, (t1), t1
# CHECK-ERROR: :[[@LINE-1]]:8: error: invalid operand for instruction
@@ -70,13 +70,13 @@ cv.lbu t0, (t1), t2, t3
# CHECK-ERROR: :[[@LINE-1]]:22: error: invalid operand for instruction
cv.lh t0, (0), 0
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
cv.lh 0, (t1), 0
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.lh 0, (0), t2
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.lh t0, (t1), -2049
# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
@@ -89,7 +89,7 @@ cv.lh t0, (t1), 2048
# CHECK-ERROR: :[[@LINE-3]]:17: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.lh t0, (0), t1
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
cv.lh t0, t1(0)
# CHECK-ERROR: :[[@LINE-1]]:14: error: expected GPR register
@@ -107,13 +107,13 @@ cv.lh t0, (t1), t2, t3
# CHECK-ERROR: :[[@LINE-1]]:21: error: invalid operand for instruction
cv.lhu t0, (0), 0
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:12: error: invalid operand for instruction
cv.lhu 0, (t1), 0
# CHECK-ERROR: :[[@LINE-1]]:8: error: invalid operand for instruction
cv.lhu 0, 0(t1)
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:8: error: invalid operand for instruction
cv.lhu t0, (t1), -2049
# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
@@ -126,7 +126,7 @@ cv.lhu t0, (t1), 2048
# CHECK-ERROR: :[[@LINE-3]]:18: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.lhu t0, (0), t1
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:12: error: invalid operand for instruction
cv.lhu t0, t1(0)
# CHECK-ERROR: :[[@LINE-1]]:15: error: expected GPR register
@@ -144,13 +144,13 @@ cv.lhu t0, (t1), t2, t3
# CHECK-ERROR: :[[@LINE-1]]:22: error: invalid operand for instruction
cv.lw t0, (0), 0
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
cv.lw 0, (t1), 0
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.lw 0, (0), t2
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.lw t0, (t1), -2049
# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
@@ -163,7 +163,7 @@ cv.lw t0, (t1), 2048
# CHECK-ERROR: :[[@LINE-3]]:17: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.lw t0, (0), t1
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
cv.lw t0, t1(0)
# CHECK-ERROR: :[[@LINE-1]]:14: error: expected GPR register
@@ -181,13 +181,13 @@ cv.lw t0, (t1), t2, t3
# CHECK-ERROR: :[[@LINE-1]]:21: error: invalid operand for instruction
cv.sb t0, (0), 0
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
cv.sb 0, (t0), 0
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.sb t0, 0(t1)
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
cv.sb t0, (t1), 2048
# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
@@ -195,7 +195,7 @@ cv.sb t0, (t1), 2048
# CHECK-ERROR: :[[@LINE-3]]:17: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.sb t0, (0), t1
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
cv.sb 0, (t1), t1
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
@@ -204,13 +204,13 @@ cv.sb t0
# CHECK-ERROR: :[[@LINE-1]]:9: error: too few operands for instruction
cv.sh t0, (0), 0
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
cv.sh 0, (t1), 0
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.sh t0, 0(t1)
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
cv.sh t0, (t1), 2048
# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
@@ -218,7 +218,7 @@ cv.sh t0, (t1), 2048
# CHECK-ERROR: :[[@LINE-3]]:17: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.sh t0, (0), t1
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
cv.sh 0, (t1), t1
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
@@ -227,13 +227,13 @@ cv.sh t0
# CHECK-ERROR: :[[@LINE-1]]:9: error: too few operands for instruction
cv.sw t0, (0), 0
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
cv.sw 0, (t1), 0
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
cv.sw t0, 0(t1)
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
cv.sw t0, (t1), 2048
# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
@@ -241,7 +241,7 @@ cv.sw t0, (t1), 2048
# CHECK-ERROR: :[[@LINE-3]]:17: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
cv.sw t0, (0), t1
-# CHECK-ERROR: :[[@LINE-1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE-1]]:11: error: invalid operand for instruction
cv.sw 0, (t1), t1
# CHECK-ERROR: :[[@LINE-1]]:7: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/corev/XCVsimd-invalid.s b/llvm/test/MC/RISCV/corev/XCVsimd-invalid.s
index dd835e06939a3..c04898d295a18 100644
--- a/llvm/test/MC/RISCV/corev/XCVsimd-invalid.s
+++ b/llvm/test/MC/RISCV/corev/XCVsimd-invalid.s
@@ -12,7 +12,7 @@ cv.add.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.add.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -34,7 +34,7 @@ cv.add.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.add.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -56,7 +56,7 @@ cv.add.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.add.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -78,7 +78,7 @@ cv.add.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.add.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -94,13 +94,13 @@ cv.add.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.add.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.add.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.add.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.add.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -116,13 +116,13 @@ cv.add.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.add.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.add.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.add.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.add.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -144,7 +144,7 @@ cv.sub.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sub.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -166,7 +166,7 @@ cv.sub.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sub.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -188,7 +188,7 @@ cv.sub.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sub.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -210,7 +210,7 @@ cv.sub.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sub.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -226,13 +226,13 @@ cv.sub.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.sub.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sub.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sub.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.sub.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -248,13 +248,13 @@ cv.sub.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.sub.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sub.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sub.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.sub.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -276,7 +276,7 @@ cv.avg.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avg.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.avg.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -298,7 +298,7 @@ cv.avg.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avg.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.avg.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -320,7 +320,7 @@ cv.avg.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avg.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.avg.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -342,7 +342,7 @@ cv.avg.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avg.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.avg.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -358,13 +358,13 @@ cv.avg.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.avg.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.avg.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.avg.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.avg.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -380,13 +380,13 @@ cv.avg.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.avg.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.avg.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.avg.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.avg.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -408,7 +408,7 @@ cv.avgu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avgu.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.avgu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -430,7 +430,7 @@ cv.avgu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avgu.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.avgu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -452,7 +452,7 @@ cv.avgu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avgu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.avgu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -474,7 +474,7 @@ cv.avgu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.avgu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.avgu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -490,13 +490,13 @@ cv.avgu.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.avgu.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.avgu.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.avgu.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.avgu.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -515,13 +515,13 @@ cv.avgu.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.avgu.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.avgu.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.avgu.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.avgu.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -546,7 +546,7 @@ cv.min.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.min.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.min.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -568,7 +568,7 @@ cv.min.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.min.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.min.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -590,7 +590,7 @@ cv.min.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.min.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.min.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -612,7 +612,7 @@ cv.min.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.min.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.min.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -628,13 +628,13 @@ cv.min.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.min.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.min.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.min.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.min.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -650,13 +650,13 @@ cv.min.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.min.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.min.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.min.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.min.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -678,7 +678,7 @@ cv.minu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.minu.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.minu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -700,7 +700,7 @@ cv.minu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.minu.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.minu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -722,7 +722,7 @@ cv.minu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.minu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.minu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -744,7 +744,7 @@ cv.minu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.minu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.minu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -760,13 +760,13 @@ cv.minu.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.minu.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.minu.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.minu.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.minu.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -785,13 +785,13 @@ cv.minu.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.minu.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.minu.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.minu.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.minu.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -816,7 +816,7 @@ cv.max.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.max.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.max.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -838,7 +838,7 @@ cv.max.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.max.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.max.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -860,7 +860,7 @@ cv.max.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.max.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.max.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -882,7 +882,7 @@ cv.max.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.max.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.max.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -898,13 +898,13 @@ cv.max.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.max.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.max.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.max.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.max.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -920,13 +920,13 @@ cv.max.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.max.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.max.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.max.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.max.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -948,7 +948,7 @@ cv.maxu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.maxu.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.maxu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -970,7 +970,7 @@ cv.maxu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.maxu.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.maxu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -992,7 +992,7 @@ cv.maxu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.maxu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.maxu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1014,7 +1014,7 @@ cv.maxu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.maxu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.maxu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1030,13 +1030,13 @@ cv.maxu.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.maxu.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.maxu.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.maxu.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.maxu.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -1055,13 +1055,13 @@ cv.maxu.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.maxu.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.maxu.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.maxu.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.maxu.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -1086,7 +1086,7 @@ cv.srl.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.srl.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.srl.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1108,7 +1108,7 @@ cv.srl.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.srl.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.srl.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1130,7 +1130,7 @@ cv.srl.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.srl.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.srl.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1152,7 +1152,7 @@ cv.srl.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.srl.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.srl.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1168,13 +1168,13 @@ cv.srl.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.srl.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.srl.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.srl.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 15]
cv.srl.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 15]
@@ -1193,13 +1193,13 @@ cv.srl.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.srl.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.srl.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.srl.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 7]
cv.srl.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 7]
@@ -1224,7 +1224,7 @@ cv.sra.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sra.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sra.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1246,7 +1246,7 @@ cv.sra.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sra.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sra.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1268,7 +1268,7 @@ cv.sra.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sra.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sra.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1290,7 +1290,7 @@ cv.sra.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sra.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sra.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1306,13 +1306,13 @@ cv.sra.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.sra.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sra.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sra.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 15]
cv.sra.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 15]
@@ -1331,13 +1331,13 @@ cv.sra.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.sra.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sra.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sra.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 7]
cv.sra.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 7]
@@ -1362,7 +1362,7 @@ cv.sll.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sll.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sll.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1384,7 +1384,7 @@ cv.sll.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sll.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sll.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1406,7 +1406,7 @@ cv.sll.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sll.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sll.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1428,7 +1428,7 @@ cv.sll.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sll.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sll.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1444,13 +1444,13 @@ cv.sll.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.sll.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sll.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sll.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 15]
cv.sll.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 15]
@@ -1469,13 +1469,13 @@ cv.sll.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.sll.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sll.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sll.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 7]
cv.sll.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 7]
@@ -1500,7 +1500,7 @@ cv.or.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.or.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.or.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1522,7 +1522,7 @@ cv.or.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.or.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.or.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1544,7 +1544,7 @@ cv.or.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.or.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.or.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1566,7 +1566,7 @@ cv.or.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.or.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.or.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1582,13 +1582,13 @@ cv.or.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.or.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.or.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.or.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.or.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -1604,13 +1604,13 @@ cv.or.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.or.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.or.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.or.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.or.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -1632,7 +1632,7 @@ cv.xor.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.xor.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.xor.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1654,7 +1654,7 @@ cv.xor.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.xor.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.xor.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1676,7 +1676,7 @@ cv.xor.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.xor.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.xor.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1698,7 +1698,7 @@ cv.xor.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.xor.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.xor.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1714,13 +1714,13 @@ cv.xor.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.xor.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.xor.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.xor.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.xor.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -1736,13 +1736,13 @@ cv.xor.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.xor.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.xor.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.xor.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.xor.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -1764,7 +1764,7 @@ cv.and.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.and.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.and.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1786,7 +1786,7 @@ cv.and.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.and.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.and.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1808,7 +1808,7 @@ cv.and.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.and.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.and.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1830,7 +1830,7 @@ cv.and.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.and.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.and.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1846,13 +1846,13 @@ cv.and.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.and.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.and.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.and.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.and.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -1868,13 +1868,13 @@ cv.and.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.and.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.and.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.and.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.and.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -1890,44 +1890,44 @@ cv.and.sci.b t0, t1
//===----------------------------------------------------------------------===//
cv.abs.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.abs.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.abs.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.abs.h t0, t1, t2
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.abs.h t0, t1, 0
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.abs.h t0, t1, 0
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
//===----------------------------------------------------------------------===//
// cv.abs.b
//===----------------------------------------------------------------------===//
cv.abs.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.abs.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.abs.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.abs.b t0, t1, t2
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.abs.b t0, t1, 0
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.abs.b t0, t1, 0
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
//===----------------------------------------------------------------------===//
// cv.dotup.h
@@ -1940,7 +1940,7 @@ cv.dotup.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotup.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotup.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1962,7 +1962,7 @@ cv.dotup.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotup.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotup.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -1984,7 +1984,7 @@ cv.dotup.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotup.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotup.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2006,7 +2006,7 @@ cv.dotup.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotup.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotup.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2022,13 +2022,13 @@ cv.dotup.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.dotup.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotup.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotup.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.dotup.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2047,13 +2047,13 @@ cv.dotup.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.dotup.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotup.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotup.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.dotup.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2078,7 +2078,7 @@ cv.dotusp.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotusp.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotusp.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2100,7 +2100,7 @@ cv.dotusp.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotusp.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotusp.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2122,7 +2122,7 @@ cv.dotusp.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotusp.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotusp.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2144,7 +2144,7 @@ cv.dotusp.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotusp.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotusp.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2160,13 +2160,13 @@ cv.dotusp.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.dotusp.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotusp.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotusp.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.dotusp.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -2182,13 +2182,13 @@ cv.dotusp.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.dotusp.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotusp.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotusp.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.dotusp.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -2210,7 +2210,7 @@ cv.dotsp.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotsp.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotsp.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2232,7 +2232,7 @@ cv.dotsp.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotsp.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotsp.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2254,7 +2254,7 @@ cv.dotsp.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotsp.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotsp.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2276,7 +2276,7 @@ cv.dotsp.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.dotsp.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotsp.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2292,13 +2292,13 @@ cv.dotsp.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.dotsp.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotsp.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotsp.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.dotsp.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -2314,13 +2314,13 @@ cv.dotsp.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.dotsp.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotsp.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.dotsp.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.dotsp.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -2342,7 +2342,7 @@ cv.sdotup.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotup.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotup.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2364,7 +2364,7 @@ cv.sdotup.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotup.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotup.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2386,7 +2386,7 @@ cv.sdotup.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotup.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotup.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2408,7 +2408,7 @@ cv.sdotup.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotup.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotup.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2424,13 +2424,13 @@ cv.sdotup.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.sdotup.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotup.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotup.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.sdotup.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2449,13 +2449,13 @@ cv.sdotup.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.sdotup.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotup.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotup.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.sdotup.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2480,7 +2480,7 @@ cv.sdotusp.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2502,7 +2502,7 @@ cv.sdotusp.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2524,7 +2524,7 @@ cv.sdotusp.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2546,7 +2546,7 @@ cv.sdotusp.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2562,13 +2562,13 @@ cv.sdotusp.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.sdotusp.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.sdotusp.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -2584,13 +2584,13 @@ cv.sdotusp.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.sdotusp.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotusp.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.sdotusp.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -2612,7 +2612,7 @@ cv.sdotsp.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2634,7 +2634,7 @@ cv.sdotsp.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2656,7 +2656,7 @@ cv.sdotsp.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2678,7 +2678,7 @@ cv.sdotsp.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2694,13 +2694,13 @@ cv.sdotsp.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.sdotsp.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.sdotsp.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -2716,13 +2716,13 @@ cv.sdotsp.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.sdotsp.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sdotsp.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.sdotsp.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -2738,13 +2738,13 @@ cv.sdotsp.sci.b t0, t1
//===----------------------------------------------------------------------===//
cv.extract.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.extract.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.extract.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.extract.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2763,13 +2763,13 @@ cv.extract.h t0, t1
//===----------------------------------------------------------------------===//
cv.extract.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.extract.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.extract.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.extract.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2788,13 +2788,13 @@ cv.extract.b t0, t1
//===----------------------------------------------------------------------===//
cv.extractu.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.extractu.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.extractu.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.extractu.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2813,13 +2813,13 @@ cv.extractu.h t0, t1
//===----------------------------------------------------------------------===//
cv.extractu.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.extractu.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.extractu.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.extractu.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2838,13 +2838,13 @@ cv.extractu.b t0, t1
//===----------------------------------------------------------------------===//
cv.insert.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.insert.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.insert.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.insert.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2863,13 +2863,13 @@ cv.insert.h t0, t1
//===----------------------------------------------------------------------===//
cv.insert.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.insert.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.insert.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.insert.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2894,7 +2894,7 @@ cv.shuffle.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.shuffle.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.shuffle.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2916,7 +2916,7 @@ cv.shuffle.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.shuffle.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.shuffle.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -2932,13 +2932,13 @@ cv.shuffle.b t0, t1
//===----------------------------------------------------------------------===//
cv.shuffle.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.shuffle.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.shuffle.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.shuffle.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2957,13 +2957,13 @@ cv.shuffle.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.shuffleI0.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.shuffleI0.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.shuffleI0.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.shuffleI0.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -2982,13 +2982,13 @@ cv.shuffleI0.sci.b t0, t1
//===----------------------------------------------------------------------===//
cv.shuffleI1.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.shuffleI1.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.shuffleI1.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.shuffleI1.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -3007,13 +3007,13 @@ cv.shuffleI1.sci.b t0, t1
//===----------------------------------------------------------------------===//
cv.shuffleI2.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.shuffleI2.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.shuffleI2.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.shuffleI2.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -3032,13 +3032,13 @@ cv.shuffleI2.sci.b t0, t1
//===----------------------------------------------------------------------===//
cv.shuffleI3.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.shuffleI3.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.shuffleI3.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.shuffleI3.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -3063,7 +3063,7 @@ cv.shuffle2.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.shuffle2.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.shuffle2.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3085,7 +3085,7 @@ cv.shuffle2.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.shuffle2.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.shuffle2.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3107,7 +3107,7 @@ cv.pack t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.pack t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.pack t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3129,7 +3129,7 @@ cv.pack.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.pack.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.pack.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3151,7 +3151,7 @@ cv.packhi.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.packhi.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.packhi.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3173,7 +3173,7 @@ cv.packlo.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.packlo.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.packlo.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3195,7 +3195,7 @@ cv.cmpeq.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3217,7 +3217,7 @@ cv.cmpeq.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3239,7 +3239,7 @@ cv.cmpeq.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3261,7 +3261,7 @@ cv.cmpeq.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3277,13 +3277,13 @@ cv.cmpeq.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmpeq.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.cmpeq.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3299,13 +3299,13 @@ cv.cmpeq.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmpeq.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpeq.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.cmpeq.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3327,7 +3327,7 @@ cv.cmpne.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpne.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpne.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3349,7 +3349,7 @@ cv.cmpne.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpne.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpne.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3371,7 +3371,7 @@ cv.cmpne.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpne.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpne.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3393,7 +3393,7 @@ cv.cmpne.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpne.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpne.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3409,13 +3409,13 @@ cv.cmpne.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmpne.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpne.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpne.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.cmpne.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3431,13 +3431,13 @@ cv.cmpne.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmpne.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpne.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpne.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.cmpne.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3459,7 +3459,7 @@ cv.cmpgt.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3481,7 +3481,7 @@ cv.cmpgt.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3503,7 +3503,7 @@ cv.cmpgt.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3525,7 +3525,7 @@ cv.cmpgt.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3541,13 +3541,13 @@ cv.cmpgt.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmpgt.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.cmpgt.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3563,13 +3563,13 @@ cv.cmpgt.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmpgt.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgt.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.cmpgt.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3591,7 +3591,7 @@ cv.cmpge.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpge.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpge.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3613,7 +3613,7 @@ cv.cmpge.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpge.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpge.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3635,7 +3635,7 @@ cv.cmpge.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpge.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpge.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3657,7 +3657,7 @@ cv.cmpge.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpge.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpge.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3673,13 +3673,13 @@ cv.cmpge.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmpge.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpge.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpge.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.cmpge.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3695,13 +3695,13 @@ cv.cmpge.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmpge.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpge.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpge.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.cmpge.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3723,7 +3723,7 @@ cv.cmplt.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmplt.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmplt.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3745,7 +3745,7 @@ cv.cmplt.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmplt.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmplt.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3767,7 +3767,7 @@ cv.cmplt.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmplt.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmplt.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3789,7 +3789,7 @@ cv.cmplt.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmplt.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmplt.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3805,13 +3805,13 @@ cv.cmplt.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmplt.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmplt.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmplt.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.cmplt.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3827,13 +3827,13 @@ cv.cmplt.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmplt.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmplt.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmplt.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.cmplt.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3855,7 +3855,7 @@ cv.cmple.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmple.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmple.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3877,7 +3877,7 @@ cv.cmple.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmple.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmple.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3899,7 +3899,7 @@ cv.cmple.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmple.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmple.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3921,7 +3921,7 @@ cv.cmple.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmple.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmple.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -3937,13 +3937,13 @@ cv.cmple.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmple.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmple.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmple.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.cmple.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3959,13 +3959,13 @@ cv.cmple.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmple.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmple.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmple.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
cv.cmple.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [-32, 31]
@@ -3987,7 +3987,7 @@ cv.cmpgtu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4009,7 +4009,7 @@ cv.cmpgtu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4031,7 +4031,7 @@ cv.cmpgtu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4053,7 +4053,7 @@ cv.cmpgtu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4069,13 +4069,13 @@ cv.cmpgtu.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmpgtu.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.cmpgtu.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -4094,13 +4094,13 @@ cv.cmpgtu.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmpgtu.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgtu.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.cmpgtu.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -4125,7 +4125,7 @@ cv.cmpgeu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4147,7 +4147,7 @@ cv.cmpgeu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4169,7 +4169,7 @@ cv.cmpgeu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4191,7 +4191,7 @@ cv.cmpgeu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4207,13 +4207,13 @@ cv.cmpgeu.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmpgeu.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.cmpgeu.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -4232,13 +4232,13 @@ cv.cmpgeu.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmpgeu.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpgeu.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.cmpgeu.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -4263,7 +4263,7 @@ cv.cmpltu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4285,7 +4285,7 @@ cv.cmpltu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4307,7 +4307,7 @@ cv.cmpltu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4329,7 +4329,7 @@ cv.cmpltu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4345,13 +4345,13 @@ cv.cmpltu.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmpltu.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.cmpltu.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -4370,13 +4370,13 @@ cv.cmpltu.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmpltu.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpltu.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.cmpltu.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -4401,7 +4401,7 @@ cv.cmpleu.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4423,7 +4423,7 @@ cv.cmpleu.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4445,7 +4445,7 @@ cv.cmpleu.sc.h t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.sc.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.sc.h t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4467,7 +4467,7 @@ cv.cmpleu.sc.b t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.sc.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.sc.b t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4483,13 +4483,13 @@ cv.cmpleu.sc.b t0, t1
//===----------------------------------------------------------------------===//
cv.cmpleu.sci.h 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.sci.h t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.sci.h t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.cmpleu.sci.h t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -4508,13 +4508,13 @@ cv.cmpleu.sci.h t0, t1
//===----------------------------------------------------------------------===//
cv.cmpleu.sci.b 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.sci.b t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cmpleu.sci.b t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: immediate must be an integer in the range [0, 63]
cv.cmpleu.sci.b t0, t1, t2
# CHECK-ERROR: immediate must be an integer in the range [0, 63]
@@ -4539,7 +4539,7 @@ cv.cplxmul.r t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.r t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.r t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4561,7 +4561,7 @@ cv.cplxmul.i t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.i t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.i t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4583,7 +4583,7 @@ cv.cplxmul.r.div2 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.r.div2 t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.r.div2 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4605,7 +4605,7 @@ cv.cplxmul.i.div2 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.i.div2 t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.i.div2 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4627,7 +4627,7 @@ cv.cplxmul.r.div4 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.r.div4 t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.r.div4 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4649,7 +4649,7 @@ cv.cplxmul.i.div4 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.i.div4 t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.i.div4 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4671,7 +4671,7 @@ cv.cplxmul.r.div8 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.r.div8 t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.r.div8 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4693,7 +4693,7 @@ cv.cplxmul.i.div8 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.i.div8 t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cplxmul.i.div8 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4709,22 +4709,22 @@ cv.cplxmul.i.div8 t0, t1
//===----------------------------------------------------------------------===//
cv.cplxconj 0, t1, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cplxconj t0, 0, t2
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cplxconj t0, t1, t2, t3
-# CHECK-ERROR: error: invalid instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cplxconj t0, t1, t2
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cplxconj t0, t1, 0
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.cplxconj t0, t1, 0
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
//===----------------------------------------------------------------------===//
// cv.subrotmj
@@ -4737,7 +4737,7 @@ cv.subrotmj t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.subrotmj t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.subrotmj t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4759,7 +4759,7 @@ cv.subrotmj.div2 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.subrotmj.div2 t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.subrotmj.div2 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4781,7 +4781,7 @@ cv.subrotmj.div4 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.subrotmj.div4 t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.subrotmj.div4 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4803,7 +4803,7 @@ cv.subrotmj.div8 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.subrotmj.div8 t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.subrotmj.div8 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4825,7 +4825,7 @@ cv.add.div2 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.div2 t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.add.div2 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4847,7 +4847,7 @@ cv.add.div4 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.div4 t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.add.div4 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4869,7 +4869,7 @@ cv.add.div8 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.add.div8 t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.add.div8 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4891,7 +4891,7 @@ cv.sub.div2 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.div2 t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sub.div2 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4913,7 +4913,7 @@ cv.sub.div4 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.div4 t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sub.div4 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4935,7 +4935,7 @@ cv.sub.div8 t0, 0, t2
# CHECK-ERROR: invalid operand for instruction
cv.sub.div8 t0, t1, t2, t3
-# CHECK-ERROR: error: invalid operand for instruction
+# CHECK-ERROR: invalid operand for instruction
cv.sub.div8 t0, t1, 0
# CHECK-ERROR: invalid operand for instruction
@@ -4945,3 +4945,4 @@ cv.sub.div8 t0, t1, 0
cv.sub.div8 t0, t1
# CHECK-ERROR: too few operands for instruction
+
diff --git a/llvm/test/MC/RISCV/insn-invalid.s b/llvm/test/MC/RISCV/insn-invalid.s
index 8d7d7a1d7cb3e..5ea48db81cc46 100644
--- a/llvm/test/MC/RISCV/insn-invalid.s
+++ b/llvm/test/MC/RISCV/insn-invalid.s
@@ -8,7 +8,7 @@
.insn r 0x33, 0, 0, a0, a1 # CHECK: :[[@LINE]]:30: error: too few operands for instruction
.insn i 0x13, 0, a0, a1 # CHECK: :[[@LINE]]:27: error: too few operands for instruction
-.insn r 0x33, 0, 0, a0, 13 # CHECK: :[[@LINE]]:1: error: invalid instruction
+.insn r 0x33, 0, 0, a0, 13 # CHECK: :[[@LINE]]:28: error: invalid operand for instruction
.insn i 0x13, 0, a0, a1, a2 # CHECK: :[[@LINE]]:28: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
.insn q 0x13, 0, a0, a1, 13, 14 # CHECK: :[[@LINE]]:7: error: invalid instruction format
diff --git a/llvm/test/MC/RISCV/rv32c-invalid.s b/llvm/test/MC/RISCV/rv32c-invalid.s
index 12be594491d02..faffd0510290b 100644
--- a/llvm/test/MC/RISCV/rv32c-invalid.s
+++ b/llvm/test/MC/RISCV/rv32c-invalid.s
@@ -6,9 +6,9 @@
## GPRC
.LBB:
c.lw ra, 4(sp)
-# CHECK: :[[#@LINE-1]]:1: error: invalid instruction
+# CHECK: :[[#@LINE-1]]:7: error: register must be a GPR from x8 to x15
c.sw sp, 4(sp)
-# CHECK: :[[#@LINE-1]]:1: error: invalid instruction
+# CHECK: :[[#@LINE-1]]:7: error: register must be a GPR from x8 to x15
c.beqz t0, .LBB
# CHECK: :[[#@LINE-1]]:9: error: register must be a GPR from x8 to x15
c.bnez s8, .LBB
@@ -115,9 +115,14 @@ c.swsp ra, -4(sp)
# CHECK: :[[#@LINE-1]]:13: error: immediate must be a multiple of 4 bytes in the range [0, 252]
## uimm7_lsb00
c.lw s0, -4(sp)
-# CHECK: :[[#@LINE-1]]:1: error: invalid instruction
+# CHECK: :[[#@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[#@LINE-2]]:11: note: invalid operand for instruction
+# CHECK: :[[#@LINE-3]]:11: note: immediate must be a multiple of 4 bytes in the range [0, 124]
+
c.sw s0, 128(sp)
-# CHECK: :[[#@LINE-1]]:1: error: invalid instruction
+# CHECK: :[[#@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[#@LINE-2]]:11: note: invalid operand for instruction
+# CHECK: :[[#@LINE-3]]:11: note: immediate must be a multiple of 4 bytes in the range [0, 124]
## simm9_lsb0
c.bnez s1, -258
diff --git a/llvm/test/MC/RISCV/rv32d-invalid.s b/llvm/test/MC/RISCV/rv32d-invalid.s
index e2eee11b93b07..9d5d270b93adb 100644
--- a/llvm/test/MC/RISCV/rv32d-invalid.s
+++ b/llvm/test/MC/RISCV/rv32d-invalid.s
@@ -15,7 +15,7 @@ fld ft1, 100(a10) # CHECK: :[[@LINE]]:14: error: expected register
fsgnjn.d fa100, fa2, fa3 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
# Integer registers where FP regs are expected
-fadd.d a2, a1, a0 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fadd.d a2, a1, a0 # CHECK: :[[@LINE]]:8: error: invalid operand for instruction
# FP registers where integer regs are expected
-fcvt.wu.d ft2, a1 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.wu.d ft2, a1 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rv32f-invalid.s b/llvm/test/MC/RISCV/rv32f-invalid.s
index cdcb203f51cc3..bdd9860976af4 100644
--- a/llvm/test/MC/RISCV/rv32f-invalid.s
+++ b/llvm/test/MC/RISCV/rv32f-invalid.s
@@ -15,10 +15,10 @@ flw ft1, 100(a10) # CHECK: :[[@LINE]]:14: error: expected register
fsgnjn.s fa100, fa2, fa3 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
# Integer registers where FP regs are expected
-fmv.x.w fs7, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.x.w fs7, a2 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
# FP registers where integer regs are expected
-fmv.w.x a8, ft2 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.w.x a8, ft2 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
# Rounding mode when a register is expected
fmadd.s f10, f11, f12, ree # CHECK: :[[@LINE]]:24: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rv32i-aliases-invalid.s b/llvm/test/MC/RISCV/rv32i-aliases-invalid.s
index 5393737dabc28..33121e60f05dd 100644
--- a/llvm/test/MC/RISCV/rv32i-aliases-invalid.s
+++ b/llvm/test/MC/RISCV/rv32i-aliases-invalid.s
@@ -24,6 +24,7 @@ la x0, 4294967296
# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
# CHECK: :[[@LINE-3]]:8: note: operand either must be a bare symbol name or an immediate integer in the range [-2147483648, 4294967295]
+
la x0, -2147483649
# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
@@ -169,7 +170,7 @@ sra x2, x3, -3
# CHECK: :[[@LINE-2]]:13: note: invalid operand for instruction
# CHECK: :[[@LINE-3]]:13: note: immediate must be an integer in the range [0, 31]
-addi x1, . # CHECK: :[[@LINE]]:1: error: invalid instruction
+addi x1, . # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
foo:
.space 4
diff --git a/llvm/test/MC/RISCV/rv32i-invalid.s b/llvm/test/MC/RISCV/rv32i-invalid.s
index 11533308782d1..a142e9a5f493a 100644
--- a/llvm/test/MC/RISCV/rv32i-invalid.s
+++ b/llvm/test/MC/RISCV/rv32i-invalid.s
@@ -51,10 +51,10 @@ jal gp, 1 # CHECK: :[[@LINE]]:9: error: immediate must be a multiple of 2 bytes
# Illegal operand modifier
## fencearg
-fence %hi(iorw), iorw # CHECK: :[[@LINE]]:7: error: operand must be formed of letters selected in-order from 'iorw' or be 0
-fence %lo(iorw), iorw # CHECK: :[[@LINE]]:7: error: operand must be formed of letters selected in-order from 'iorw' or be 0
-fence %pcrel_hi(iorw), iorw # CHECK: :[[@LINE]]:7: error: operand must be formed of letters selected in-order from 'iorw' or be 0
-fence %pcrel_lo(iorw), iorw # CHECK: :[[@LINE]]:7: error: operand must be formed of letters selected in-order from 'iorw' or be 0
+fence %hi(iorw), iorw # CHECK: :[[@LINE]]:7: error: operand must be formed of letters selected in-order from 'iorw'
+fence %lo(iorw), iorw # CHECK: :[[@LINE]]:7: error: operand must be formed of letters selected in-order from 'iorw'
+fence %pcrel_hi(iorw), iorw # CHECK: :[[@LINE]]:7: error: operand must be formed of letters selected in-order from 'iorw'
+fence %pcrel_lo(iorw), iorw # CHECK: :[[@LINE]]:7: error: operand must be formed of letters selected in-order from 'iorw'
## uimm5
slli a0, a0, %lo(1) # CHECK: :[[@LINE]]:14: error: immediate must be an integer in the range [0, 31]
@@ -70,10 +70,15 @@ csrrci x0, 43, %pcrel_lo(d) # CHECK: :[[@LINE]]:16: error: immediate must be an
ori a0, a1, %hi(foo) # CHECK: :[[@LINE]]:13: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
andi ra, sp, %pcrel_hi(123) # CHECK: :[[@LINE]]:14: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
xori a2, a3, %hi(345) # CHECK: :[[@LINE]]:14: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
-add a1, a2, (a3) # CHECK: :[[@LINE]]:1: error: invalid instruction
-add a1, a2, foo # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:13: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+add a1, a2, (a3)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:13: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+
+add a1, a2, foo
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:13: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
## uimm12
csrrw a0, %lo(1), a0 # CHECK: :[[@LINE]]:11: error: immediate must be an integer in the range [0, 4095]
@@ -147,9 +152,11 @@ auipc a0, %pcrel_lo(foo) # CHECK: :[[@LINE]]:11: error: operand must be a symbol
# TP-relative symbol names require a %tprel_add modifier.
add a0, a0, tp, zero # CHECK: :[[@LINE]]:17: error: expected '%' relocation specifier
-add a0, a0, tp, %hi(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:17: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:17: note: operand must be a symbol with %tprel_add specifier
+add a0, a0, tp, %hi(foo)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:17: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:17: note: operand must be a symbol with %tprel_add specifier
+
add a0, tp, a0, %tprel_add(foo) # CHECK: :[[@LINE]]:13: error: the second input operand must be tp/x4 when using %tprel_add specifier
# Unrecognized operand modifier
@@ -160,8 +167,8 @@ addi t0, sp, %pltpcrel(255) # CHECK: :[[@LINE]]:14: error: operand must be a sym
addi t1, %lo(t2), 1 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
# Invalid mnemonics
-subs t0, t2, t1 # CHECK: :[[@LINE]]:1: error: unrecognized instruction mnemonic, did you mean: sb, sub?
-nandi t0, zero, 0 # CHECK: :[[@LINE]]:1: error: unrecognized instruction mnemonic, did you mean: and, andi?
+subs t0, t2, t1 # CHECK: :[[@LINE]]:1: error: unrecognized instruction mnemonic
+nandi t0, zero, 0 # CHECK: :[[@LINE]]:1: error: unrecognized instruction mnemonic
# Invalid register names
addi foo, sp, 10 # CHECK: :[[@LINE]]:6: error: invalid operand for instruction
@@ -205,4 +212,4 @@ bset a0, a1, a2 # CHECK: :[[@LINE]]:1: error: instruction requires the following
addi a2, ft0, 24 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
# fence.tso accepts no operands
-fence.tso rw, rw # CHECK: :[[@LINE]]:1: error: invalid instruction
+fence.tso rw, rw # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rv32q-invalid.s b/llvm/test/MC/RISCV/rv32q-invalid.s
index 091326d5e3fc0..9b74f9f1d59c1 100644
--- a/llvm/test/MC/RISCV/rv32q-invalid.s
+++ b/llvm/test/MC/RISCV/rv32q-invalid.s
@@ -15,7 +15,7 @@ flq ft1, 100(a10) # CHECK: :[[@LINE]]:14: error: expected register
fsgnjn.q fa100, fa2, fa3 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
# Integer registers where FP regs are expected
-fadd.q a2, a1, a0 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fadd.q a2, a1, a0 # CHECK: :[[@LINE]]:8: error: invalid operand for instruction
# FP registers where integer regs are expected
-fcvt.wu.q ft2, a1 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.wu.q ft2, a1 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rv32xqccmp-invalid.s b/llvm/test/MC/RISCV/rv32xqccmp-invalid.s
index cfe159ef0f99b..635cd8b21e1e0 100644
--- a/llvm/test/MC/RISCV/rv32xqccmp-invalid.s
+++ b/llvm/test/MC/RISCV/rv32xqccmp-invalid.s
@@ -1,13 +1,13 @@
# RUN: not llvm-mc -triple=riscv32 -mattr=+xqccmp -M no-aliases -show-encoding < %s 2>&1 \
# RUN: | FileCheck -check-prefixes=CHECK-ERROR %s
-# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE+1]]:14: error: invalid operand for instruction
qc.cm.mvsa01 a1, a2
# CHECK-ERROR: :[[@LINE+1]]:14: error: rs1 and rs2 must be different
qc.cm.mvsa01 s0, s0
-# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE+1]]:14: error: invalid operand for instruction
qc.cm.mva01s a1, a2
# CHECK-ERROR: :[[@LINE+1]]:15: error: invalid register list, '{ra, s0-s10}' or '{x1, x8-x9, x18-x26}' is not supported
@@ -37,8 +37,8 @@ qc.cm.pop {ra, s0-s1}, -40
# CHECK-ERROR: :[[@LINE+1]]:14: error: register list must include 's0' or 'x8'
qc.cm.pushfp {ra}, -16
-# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE+1]]:12: error: operand must be {ra [, s0[-sN]]} or {x1 [, x8[-x9][, x18[-xN]]]}
qc.cm.push x1, -16
-# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE+1]]:14: error: operand must be {ra, s0[-sN]} or {x1, x8[-x9][, x18[-xN]]}
qc.cm.pushfp x1, -16
diff --git a/llvm/test/MC/RISCV/rv32xtheadmempair-invalid.s b/llvm/test/MC/RISCV/rv32xtheadmempair-invalid.s
index 743634616b258..918c130c6081e 100644
--- a/llvm/test/MC/RISCV/rv32xtheadmempair-invalid.s
+++ b/llvm/test/MC/RISCV/rv32xtheadmempair-invalid.s
@@ -6,13 +6,13 @@ th.ldd t0, t1, (t2), 3, 5 # CHECK: [[@LINE]]:1: error: invalid instruction
th.sdd a0, a1, (a2), 5, 4 # CHECK: [[@LINE]]:1: error: invalid instruction
th.sdd a0, a1, (a2) # CHECK: [[@LINE]]:1: error: invalid instruction
th.sdd a0, a1, (a2), 3, 5 # CHECK: [[@LINE]]:1: error: invalid instruction
-th.lwud t0, t1, (t2), 5, 4 # CHECK: [[@LINE]]:1: error: invalid instruction
+th.lwud t0, t1, (t2), 5, 4 # CHECK: [[@LINE]]:23: error: immediate must be an integer in the range [0, 3]
th.lwud t0, t1, (t2) # CHECK: [[@LINE]]:29: error: too few operands for instruction
th.lwud t0, t1, (t2), 3, 5 # CHECK: [[@LINE]]:26: error: operand must be constant 3
-th.lwd a3, a4, (a5), 5, 4 # CHECK: [[@LINE]]:1: error: invalid instruction
+th.lwd a3, a4, (a5), 5, 4 # CHECK: [[@LINE]]:22: error: immediate must be an integer in the range [0, 3]
th.lwd a3, a4, (a5) # CHECK: [[@LINE]]:29: error: too few operands for instruction
th.lwd a3, a4, (a5), 3, 5 # CHECK: [[@LINE]]:25: error: operand must be constant 3
-th.swd t3, t4, (t5), 5, 4 # CHECK: [[@LINE]]:1: error: invalid instruction
+th.swd t3, t4, (t5), 5, 4 # CHECK: [[@LINE]]:22: error: immediate must be an integer in the range [0, 3]
th.swd t3, t4, (t5) # CHECK: [[@LINE]]:29: error: too few operands for instruction
th.swd t3, t4, (t5), 3, 5 # CHECK: [[@LINE]]:25: error: operand must be constant 3
th.lwd x6, x7, (x7), 2, 3 # CHECK: [[@LINE]]:8: error: rs1, rd1, and rd2 cannot overlap
diff --git a/llvm/test/MC/RISCV/rv32zcmp-invalid.s b/llvm/test/MC/RISCV/rv32zcmp-invalid.s
index 3732e1662d152..68aa7fc548f61 100644
--- a/llvm/test/MC/RISCV/rv32zcmp-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zcmp-invalid.s
@@ -1,13 +1,13 @@
# RUN: not llvm-mc -triple=riscv32 -mattr=zcmp -M no-aliases -show-encoding < %s 2>&1 \
# RUN: | FileCheck -check-prefixes=CHECK-ERROR %s
-# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE+1]]:11: error: invalid operand for instruction
cm.mvsa01 a1, a2
# CHECK-ERROR: :[[@LINE+1]]:11: error: rs1 and rs2 must be different
cm.mvsa01 s0, s0
-# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE+1]]:11: error: invalid operand for instruction
cm.mva01s a1, a2
# CHECK-ERROR: :[[@LINE+1]]:12: error: invalid register list, '{ra, s0-s10}' or '{x1, x8-x9, x18-x26}' is not supported
@@ -46,7 +46,7 @@ cm.pop {x1, x8-x9, x18-x17}, -40
# CHECK-ERROR: :[[@LINE+1]]:16: error: register must be 'x9'
cm.pop {x1, x8-f8, x18-x17}, -40
-# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE+1]]:9: error: operand must be {ra [, s0[-sN]]} or {x1 [, x8[-x9][, x18[-xN]]]}
cm.push x1, -16
# CHECK-ERROR: :[[@LINE+1]]:16: error: register must be in the range 's1' to 's11'
diff --git a/llvm/test/MC/RISCV/rv32zdinx-invalid.s b/llvm/test/MC/RISCV/rv32zdinx-invalid.s
index 68c1c2158befa..f904f5dbe5609 100644
--- a/llvm/test/MC/RISCV/rv32zdinx-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zdinx-invalid.s
@@ -8,7 +8,7 @@ flw fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following
fadd.d fa0, fa1, fa2 # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'D' (Double-Precision Floating-Point){{$}}
# Invalid instructions
-fsw a5, 12(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+fsw a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
fmv.x.w s0, s1 # CHECK: :[[@LINE]]:1: error: invalid instruction
# Invalid register names
diff --git a/llvm/test/MC/RISCV/rv32zfh-invalid.s b/llvm/test/MC/RISCV/rv32zfh-invalid.s
index 55990f65c60cf..f66cb3f9784d5 100644
--- a/llvm/test/MC/RISCV/rv32zfh-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zfh-invalid.s
@@ -16,10 +16,10 @@ flh ft1, 100(a10) # CHECK: :[[@LINE]]:14: error: expected register
fsgnjn.h fa100, fa2, fa3 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
# Integer registers where FP regs are expected
-fmv.x.h fs7, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.x.h fs7, a2 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
# FP registers where integer regs are expected
-fmv.h.x a8, ft2 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.h.x a8, ft2 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
# Rounding mode when a register is expected
fmadd.h f10, f11, f12, ree # CHECK: :[[@LINE]]:24: error: invalid operand for instruction
@@ -30,7 +30,7 @@ fmsub.h f14, f15, f16, f17, 0 # CHECK: :[[@LINE]]:29: error: operand must be a v
fnmsub.h f18, f19, f20, f21, 0b111 # CHECK: :[[@LINE]]:30: error: operand must be a valid floating point rounding mode mnemonic
# Integer registers where FP regs are expected
-fadd.h a2, a1, a0 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fadd.h a2, a1, a0 # CHECK: :[[@LINE]]:8: error: invalid operand for instruction
# FP registers where integer regs are expected
-fcvt.wu.h ft2, a1 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.wu.h ft2, a1 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rv32zfinx-invalid.s b/llvm/test/MC/RISCV/rv32zfinx-invalid.s
index e1cc228887787..a134313fae70e 100644
--- a/llvm/test/MC/RISCV/rv32zfinx-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zfinx-invalid.s
@@ -5,7 +5,7 @@ flw fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following
fadd.s fa0, fa1, fa2 # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'F' (Single-Precision Floating-Point){{$}}
# Invalid instructions
-fsw a5, 12(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+fsw a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
fmv.x.w s0, s1 # CHECK: :[[@LINE]]:1: error: invalid instruction
fadd.d t1, t3, t5 # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'Zdinx' (Double in Integer){{$}}
diff --git a/llvm/test/MC/RISCV/rv32zhinx-invalid.s b/llvm/test/MC/RISCV/rv32zhinx-invalid.s
index d7a056e11e8cf..15127477fedd7 100644
--- a/llvm/test/MC/RISCV/rv32zhinx-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zhinx-invalid.s
@@ -5,7 +5,7 @@ flw fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following
fadd.h fa0, fa1, fa2 # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'Zfh' (Half-Precision Floating-Point){{$}}
# Invalid instructions
-fsw a5, 12(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+fsw a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
fmv.x.h s0, s1 # CHECK: :[[@LINE]]:1: error: invalid instruction
# Invalid register names
diff --git a/llvm/test/MC/RISCV/rv32zhinxmin-invalid.s b/llvm/test/MC/RISCV/rv32zhinxmin-invalid.s
index 27918f1e5d594..7d6f1686513a1 100644
--- a/llvm/test/MC/RISCV/rv32zhinxmin-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zhinxmin-invalid.s
@@ -5,7 +5,7 @@ flw fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following
fcvt.h.s fa0, fa1 # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'Zfh' (Half-Precision Floating-Point) or 'Zfhmin' (Half-Precision Floating-Point Minimal){{$}}
# Invalid instructions
-fsw a5, 12(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+fsw a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
fmv.x.h s0, s1 # CHECK: :[[@LINE]]:1: error: invalid instruction
# Invalid register names
diff --git a/llvm/test/MC/RISCV/rv64d-invalid.s b/llvm/test/MC/RISCV/rv64d-invalid.s
index 337223c131aab..0f508aafd9be5 100644
--- a/llvm/test/MC/RISCV/rv64d-invalid.s
+++ b/llvm/test/MC/RISCV/rv64d-invalid.s
@@ -1,11 +1,11 @@
# RUN: not llvm-mc -triple riscv64 -mattr=+d < %s 2>&1 | FileCheck %s
# Integer registers where FP regs are expected
-fcvt.l.d ft0, a0 # CHECK: :[[@LINE]]:1: error: invalid instruction
-fcvt.lu.d ft1, a1 # CHECK: :[[@LINE]]:1: error: invalid instruction
-fmv.x.d ft2, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.l.d ft0, a0 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
+fcvt.lu.d ft1, a1 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+fmv.x.d ft2, a2 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
# FP registers where integer regs are expected
-fcvt.d.l a3, ft3 # CHECK: :[[@LINE]]:1: error: invalid instruction
-fcvt.d.lu a4, ft4 # CHECK: :[[@LINE]]:1: error: invalid instruction
-fmv.d.x a5, ft5 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.d.l a3, ft3 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
+fcvt.d.lu a4, ft4 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
+fmv.d.x a5, ft5 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rv64f-invalid.s b/llvm/test/MC/RISCV/rv64f-invalid.s
index 9ec17c93ab924..698da796a7e70 100644
--- a/llvm/test/MC/RISCV/rv64f-invalid.s
+++ b/llvm/test/MC/RISCV/rv64f-invalid.s
@@ -1,9 +1,9 @@
# RUN: not llvm-mc -triple riscv64 -mattr=+f < %s 2>&1 | FileCheck %s
# Integer registers where FP regs are expected
-fcvt.l.s ft0, a0 # CHECK: :[[@LINE]]:1: error: invalid instruction
-fcvt.lu.s ft1, a1 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.l.s ft0, a0 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
+fcvt.lu.s ft1, a1 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
# FP registers where integer regs are expected
-fcvt.s.l a2, ft2 # CHECK: :[[@LINE]]:1: error: invalid instruction
-fcvt.s.lu a3, ft3 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.s.l a2, ft2 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
+fcvt.s.lu a3, ft3 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rv64h-invalid.s b/llvm/test/MC/RISCV/rv64h-invalid.s
index 46bf99e1df93a..080996b561cb3 100644
--- a/llvm/test/MC/RISCV/rv64h-invalid.s
+++ b/llvm/test/MC/RISCV/rv64h-invalid.s
@@ -3,9 +3,10 @@
# RUN: not llvm-mc -triple riscv64 < %s 2>&1 \
# RUN: | FileCheck %s -check-prefixes=CHECK,CHECK-OFFSET
-hfence.vvma zero, zero # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:19: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:1: note: instruction requires the following: 'H' (Hypervisor)
+hfence.vvma zero, zero
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:19: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:1: note: instruction requires the following: 'H' (Hypervisor)
hlv.h a0, 0(a1) # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'H' (Hypervisor)
diff --git a/llvm/test/MC/RISCV/rv64i-aliases-invalid.s b/llvm/test/MC/RISCV/rv64i-aliases-invalid.s
index 398cec1c57f39..f447ecc797540 100644
--- a/llvm/test/MC/RISCV/rv64i-aliases-invalid.s
+++ b/llvm/test/MC/RISCV/rv64i-aliases-invalid.s
@@ -3,112 +3,173 @@
# RUN: not llvm-mc -triple=riscv64 < %s 2>&1 -o /dev/null | FileCheck %s
li t5, 0x10000000000000000 # CHECK: :[[@LINE]]:8: error: unknown operand
-li t4, foo # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
-# CHECK: :[[@LINE-2]]:8: note: operand must be a constant 64-bit integer
+
+li t4, foo
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# CHECK: :[[@LINE-3]]:8: note: operand must be a constant 64-bit integer
la t5, 0x10000000000000000 # CHECK: :[[@LINE]]:8: error: unknown operand
-la x1, %pcrel_hi(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
-la x1, %pcrel_lo(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
-la x1, %pcrel_hi(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
-la x1, %pcrel_lo(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
-la x1, %hi(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
-la x1, %lo(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
-la x1, %hi(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
-la x1, %lo(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
-la a1, foo+foo # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:8: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
+
+la x1, %pcrel_hi(1234)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
+
+la x1, %pcrel_lo(1234)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
+
+la x1, %pcrel_hi(foo)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
+
+la x1, %pcrel_lo(foo)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
+
+la x1, %hi(1234)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
+
+la x1, %lo(1234)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
+
+la x1, %hi(foo)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
+
+la x1, %lo(foo)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
+
+la a1, foo+foo
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:8: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:8: note: operand either must be a constant 64-bit integer or a bare symbol name
lla t5, 0x10000000000000000 # CHECK: :[[@LINE]]:9: error: unknown operand
-lla x1, %pcrel_hi(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
-lla x1, %pcrel_lo(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
-lla x1, %pcrel_hi(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
-lla x1, %pcrel_lo(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
-lla x1, %hi(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
-lla x1, %lo(1234) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
-lla x1, %hi(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
-lla x1, %lo(foo) # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
-lla a1, foo+foo # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:9: note: operand must be a bare symbol name
-# CHECK: :[[@LINE-2]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
+
+lla x1, %pcrel_hi(1234)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
+
+lla x1, %pcrel_lo(1234)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
+
+lla x1, %pcrel_hi(foo)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
+
+lla x1, %pcrel_lo(foo)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
+
+lla x1, %hi(1234)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
+
+lla x1, %lo(1234)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
+
+lla x1, %hi(foo)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
+
+lla x1, %lo(foo)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
+
+lla a1, foo+foo
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: operand must be a bare symbol name
+# CHECK: :[[@LINE-3]]:9: note: operand either must be a constant 64-bit integer or a bare symbol name
+
lla a2, foo at plt # CHECK: :[[@LINE]]:12: error: unexpected token
rdinstreth x29 # CHECK: :[[@LINE]]:1: error: instruction requires the following: RV32I Base Instruction Set{{$}}
+
rdcycleh x27 # CHECK: :[[@LINE]]:1: error: instruction requires the following: RV32I Base Instruction Set{{$}}
+
rdtimeh x28 # CHECK: :[[@LINE]]:1: error: instruction requires the following: RV32I Base Instruction Set{{$}}
-sll x2, x3, 64 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 63]
-srl x2, x3, 64 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 63]
-sra x2, x3, 64 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 63]
-
-sll x2, x3, -1 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 63]
-srl x2, x3, -2 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 63]
-sra x2, x3, -3 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:13: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:13: note: immediate must be an integer in the range [0, 63]
-
-sllw x2, x3, 32 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:14: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:14: note: immediate must be an integer in the range [0, 31]
-srlw x2, x3, 32 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:14: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:14: note: immediate must be an integer in the range [0, 31]
-sraw x2, x3, 32 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:14: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:14: note: immediate must be an integer in the range [0, 31]
-
-sllw x2, x3, -1 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:14: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:14: note: immediate must be an integer in the range [0, 31]
-srlw x2, x3, -2 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:14: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:14: note: immediate must be an integer in the range [0, 31]
-sraw x2, x3, -3 # CHECK: :[[@LINE]]:1: error: invalid instruction, any one of the following would fix this:
-# CHECK: :[[@LINE-1]]:14: note: invalid operand for instruction
-# CHECK: :[[@LINE-2]]:14: note: immediate must be an integer in the range [0, 31]
+sll x2, x3, 64
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:13: note: immediate must be an integer in the range [0, 63]
+
+srl x2, x3, 64
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:13: note: immediate must be an integer in the range [0, 63]
+
+sra x2, x3, 64
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:13: note: immediate must be an integer in the range [0, 63]
+
+sll x2, x3, -1
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:13: note: immediate must be an integer in the range [0, 63]
+
+srl x2, x3, -2
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:13: note: immediate must be an integer in the range [0, 63]
+
+sra x2, x3, -3
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:13: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:13: note: immediate must be an integer in the range [0, 63]
+
+sllw x2, x3, 32
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:14: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:14: note: immediate must be an integer in the range [0, 31]
+
+srlw x2, x3, 32
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:14: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:14: note: immediate must be an integer in the range [0, 31]
+
+sraw x2, x3, 32
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:14: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:14: note: immediate must be an integer in the range [0, 31]
+
+sllw x2, x3, -1
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:14: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:14: note: immediate must be an integer in the range [0, 31]
+
+srlw x2, x3, -2
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:14: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:14: note: immediate must be an integer in the range [0, 31]
+
+sraw x2, x3, -3
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:14: note: invalid operand for instruction
+# CHECK: :[[@LINE-3]]:14: note: immediate must be an integer in the range [0, 31]
foo:
.space 8
diff --git a/llvm/test/MC/RISCV/rv64q-invalid.s b/llvm/test/MC/RISCV/rv64q-invalid.s
index 8e68f2bfca8ed..ac469c268d7ad 100644
--- a/llvm/test/MC/RISCV/rv64q-invalid.s
+++ b/llvm/test/MC/RISCV/rv64q-invalid.s
@@ -1,9 +1,9 @@
# RUN: not llvm-mc -triple riscv64 -mattr=+q < %s 2>&1 | FileCheck %s
# Integer registers where FP regs are expected
-fcvt.l.q ft0, a0 # CHECK: :[[@LINE]]:1: error: invalid instruction
-fcvt.lu.q ft1, a1 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.l.q ft0, a0 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
+fcvt.lu.q ft1, a1 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
# FP registers where integer regs are expected
-fcvt.q.l a3, ft3 # CHECK: :[[@LINE]]:1: error: invalid instruction
-fcvt.q.lu a4, ft4 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.q.l a3, ft3 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
+fcvt.q.lu a4, ft4 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rv64xqccmp-invalid.s b/llvm/test/MC/RISCV/rv64xqccmp-invalid.s
index f3e99607f85b1..1d4487ba599a5 100644
--- a/llvm/test/MC/RISCV/rv64xqccmp-invalid.s
+++ b/llvm/test/MC/RISCV/rv64xqccmp-invalid.s
@@ -1,13 +1,13 @@
# RUN: not llvm-mc -triple=riscv64 -mattr=xqccmp -M no-aliases -show-encoding < %s 2>&1 \
# RUN: | FileCheck -check-prefixes=CHECK-ERROR %s
-# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE+1]]:14: error: invalid operand for instruction
qc.cm.mvsa01 a1, a2
# CHECK-ERROR: :[[@LINE+1]]:14: error: rs1 and rs2 must be different
qc.cm.mvsa01 s0, s0
-# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE+1]]:14: error: invalid operand for instruction
qc.cm.mva01s a1, a2
# CHECK-ERROR: :[[@LINE+1]]:15: error: invalid register list, '{ra, s0-s10}' or '{x1, x8-x9, x18-x26}' is not supported
diff --git a/llvm/test/MC/RISCV/rv64xtheadfmemidx-invalid.s b/llvm/test/MC/RISCV/rv64xtheadfmemidx-invalid.s
index 3777ca6235c1d..57082d667e463 100644
--- a/llvm/test/MC/RISCV/rv64xtheadfmemidx-invalid.s
+++ b/llvm/test/MC/RISCV/rv64xtheadfmemidx-invalid.s
@@ -3,7 +3,7 @@
th.flrd fa0, a1, a2, 5 # CHECK: :[[@LINE]]:22: error: immediate must be an integer in the range [0, 3]
th.flrd a0, a1, a2, 3 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
-th.flrw 0(fa0), a1, a2, 0 # CHECK: :[[@LINE]]:1: error: invalid instruction
-th.flrw fa0, 4(a1), a2, 3 # CHECK: :[[@LINE]]:1: error: invalid instruction
-th.fsrd fa0, a1, -1(a2), 0 # CHECK: :[[@LINE]]:1: error: invalid instruction
+th.flrw 0(fa0), a1, a2, 0 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+th.flrw fa0, 4(a1), a2, 3 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
+th.fsrd fa0, a1, -1(a2), 0 # CHECK: :[[@LINE]]:18: error: invalid operand for instruction
th.fsrd fa0, a1, a2, -3 # CHECK: :[[@LINE]]:22: error: immediate must be an integer in the range [0, 3]
diff --git a/llvm/test/MC/RISCV/rv64xtheadmemidx-invalid.s b/llvm/test/MC/RISCV/rv64xtheadmemidx-invalid.s
index 590d73d408780..d973cf15bbad4 100644
--- a/llvm/test/MC/RISCV/rv64xtheadmemidx-invalid.s
+++ b/llvm/test/MC/RISCV/rv64xtheadmemidx-invalid.s
@@ -1,13 +1,13 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+xtheadmemidx < %s 2>&1 | FileCheck %s
# RUN: not llvm-mc -triple riscv64 -mattr=+xtheadmemidx < %s 2>&1 | FileCheck %s
-th.ldia 0(a0), (a1), 0, 0 # CHECK: :[[@LINE]]:1: error: invalid instruction
-th.ldib a0, 2(a1), 15, 1 # CHECK: :[[@LINE]]:1: error: invalid instruction
+th.ldia 0(a0), (a1), 0, 0 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
+th.ldib a0, 2(a1), 15, 1 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
th.lwia a0, (a1), 30, 2 # CHECK: :[[@LINE]]:20: error: immediate must be an integer in the range [-16, 15]
th.lwib a0, (a1), -16, 43 # CHECK: :[[@LINE]]:25: error: immediate must be an integer in the range [0, 3]
th.lhib a0, (a1), -17, 3 # CHECK: :[[@LINE]]:20: error: immediate must be an integer in the range [-16, 15]
-th.lrb -2(a0), a1, a2, 0 # CHECK: :[[@LINE]]:1: error: invalid instruction
-th.lrw a0, 3(a1), a2, 1 # CHECK: :[[@LINE]]:1: error: invalid instruction
-th.lrw a0, a1, 4(a2), 2 # CHECK: :[[@LINE]]:1: error: invalid instruction
+th.lrb -2(a0), a1, a2, 0 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
+th.lrw a0, 3(a1), a2, 1 # CHECK: :[[@LINE]]:13: error: invalid operand for instruction
+th.lrw a0, a1, 4(a2), 2 # CHECK: :[[@LINE]]:17: error: invalid operand for instruction
th.lrh a0, a1, a2, 5 # CHECK: :[[@LINE]]:21: error: immediate must be an integer in the range [0, 3]
th.lrhu a0, a1, a2, -1 # CHECK: :[[@LINE]]:22: error: immediate must be an integer in the range [0, 3]
diff --git a/llvm/test/MC/RISCV/rv64xtheadmempair-invalid.s b/llvm/test/MC/RISCV/rv64xtheadmempair-invalid.s
index 7a8146e43062c..fcbae40f671e6 100644
--- a/llvm/test/MC/RISCV/rv64xtheadmempair-invalid.s
+++ b/llvm/test/MC/RISCV/rv64xtheadmempair-invalid.s
@@ -6,13 +6,13 @@ th.ldd t0, t1, (t2), 3, 5 # CHECK: [[@LINE]]:25: error: operand must be consta
th.sdd a0, a1, (a2), 5, 4 # CHECK: [[@LINE]]:22: error: immediate must be an integer in the range [0, 3]
th.sdd a0, a1, (a2) # CHECK: [[@LINE]]:29: error: too few operands for instruction
th.sdd a0, a1, (a2), 3, 5 # CHECK: [[@LINE]]:25: error: operand must be constant 4
-th.lwud t0, t1, (t2), 5, 4 # CHECK: [[@LINE]]:1: error: invalid instruction
+th.lwud t0, t1, (t2), 5, 4 # CHECK: [[@LINE]]:23: error: immediate must be an integer in the range [0, 3]
th.lwud t0, t1, (t2) # CHECK: [[@LINE]]:29: error: too few operands for instruction
th.lwud t0, t1, (t2), 3, 5 # CHECK: [[@LINE]]:26: error: operand must be constant 3
-th.lwd a3, a4, (a5), 5, 4 # CHECK: [[@LINE]]:1: error: invalid instruction
+th.lwd a3, a4, (a5), 5, 4 # CHECK: [[@LINE]]:22: error: immediate must be an integer in the range [0, 3]
th.lwd a3, a4, (a5) # CHECK: [[@LINE]]:29: error: too few operands for instruction
th.lwd a3, a4, (a5), 3, 5 # CHECK: [[@LINE]]:25: error: operand must be constant 3
-th.swd t3, t4, (t5), 5, 4 # CHECK: [[@LINE]]:1: error: invalid instruction
+th.swd t3, t4, (t5), 5, 4 # CHECK: [[@LINE]]:22: error: immediate must be an integer in the range [0, 3]
th.swd t3, t4, (t5) # CHECK: [[@LINE]]:29: error: too few operands for instruction
th.swd t3, t4, (t5), 3, 5 # CHECK: [[@LINE]]:25: error: operand must be constant 3
th.ldd x6, x6, (x7), 2, 4 # CHECK: [[@LINE]]:8: error: rs1, rd1, and rd2 cannot overlap
diff --git a/llvm/test/MC/RISCV/rv64zcmp-invalid.s b/llvm/test/MC/RISCV/rv64zcmp-invalid.s
index ae4d2aab43edf..e806da81ea6d3 100644
--- a/llvm/test/MC/RISCV/rv64zcmp-invalid.s
+++ b/llvm/test/MC/RISCV/rv64zcmp-invalid.s
@@ -1,13 +1,13 @@
# RUN: not llvm-mc -triple=riscv64 -mattr=zcmp -M no-aliases -show-encoding < %s 2>&1 \
# RUN: | FileCheck -check-prefixes=CHECK-ERROR %s
-# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE+1]]:11: error: invalid operand for instruction
cm.mvsa01 a1, a2
# CHECK-ERROR: :[[@LINE+1]]:11: error: rs1 and rs2 must be different
cm.mvsa01 s0, s0
-# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-ERROR: :[[@LINE+1]]:11: error: invalid operand for instruction
cm.mva01s a1, a2
# CHECK-ERROR: :[[@LINE+1]]:12: error: invalid register list, '{ra, s0-s10}' or '{x1, x8-x9, x18-x26}' is not supported
diff --git a/llvm/test/MC/RISCV/rv64zdinx-invalid.s b/llvm/test/MC/RISCV/rv64zdinx-invalid.s
index 51c3269004ed7..36970328d35ca 100644
--- a/llvm/test/MC/RISCV/rv64zdinx-invalid.s
+++ b/llvm/test/MC/RISCV/rv64zdinx-invalid.s
@@ -5,7 +5,7 @@ fld fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following
ld a0, -2049(a1) # CHECK: :[[@LINE]]:8: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
# Invalid instructions
-fsd a5, 12(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+fsd a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
sd fa4, 64(sp) # CHECK: :[[@LINE]]:4: error: invalid operand for instruction
fmv.x.d t2, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
fmv.d.x a5, t5 # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rv64zfh-invalid.s b/llvm/test/MC/RISCV/rv64zfh-invalid.s
index 17749cc1e7bec..e51c64984c259 100644
--- a/llvm/test/MC/RISCV/rv64zfh-invalid.s
+++ b/llvm/test/MC/RISCV/rv64zfh-invalid.s
@@ -7,9 +7,9 @@ flh ft1, -2049(a0) # CHECK: :[[@LINE]]:10: error: operand must be a symbol with
fsh ft2, 2048(a1) # CHECK: :[[@LINE]]:10: error: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
# Integer registers where FP regs are expected
-fcvt.l.h ft0, a0 # CHECK: :[[@LINE]]:1: error: invalid instruction
-fcvt.lu.h ft1, a1 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.l.h ft0, a0 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
+fcvt.lu.h ft1, a1 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
# FP registers where integer regs are expected
-fcvt.h.l a2, ft2 # CHECK: :[[@LINE]]:1: error: invalid instruction
-fcvt.h.lu a3, ft3 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.h.l a2, ft2 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
+fcvt.h.lu a3, ft3 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rv64zfinx-invalid.s b/llvm/test/MC/RISCV/rv64zfinx-invalid.s
index 0f19413ed0acd..efbe766b34bc2 100644
--- a/llvm/test/MC/RISCV/rv64zfinx-invalid.s
+++ b/llvm/test/MC/RISCV/rv64zfinx-invalid.s
@@ -4,7 +4,7 @@
flw fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'F' (Single-Precision Floating-Point){{$}}
# Invalid instructions
-fsw a5, 12(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+fsw a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
fmv.x.w t2, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
fmv.w.x a5, t5 # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rv64zhinx-invalid.s b/llvm/test/MC/RISCV/rv64zhinx-invalid.s
index cd926f17ed417..651baad109a87 100644
--- a/llvm/test/MC/RISCV/rv64zhinx-invalid.s
+++ b/llvm/test/MC/RISCV/rv64zhinx-invalid.s
@@ -4,7 +4,7 @@
flh fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'Zfh' (Half-Precision Floating-Point) or 'Zfhmin' (Half-Precision Floating-Point Minimal) or 'Zfbfmin' (Scalar BF16 Converts){{$}}
# Invalid instructions
-fsh a5, 12(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+fsh a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
fmv.x.h t2, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
fmv.h.x a5, t5 # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rv64zhinxmin-invalid.s b/llvm/test/MC/RISCV/rv64zhinxmin-invalid.s
index 4fec91a2223f0..f7866d906b604 100644
--- a/llvm/test/MC/RISCV/rv64zhinxmin-invalid.s
+++ b/llvm/test/MC/RISCV/rv64zhinxmin-invalid.s
@@ -4,10 +4,10 @@
flh fa4, 12(sp) # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'Zfh' (Half-Precision Floating-Point) or 'Zfhmin' (Half-Precision Floating-Point Minimal) or 'Zfbfmin' (Scalar BF16 Converts){{$}}
# Invalid instructions
-fsh a5, 12(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+fsh a5, 12(sp) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
fmv.x.h t2, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
fmv.h.x a5, t5 # CHECK: :[[@LINE]]:1: error: invalid instruction
# FP registers where integer regs are expected
-fcvt.d.h a0, fa2 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fcvt.d.h a0, fa2 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
fcvt.h.d a0, fa2 # CHECK: :[[@LINE]]:1: error: invalid instruction
diff --git a/llvm/test/MC/RISCV/rve-invalid.s b/llvm/test/MC/RISCV/rve-invalid.s
index ebb3e6015a6f0..e61d170b7011b 100644
--- a/llvm/test/MC/RISCV/rve-invalid.s
+++ b/llvm/test/MC/RISCV/rve-invalid.s
@@ -117,7 +117,7 @@ auipc t6, 32
# CHECK: :[[@LINE+1]]:8: note: register must be a GPR excluding zero (x0)
c.addi x31, 0
# CHECK-DIS: 9846 <unknown>
-# CHECK: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK: :[[@LINE+1]]:7: error: invalid operand for instruction
c.add x16, x17
# CHECK-DIS: 8046 <unknown>
# CHECK: :[[@LINE+1]]:10: error: register must be a GPR excluding zero (x0)
diff --git a/llvm/test/MC/RISCV/rvv/invalid-alt.s b/llvm/test/MC/RISCV/rvv/invalid-alt.s
index da2ea65057e14..108bbbce9e3fe 100644
--- a/llvm/test/MC/RISCV/rvv/invalid-alt.s
+++ b/llvm/test/MC/RISCV/rvv/invalid-alt.s
@@ -4,7 +4,7 @@
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
vsetvli a2, a0, e32alt, m1, ta, ma
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
vsetvli a2, a0, e64alt, m1, ta, ma
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
diff --git a/llvm/test/MC/RISCV/rvv/invalid.s b/llvm/test/MC/RISCV/rvv/invalid.s
index 63b920d9cd255..9c582b70b7f65 100644
--- a/llvm/test/MC/RISCV/rvv/invalid.s
+++ b/llvm/test/MC/RISCV/rvv/invalid.s
@@ -26,22 +26,22 @@ vsetvli a2, a0, e32,m16
# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
vsetvli a2, a0, e128,m8
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
vsetvli a2, a0, e256,m8
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
vsetvli a2, a0, e512,m8
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
vsetvli a2, a0, e1024,m8
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
vsetvli a2, a0, e2048,m8
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
vsetvli a2, a0, e1,m8
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
vsetvli a2, a0, e8,m1,tx
# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
@@ -50,7 +50,7 @@ vsetvli a2, a0, e8,m1,ta,mx
# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
vsetvli a2, a0, e8x,m1,tu,mu
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
vsetvli a2, a0, e8,m1z,tu,mu
# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
diff --git a/llvm/test/MC/RISCV/rvv/zvfbdota32f-invalid.s b/llvm/test/MC/RISCV/rvv/zvfbdota32f-invalid.s
index 9041adc93a709..b317d4e39e342 100644
--- a/llvm/test/MC/RISCV/rvv/zvfbdota32f-invalid.s
+++ b/llvm/test/MC/RISCV/rvv/zvfbdota32f-invalid.s
@@ -2,7 +2,7 @@
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
# Invalid vsetvli
-# CHECK-ERROR: invalid instruction
+# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
vsetvli a0, zero, e888, m1, ta, ma
# Invalid ci
@@ -14,5 +14,5 @@ vfbdota.vv v8, v16, v12, 8
vfbdota.vv v8, v17, v12, 1
# Invalid vs2 and ci
-# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction{{$}}
+# CHECK-ERROR: :[[@LINE+1]]:16: error: invalid operand for instruction{{$}}
vfbdota.vv v8, v17, v12, 8
diff --git a/llvm/test/MC/RISCV/rvv/zvfqwbdota8f-invalid.s b/llvm/test/MC/RISCV/rvv/zvfqwbdota8f-invalid.s
index 6b6bfa6de548c..d1288674dfd1d 100644
--- a/llvm/test/MC/RISCV/rvv/zvfqwbdota8f-invalid.s
+++ b/llvm/test/MC/RISCV/rvv/zvfqwbdota8f-invalid.s
@@ -2,7 +2,7 @@
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
# Invalid vsetvli
-# CHECK-ERROR: invalid instruction{{$}}
+# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]{{$}}
vsetvli a0, zero, e888, m1, ta, ma
# Invalid ci
@@ -14,5 +14,5 @@ vfqwbdota.vv v8, v16, v12, 8
vfqwbdota.vv v8, v17, v12, 1
# Invalid vs2 and ci
-# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction{{$}}
+# CHECK-ERROR: :[[@LINE+1]]:18: error: invalid operand for instruction{{$}}
vfqwbdota.vv v8, v17, v12, 8
diff --git a/llvm/test/MC/RISCV/rvv/zvfwbdota16bf-invalid.s b/llvm/test/MC/RISCV/rvv/zvfwbdota16bf-invalid.s
index 332eae24f40ed..2132e4eaa28f0 100644
--- a/llvm/test/MC/RISCV/rvv/zvfwbdota16bf-invalid.s
+++ b/llvm/test/MC/RISCV/rvv/zvfwbdota16bf-invalid.s
@@ -2,7 +2,7 @@
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
# Invalid vsetvli
-# CHECK-ERROR: invalid instruction{{$}}
+# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]{{$}}
vsetvli a0, zero, e888, m1, ta, ma
# Invalid ci
@@ -14,5 +14,5 @@ vfwbdota.vv v8, v16, v12, 8
vfwbdota.vv v8, v17, v12, 1
# Invalid vs2 and ci
-# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction{{$}}
+# CHECK-ERROR: :[[@LINE+1]]:17: error: invalid operand for instruction{{$}}
vfwbdota.vv v8, v17, v12, 8
diff --git a/llvm/test/MC/RISCV/rvv/zvqwbdota-invalid.s b/llvm/test/MC/RISCV/rvv/zvqwbdota-invalid.s
index 040c360a48618..f7fddad9680e7 100644
--- a/llvm/test/MC/RISCV/rvv/zvqwbdota-invalid.s
+++ b/llvm/test/MC/RISCV/rvv/zvqwbdota-invalid.s
@@ -2,7 +2,7 @@
# RUN: | FileCheck %s --check-prefix=CHECK-ERROR
# Invalid vsetvli
-# CHECK-ERROR: invalid instruction{{$}}
+# CHECK-ERROR: operand must be e[8|8alt|16|16alt|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]{{$}}
vsetvli a0, zero, e888, m1, ta, ma
# Invalid ci
@@ -14,5 +14,5 @@ vqwbdotau.vv v8, v16, v12, 8
vqwbdotau.vv v8, v17, v12, 1
# Invalid vs2 and ci
-# CHECK-ERROR: :[[@LINE+1]]:1: error: invalid instruction{{$}}
+# CHECK-ERROR: :[[@LINE+1]]:18: error: invalid operand for instruction{{$}}
vqwbdotau.vv v8, v17, v12, 8
diff --git a/llvm/test/MC/RISCV/rvy/rvy-basic-invalid.s b/llvm/test/MC/RISCV/rvy/rvy-basic-invalid.s
index 0c5ff9084e74e..d3a421c4bb3c9 100644
--- a/llvm/test/MC/RISCV/rvy/rvy-basic-invalid.s
+++ b/llvm/test/MC/RISCV/rvy/rvy-basic-invalid.s
@@ -14,10 +14,12 @@ yadd a0, a1, zero
// CHECK: :[[#@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
// CHECK: :[[#@LINE-2]]:14: note: register must be a GPR excluding zero (x0)
// CHECK: :[[#@LINE-3]]:14: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+
yadd a0, a1, x0
// CHECK: :[[#@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
// CHECK: :[[#@LINE-2]]:14: note: register must be a GPR excluding zero (x0)
// CHECK: :[[#@LINE-3]]:14: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+
srliy a0, a1, 65
// CHECK-32: :[[#@LINE-1]]:15: error: immediate must be an integer equal to XLEN (32)
// CHECK-64: :[[#@LINE-2]]:15: error: immediate must be an integer equal to XLEN (64)
diff --git a/llvm/test/MC/RISCV/rvzfbfmin-invalid.s b/llvm/test/MC/RISCV/rvzfbfmin-invalid.s
index a6d9f848702cd..b274c780e54b1 100644
--- a/llvm/test/MC/RISCV/rvzfbfmin-invalid.s
+++ b/llvm/test/MC/RISCV/rvzfbfmin-invalid.s
@@ -16,10 +16,10 @@ flh ft15, 100(a0) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
flh ft1, 100(a10) # CHECK: :[[@LINE]]:14: error: expected register
# Integer registers where FP regs are expected
-fmv.x.h fs7, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.x.h fs7, a2 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
# FP registers where integer regs are expected
-fmv.h.x a8, ft2 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.h.x a8, ft2 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
# Attempting to use fcvt instructions from zfhmin
fcvt.s.h fa0, ft0 # CHECK: [[@LINE]]:1: error: instruction requires the following: 'Zfh' (Half-Precision Floating-Point) or 'Zfhmin' (Half-Precision Floating-Point Minimal)
diff --git a/llvm/test/MC/RISCV/rvzfhmin-invalid.s b/llvm/test/MC/RISCV/rvzfhmin-invalid.s
index ea020cc999692..ea46ebf0253d9 100644
--- a/llvm/test/MC/RISCV/rvzfhmin-invalid.s
+++ b/llvm/test/MC/RISCV/rvzfhmin-invalid.s
@@ -16,10 +16,10 @@ flh ft15, 100(a0) # CHECK: :[[@LINE]]:5: error: invalid operand for instruction
flh ft1, 100(a10) # CHECK: :[[@LINE]]:14: error: expected register
# Integer registers where FP regs are expected
-fmv.x.h fs7, a2 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.x.h fs7, a2 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
# FP registers where integer regs are expected
-fmv.h.x a8, ft2 # CHECK: :[[@LINE]]:1: error: invalid instruction
+fmv.h.x a8, ft2 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
# Zfh instructions
fmadd.h f10, f11, f12, f13, dyn # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'Zfh' (Half-Precision Floating-Point){{$}}
diff --git a/llvm/test/MC/RISCV/rvzicbop-invalid.s b/llvm/test/MC/RISCV/rvzicbop-invalid.s
index b07f3d01dc65d..a158764c489aa 100644
--- a/llvm/test/MC/RISCV/rvzicbop-invalid.s
+++ b/llvm/test/MC/RISCV/rvzicbop-invalid.s
@@ -2,8 +2,8 @@
# RUN: not llvm-mc -triple riscv64 -mattr=+zicbop < %s 2>&1 | FileCheck %s
# Memory operand not formatted correctly.
-prefetch.i a0, 32 # CHECK: :[[@LINE]]:1: error: invalid instruction
-prefetch.r 32, a0 # CHECK: :[[@LINE]]:1: error: invalid instruction
+prefetch.i a0, 32 # CHECK: :[[@LINE]]:12: error: immediate must be a multiple of 32 bytes in the range [-2048, 2016]
+prefetch.r 32, a0 # CHECK: :[[@LINE]]:16: error: invalid operand for instruction
prefetch.w a0(32) # CHECK: :[[@LINE]]:14: error: unexpected token
# Out of range offset.
diff --git a/llvm/test/MC/RISCV/rvzihintntl-invalid.s b/llvm/test/MC/RISCV/rvzihintntl-invalid.s
index ca5c91c554517..9fc647100fcf4 100644
--- a/llvm/test/MC/RISCV/rvzihintntl-invalid.s
+++ b/llvm/test/MC/RISCV/rvzihintntl-invalid.s
@@ -12,7 +12,7 @@ ntl.pall 2 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
ntl.s1 3 # CHECK: :[[@LINE]]:8: error: invalid operand for instruction
ntl.all 4 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
-ntl.p1 t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
-ntl.pall t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
-ntl.s1 t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
-ntl.all t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
+ntl.p1 t0, t1 # CHECK: :[[@LINE]]:8: error: invalid operand for instruction
+ntl.pall t0, t1 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
+ntl.s1 t0, t1 # CHECK: :[[@LINE]]:8: error: invalid operand for instruction
+ntl.all t0, t1 # CHECK: :[[@LINE]]:9: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/rvzihintntlc-invalid.s b/llvm/test/MC/RISCV/rvzihintntlc-invalid.s
index 4308321bc31a3..04510d1c24235 100644
--- a/llvm/test/MC/RISCV/rvzihintntlc-invalid.s
+++ b/llvm/test/MC/RISCV/rvzihintntlc-invalid.s
@@ -6,8 +6,8 @@ c.ntl.pall 2 # CHECK: :[[@LINE]]:12: error: invalid operand for instruction
c.ntl.s1 3 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
c.ntl.all 4 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
-c.ntl.p1 t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
-c.ntl.pall t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
-c.ntl.s1 t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
-c.ntl.all t0, t1 # CHECK: :[[@LINE]]:1: error: invalid instruction
+c.ntl.p1 t0, t1 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
+c.ntl.pall t0, t1 # CHECK: :[[@LINE]]:12: error: invalid operand for instruction
+c.ntl.s1 t0, t1 # CHECK: :[[@LINE]]:10: error: invalid operand for instruction
+c.ntl.all t0, t1 # CHECK: :[[@LINE]]:11: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/tlsdesc.s b/llvm/test/MC/RISCV/tlsdesc.s
index 3fa4d2757b23c..8c7b16a3182d9 100644
--- a/llvm/test/MC/RISCV/tlsdesc.s
+++ b/llvm/test/MC/RISCV/tlsdesc.s
@@ -45,14 +45,20 @@ start: # @start
auipc a0, %tlsdesc_hi(a+b) # ERR: :[[#@LINE]]:12: error: operand must be a symbol with a %pcrel_hi/%got_pcrel_hi/%tls_ie_pcrel_hi/%tls_gd_pcrel_hi specifier or an integer in the range
lw a0, t0, %tlsdesc_load_lo(a_symbol) # ERR: :[[#@LINE]]:15: error: invalid operand for instruction
- lw a0, t0, %tlsdesc_load_lo(a_symbol)(a4) # ERR: :[[#@LINE]]:2: error: invalid instruction
+ lw a0, t0, %tlsdesc_load_lo(a_symbol)(a4)
+# ERR: :[[#@LINE-1]]:2: error: invalid instruction, any one of the following would fix this:
+# ERR: :[[#@LINE-2]]:15: note: invalid operand for instruction
+# ERR: :[[#@LINE-3]]:11: note: invalid operand for instruction
+# ERR: :[[#@LINE-4]]:11: note: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo specifier or an integer in the range [-2048, 2047]
+# ERR: :[[#@LINE-5]]:11: note: immediate must be an integer in the range [-2048, 2047]
- addi a0, t0, %tlsdesc_add_lo(a_symbol)(a4) # ERR: :[[#@LINE]]:2: error: invalid instruction
- addi a0, %tlsdesc_add_lo(a_symbol) # ERR: :[[#@LINE]]:2: error: invalid instruction
- addi x1, %tlsdesc_load_lo(a_symbol)(a0) # ERR: :[[#@LINE]]:2: error: invalid instruction
+ addi a0, t0, %tlsdesc_add_lo(a_symbol)(a4) # ERR: :[[#@LINE]]:41: error: invalid operand for instruction
+ addi a0, %tlsdesc_add_lo(a_symbol) # ERR: :[[#@LINE]]:11: error: invalid operand for instruction
+ addi x1, %tlsdesc_load_lo(a_symbol)(a0) # ERR: :[[#@LINE]]:11: error: invalid operand for instruction
- jalr x5, 0(a1), %tlsdesc_hi(a_symbol) # ERR: :[[#@LINE]]:2: error: invalid instruction, any one of the following would fix this:
- # ERR: :[[#@LINE-1]]:18: note: invalid operand for instruction
- # ERR: :[[#@LINE-2]]:18: note: operand must be a symbol with %tlsdesc_call specifier
+ jalr x5, 0(a1), %tlsdesc_hi(a_symbol)
+# ERR: :[[#@LINE-1]]:2: error: invalid instruction, any one of the following would fix this:
+# ERR: :[[#@LINE-2]]:18: note: invalid operand for instruction
+# ERR: :[[#@LINE-3]]:18: note: operand must be a symbol with %tlsdesc_call specifier
jalr x1, 0(a1), %tlsdesc_call(a_symbol) # ERR: :[[#@LINE]]:13: error: the output operand must be t0/x5 when using %tlsdesc_call specifier
.endif
diff --git a/llvm/test/MC/RISCV/xandesperf-invalid.s b/llvm/test/MC/RISCV/xandesperf-invalid.s
index 8382782ffe893..d095e7e24b99c 100644
--- a/llvm/test/MC/RISCV/xandesperf-invalid.s
+++ b/llvm/test/MC/RISCV/xandesperf-invalid.s
@@ -8,8 +8,8 @@ nds.bbc t0, 33, 256 # CHECK: :[[@LINE]]:13: error: immediate must be an integer
nds.bbs t1, 33, 256 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 31]
## uimm7
-nds.beqc t0, 1024, 13 # CHECK: :[[@LINE]]:1: error: invalid instruction
-nds.bnec t1, -1, -13 # CHECK: :[[@LINE]]:1: error: invalid instruction
+nds.beqc t0, 1024, 13 # CHECK: :[[@LINE]]:14: error: immediate must be an integer in the range [0, 127]
+nds.bnec t1, -1, -13 # CHECK: :[[@LINE]]:14: error: immediate must be an integer in the range [0, 127]
## simm11_lsb0
nds.bbc t0, 7, 1024 # CHECK: :[[@LINE]]:16: error: immediate must be a multiple of 2 bytes in the range [-1024, 1022]
diff --git a/llvm/test/MC/RISCV/xmips-invalid.s b/llvm/test/MC/RISCV/xmips-invalid.s
index 7023538b2cf86..b63e3a8bdcdf1 100644
--- a/llvm/test/MC/RISCV/xmips-invalid.s
+++ b/llvm/test/MC/RISCV/xmips-invalid.s
@@ -5,7 +5,7 @@ mips.pause 10
# CHECK: error: invalid operand for instruction
mips.ehb 10
-# CHECK: error: invalid operand for instruction
+# CHECK: error: invalid operand for instruction
mips.ihb 10
# CHECK: error: invalid operand for instruction
@@ -20,7 +20,7 @@ mips.pref 8, 511(a0)
# CHECK-FEATURE: error: instruction requires the following: 'Xmipscbop' (MIPS hardware prefetch)
mips.ccmov x0, x1, 0x10
-# CHECK: error: invalid instruction
+# CHECK: error: invalid operand for instruction
mips.ccmov x10
# CHECK: error: too few operands for instruction
@@ -32,7 +32,7 @@ mips.lwp x10, x11
# CHECK: error: too few operands for instruction
mips.ldp x9, 0x20
-# CHECK: error: invalid instruction
+# CHECK: error: invalid operand for instruction
mips.lwp x11, x12, 0(x13)
# CHECK-FEATURE: error: instruction requires the following: 'Xmipslsp' (load and store pair instructions)
@@ -41,4 +41,4 @@ mips.swp x18, x19, 8(x2)
# CHECK-FEATURE: error: instruction requires the following: 'Xmipslsp' (load and store pair instructions)
mips.sdp 0x10, x3, 12(x4)
-# CHECK: error: invalid instruction
+# CHECK: error: invalid operand for instruction
diff --git a/llvm/test/MC/RISCV/xqcia-invalid.s b/llvm/test/MC/RISCV/xqcia-invalid.s
index a6c60f3848567..3b35f75e6cf68 100644
--- a/llvm/test/MC/RISCV/xqcia-invalid.s
+++ b/llvm/test/MC/RISCV/xqcia-invalid.s
@@ -161,8 +161,8 @@ qc.wrap x3, x30, x0
qc.wrap x3, x30, x23
-# CHECK-PLUS: :[[@LINE+2]]:1: error: invalid instruction
-# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
+# CHECK-MINUS: :[[@LINE+1]]:10: error: register must be a GPR excluding zero (x0)
qc.wrapi x0, 12, 2047
# CHECK-PLUS: :[[@LINE+2]]:10: error: register must be a GPR excluding zero (x0)
diff --git a/llvm/test/MC/RISCV/xqciio-invalid.s b/llvm/test/MC/RISCV/xqciio-invalid.s
index 0913175c917cb..25a2b8f992366 100644
--- a/llvm/test/MC/RISCV/xqciio-invalid.s
+++ b/llvm/test/MC/RISCV/xqciio-invalid.s
@@ -7,10 +7,14 @@
# CHECK: :[[@LINE+1]]:18: error: expected register
qc.outw x5, 2048(10)
-# CHECK-PLUS: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-PLUS: :[[@LINE+3]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-PLUS: :[[@LINE+2]]:13: note: invalid operand for instruction
+# CHECK-PLUS: :[[@LINE+1]]:13: note: immediate must be a multiple of 4 bytes in the range [0, 16380]
qc.outw x5, x10
-# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-MINUS: :[[@LINE+3]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-MINUS: :[[@LINE+2]]:13: note: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:13: note: immediate must be a multiple of 4 bytes in the range [0, 16380]
qc.outw x5, x10
# CHECK-PLUS: :[[@LINE+1]]:13: error: immediate must be a multiple of 4 bytes in the range [0, 16380]
@@ -23,14 +27,18 @@ qc.outw x5, 2048(x10)
# CHECK: :[[@LINE+1]]:19: error: expected register
qc.inw x23, 16380(17)
-# CHECK-PLUS: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-PLUS: :[[@LINE+3]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-PLUS: :[[@LINE+2]]:13: note: invalid operand for instruction
+# CHECK-PLUS: :[[@LINE+1]]:13: note: immediate must be a multiple of 4 bytes in the range [0, 16380]
qc.inw x23, x17
-# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-MINUS: :[[@LINE+3]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK-MINUS: :[[@LINE+2]]:13: note: invalid operand for instruction
+# CHECK-MINUS: :[[@LINE+1]]:13: note: immediate must be a multiple of 4 bytes in the range [0, 16380]
qc.inw x23, x17
# CHECK-PLUS: :[[@LINE+2]]:8: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-MINUS: :[[@LINE+1]]:8: error: register must be a GPR excluding zero (x0)
qc.inw x0, 16380(x17)
# CHECK-PLUS: :[[@LINE+1]]:13: error: immediate must be a multiple of 4 bytes in the range [0, 16380]
diff --git a/llvm/test/MC/RISCV/xqcili-invalid.s b/llvm/test/MC/RISCV/xqcili-invalid.s
index b81701a4fc96c..16eee25fd9149 100644
--- a/llvm/test/MC/RISCV/xqcili-invalid.s
+++ b/llvm/test/MC/RISCV/xqcili-invalid.s
@@ -5,7 +5,7 @@
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-MINUS,CHECK-EXT %s
# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-MINUS: :[[@LINE+1]]:9: error: invalid operand for instruction
qc.e.li 9, 33554432
# CHECK: :[[@LINE+1]]:{{11: error: too few operands for instruction|1: error: invalid instruction}}
diff --git a/llvm/test/MC/RISCV/xqcilo-pseudos-invalid.s b/llvm/test/MC/RISCV/xqcilo-pseudos-invalid.s
index 16c862b46172a..792f18761960f 100644
--- a/llvm/test/MC/RISCV/xqcilo-pseudos-invalid.s
+++ b/llvm/test/MC/RISCV/xqcilo-pseudos-invalid.s
@@ -7,37 +7,37 @@
# CHECK-ENABLED: [[@LINE+4]]:1: error: invalid instruction, any one of the following would fix this:
# CHECK-ENABLED: [[@LINE+3]]:13: note: operand must be a bare symbol name
# CHECK-ENABLED: [[@LINE+2]]:19: note: too few operands for instruction
-# CHECK-DISABLED: [[@LINE+1]]:1: error: invalid instruction
+# CHECK-DISABLED: :[[@LINE+1]]:13: error: invalid operand for instruction
qc.e.lb a0, 0xf000
# CHECK-ENABLED: [[@LINE+4]]:1: error: invalid instruction, any one of the following would fix this:
# CHECK-ENABLED: [[@LINE+3]]:13: note: operand must be a bare symbol name
# CHECK-ENABLED: [[@LINE+2]]:19: note: too few operands for instruction
-# CHECK-DISABLED: [[@LINE+1]]:1: error: invalid instruction
+# CHECK-DISABLED: :[[@LINE+1]]:13: error: invalid operand for instruction
qc.e.lb a0, 0xf000
# CHECK-ENABLED: [[@LINE+4]]:1: error: invalid instruction, any one of the following would fix this:
# CHECK-ENABLED: [[@LINE+3]]:14: note: operand must be a bare symbol name
# CHECK-ENABLED: [[@LINE+2]]:20: note: too few operands for instruction
-# CHECK-DISABLED: [[@LINE+1]]:1: error: invalid instruction
+# CHECK-DISABLED: :[[@LINE+1]]:14: error: invalid operand for instruction
qc.e.lbu a0, 0xf000
# CHECK-ENABLED: [[@LINE+4]]:1: error: invalid instruction, any one of the following would fix this:
# CHECK-ENABLED: [[@LINE+3]]:13: note: operand must be a bare symbol name
# CHECK-ENABLED: [[@LINE+2]]:19: note: too few operands for instruction
-# CHECK-DISABLED: [[@LINE+1]]:1: error: invalid instruction
+# CHECK-DISABLED: :[[@LINE+1]]:13: error: invalid operand for instruction
qc.e.lh a0, 0xf000
# CHECK-ENABLED: [[@LINE+4]]:1: error: invalid instruction, any one of the following would fix this:
# CHECK-ENABLED: [[@LINE+3]]:14: note: operand must be a bare symbol name
# CHECK-ENABLED: [[@LINE+2]]:20: note: too few operands for instruction
-# CHECK-DISABLED: [[@LINE+1]]:1: error: invalid instruction
+# CHECK-DISABLED: :[[@LINE+1]]:14: error: invalid operand for instruction
qc.e.lhu a0, 0xf000
# CHECK-ENABLED: [[@LINE+4]]:1: error: invalid instruction, any one of the following would fix this:
# CHECK-ENABLED: [[@LINE+3]]:13: note: operand must be a bare symbol name
# CHECK-ENABLED: [[@LINE+2]]:19: note: too few operands for instruction
-# CHECK-DISABLED: [[@LINE+1]]:1: error: invalid instruction
+# CHECK-DISABLED: :[[@LINE+1]]:13: error: invalid operand for instruction
qc.e.lw a0, 0xf000
# CHECK-ENABLED: [[@LINE+2]]:13: error: operand must be a bare symbol name
diff --git a/llvm/test/MC/RISCV/xqcilsm-invalid.s b/llvm/test/MC/RISCV/xqcilsm-invalid.s
index 69d7da411c550..dc82ffdfeae79 100644
--- a/llvm/test/MC/RISCV/xqcilsm-invalid.s
+++ b/llvm/test/MC/RISCV/xqcilsm-invalid.s
@@ -8,11 +8,11 @@
qc.swm x5, x20, 12(20)
# CHECK-PLUS: :[[@LINE+2]]:8: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-MINUS: :[[@LINE+1]]:8: error: register must be a GPR excluding zero (x0)
qc.swm x0, x20, 12(x3)
# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-MINUS: :[[@LINE+1]]:12: error: register must be a GPR excluding zero (x0)
qc.swm x5, x0, 12(x3)
# CHECK: :[[@LINE+1]]:{{14: error: too few operands for instruction|1: error: invalid instruction}}
@@ -29,10 +29,10 @@ qc.swm x5, x20, 12(x3)
qc.swmi x10, 4, 20(4)
# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-MINUS: :[[@LINE+1]]:9: error: register must be a GPR excluding zero (x0)
qc.swmi x0, 4, 20(x4)
-# CHECK: :[[@LINE+1]]:{{19: error: too few operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{19: error: too few operands for instruction|17: error: invalid operand for instruction}}
qc.swmi x10, 4, 20
# CHECK-PLUS: :[[@LINE+1]]:14: error: immediate must be an integer in the range [1, 31]
@@ -52,10 +52,10 @@ qc.swmi x10, 4, 20(x4)
qc.setwm x4, x30, 124(2)
# CHECK-PLUS: :[[@LINE+2]]:14: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-MINUS: :[[@LINE+1]]:14: error: register must be a GPR excluding zero (x0)
qc.setwm x4, x0, 124(x2)
-# CHECK: :[[@LINE+1]]:{{22: error: too few operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{22: error: too few operands for instruction|19: error: invalid operand for instruction}}
qc.setwm x4, x30, 124
# CHECK-PLUS: :[[@LINE+1]]:19: error: immediate must be a multiple of 4 bytes in the range [0, 124]
@@ -68,7 +68,7 @@ qc.setwm x4, x30, 124(x2)
# CHECK: :[[@LINE+1]]:22: error: expected register
qc.setwmi x5, 31, 12(12)
-# CHECK: :[[@LINE+1]]:{{21: error: too few operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{21: error: too few operands for instruction|19: error: invalid operand for instruction}}
qc.setwmi x5, 31, 12
# CHECK-PLUS: :[[@LINE+1]]:15: error: immediate must be an integer in the range [1, 31]
@@ -87,11 +87,11 @@ qc.setwmi x5, 31, 12(x12)
# CHECK: :[[@LINE+1]]:19: error: expected register
qc.lwm x7, x1, 24(20)
-# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|16: error: invalid operand for instruction}}
qc.lwm x7, x1, 24
# CHECK-PLUS: :[[@LINE+2]]:8: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-MINUS: :[[@LINE+1]]:8: error: register must be a GPR excluding zero (x0)
qc.lwm x0, x1, 24(x20)
# CHECK-PLUS: :[[@LINE+1]]:16: error: immediate must be a multiple of 4 bytes in the range [0, 124]
@@ -104,11 +104,11 @@ qc.lwm x7, x1, 24(x20)
# CHECK: :[[@LINE+1]]:19: error: expected register
qc.lwmi x13, 9, 4(23)
-# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|1: error: invalid instruction}}
+# CHECK: :[[@LINE+1]]:{{18: error: too few operands for instruction|17: error: invalid operand for instruction}}
qc.lwmi x13, 9, 4
# CHECK-PLUS: :[[@LINE+2]]:9: error: register must be a GPR excluding zero (x0)
-# CHECK-MINUS: :[[@LINE+1]]:1: error: invalid instruction
+# CHECK-MINUS: :[[@LINE+1]]:9: error: register must be a GPR excluding zero (x0)
qc.lwmi x0, 9, 4(x23)
# CHECK-PLUS: :[[@LINE+1]]:14: error: immediate must be an integer in the range [1, 31]
diff --git a/llvm/test/MC/RISCV/xtheadmac-invalid.s b/llvm/test/MC/RISCV/xtheadmac-invalid.s
index a81b1952ed90a..9d10a5a365819 100644
--- a/llvm/test/MC/RISCV/xtheadmac-invalid.s
+++ b/llvm/test/MC/RISCV/xtheadmac-invalid.s
@@ -1,7 +1,7 @@
# RUN: not llvm-mc -triple riscv32 -mattr=+xtheadmac < %s 2>&1 | FileCheck %s
# RUN: not llvm-mc -triple riscv64 -mattr=+xtheadmac < %s 2>&1 | FileCheck %s
-th.mula t0, t1, 0(t2) # CHECK: :[[@LINE]]:1: error: invalid instruction
+th.mula t0, t1, 0(t2) # CHECK: :[[@LINE]]:18: error: invalid operand for instruction
th.muls t0, 12, t2 # CHECK: :[[@LINE]]:14: error: invalid operand for instruction
th.mulsh t0, t1, 34 # CHECK: :[[@LINE]]:18: error: invalid operand for instruction
th.mulsw t0, -56, t2 # CHECK: :[[@LINE]]:{{1: error: invalid instruction|14: error: invalid operand for instruction}}
>From d350dfdcfa5d7a1adc7a1d55373170a5e48044b4 Mon Sep 17 00:00:00 2001
From: Mark Zhuang <mark.zhuang at spacemit.com>
Date: Wed, 1 Jul 2026 15:48:45 +0800
Subject: [PATCH 6/8] Use a range-based loop over MissingFeatures
---
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
index cfab7277f5ef5..25abff95b432d 100644
--- a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+++ b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
@@ -1755,12 +1755,10 @@ void RISCVAsmParser::FilterNearMisses(
Message.Loc = IDLoc;
bool FirstFeature = true;
Message.Message = "instruction requires the following:";
- for (unsigned i = 0, e = MissingFeatures.size(); i != e; ++i) {
- if (MissingFeatures[i]) {
- Message.Message += FirstFeature ? " " : ", ";
- Message.Message += getSubtargetFeatureName(i);
- FirstFeature = false;
- }
+ for (unsigned Feature : MissingFeatures) {
+ Message.Message += FirstFeature ? " " : ", ";
+ Message.Message += getSubtargetFeatureName(Feature);
+ FirstFeature = false;
}
NearMissesOut.emplace_back(Message);
break;
>From 9d63509eaff694253d86e21aa9f7889e1d84a5dd Mon Sep 17 00:00:00 2001
From: Mark Zhuang <mark.zhuang at spacemit.com>
Date: Wed, 1 Jul 2026 22:54:38 +0800
Subject: [PATCH 7/8] update test rv32zclsd-invalid.s
---
llvm/test/MC/RISCV/rv32zclsd-invalid.s | 36 +++++++++++++++++++++-----
1 file changed, 30 insertions(+), 6 deletions(-)
diff --git a/llvm/test/MC/RISCV/rv32zclsd-invalid.s b/llvm/test/MC/RISCV/rv32zclsd-invalid.s
index ec8ddb61f6e5e..60df2e69d0f69 100644
--- a/llvm/test/MC/RISCV/rv32zclsd-invalid.s
+++ b/llvm/test/MC/RISCV/rv32zclsd-invalid.s
@@ -1,19 +1,43 @@
# RUN: not llvm-mc -triple=riscv32 -mattr=+zclsd < %s 2>&1 | FileCheck %s
## GPRPairC
-c.ld t1, 4(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
-c.sd s2, 4(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+c.ld t1, 4(sp)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:6: note: register must be a GPR from x8 to x15
+# CHECK: :[[@LINE-3]]:6: note: invalid operand for instruction
+
+c.sd s2, 4(sp)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:6: note: register must be a GPR from x8 to x15
+# CHECK: :[[@LINE-3]]:6: note: invalid operand for instruction
## GPRPairNoX0
-c.ldsp x0, 4(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
-c.ldsp zero, 4(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+c.ldsp x0, 4(sp)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: register must be a GPR excluding zero (x0)
+# CHECK: :[[@LINE-3]]:9: note: invalid operand for instruction
+
+c.ldsp zero, 4(sp)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:9: note: register must be a GPR excluding zero (x0)
+# CHECK: :[[@LINE-3]]:9: note: invalid operand for instruction
## uimm9_lsb000
c.ldsp t1, 512(sp) # CHECK: :[[@LINE]]:12: error: immediate must be a multiple of 8 bytes in the range [0, 504]
c.sdsp t1, -8(sp) # CHECK: :[[@LINE]]:12: error: immediate must be a multiple of 8 bytes in the range [0, 504]
+
## uimm8_lsb000
-c.ld s0, -8(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
-c.sd s0, 256(sp) # CHECK: :[[@LINE]]:1: error: invalid instruction
+c.ld s0, -8(sp)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:7: note: register must be a GPR from x8 to x15
+# CHECK: :[[@LINE-3]]:11: note: invalid operand for instruction
+# CHECK: :[[@LINE-4]]:11: note: immediate must be a multiple of 8 bytes in the range [0, 248]
+
+c.sd s0, 256(sp)
+# CHECK: :[[@LINE-1]]:1: error: invalid instruction, any one of the following would fix this:
+# CHECK: :[[@LINE-2]]:7: note: register must be a GPR from x8 to x15
+# CHECK: :[[@LINE-3]]:11: note: invalid operand for instruction
+# CHECK: :[[@LINE-4]]:11: note: immediate must be a multiple of 8 bytes in the range [0, 248]
# Invalid register names
c.ld a1, 4(sp) # CHECK: :[[@LINE]]:6: error: register must be even
>From b9f51b4bb90e3bdc6bb7ca33b94cf87c86d735a1 Mon Sep 17 00:00:00 2001
From: Mark Zhuang <mark.zhuang at spacemit.com>
Date: Wed, 1 Jul 2026 23:23:41 +0800
Subject: [PATCH 8/8] [RISCV][test] Cover the valid-rd path of two-operand call
---
llvm/test/MC/RISCV/function-call-invalid.s | 1 +
1 file changed, 1 insertion(+)
diff --git a/llvm/test/MC/RISCV/function-call-invalid.s b/llvm/test/MC/RISCV/function-call-invalid.s
index 652eaa81fb0e4..dd25130794c6e 100644
--- a/llvm/test/MC/RISCV/function-call-invalid.s
+++ b/llvm/test/MC/RISCV/function-call-invalid.s
@@ -10,5 +10,6 @@ call %lo(1234) # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
call %hi(foo) # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
call %lo(foo) # CHECK: :[[@LINE]]:6: error: operand must be a bare symbol name
call foo, bar # CHECK: :[[@LINE]]:6: error: invalid operand for instruction
+call t0, %lo(foo) # CHECK: :[[@LINE]]:10: error: operand must be a bare symbol name
call foo at pls # CHECK: :[[@LINE]]:10: error: @ (except the deprecated/ignored @plt) is disallowed
call foo at 3 # CHECK: :[[@LINE]]:10: error: @ (except the deprecated/ignored @plt) is disallowed
More information about the llvm-commits
mailing list