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

Maciej Gabka via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 23 03:00:24 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");
----------------
mgabka wrote:

I was rather thinking about sve specific message for example: 
"operand must be an enumeration value describing number of active elements.”
the issue only occurs with the "all"
seems like both “ptrue p0.d, #1" and “ptrue p0.d, 1” are parsed as legal.

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


More information about the llvm-commits mailing list