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

Momchil Velikov via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 23 06:46:08 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:

An immediate operand is legal for the `ptrue` instruction, `#` indicates an immediate must follow:
https://developer.arm.com/documentation/ddi0602/2023-12/SVE-Instructions/PTRUE--predicate---Initialise-predicate-from-named-constraint-?lang=en#sa_pattern

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


More information about the llvm-commits mailing list