[llvm] [AArch64][SVE]Add error message in the AsmParser for SVEPattern (PR #82668)

Momchil Velikov via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 02:19:42 PST 2024


================
@@ -7939,7 +7939,7 @@ ParseStatus AArch64AsmParser::tryParseSVEPattern(OperandVector &Operands) {
 
     auto *MCE = dyn_cast<MCConstantExpr>(ImmVal);
     if (!MCE)
-      return ParseStatus::Failure;
+      return TokError("expected immediate operand");
----------------
momchil-velikov wrote:

I meant, an immediate operand is *also* acceptable, but we indeed know that we are trying to parse SVEPattern, so we can include that extra context in the error message.

https://github.com/llvm/llvm-project/pull/82668


More information about the llvm-commits mailing list