[llvm] [AArch64][SVE]Add error message in the AsmParser for SVEPattern (PR #82668)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 23 02:54:22 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");
----------------
paulwalker-arm wrote:
Given the rational for the fix the chances are the `#` is erroneous rather than the user really wanting to use the `#imm` syntax so for consistency I suggest we emit the same `invalid operand for instruction` message we use for predicate pattern typos. If at a later date we want to be more expressive then we can fix all instances at the same time.
https://github.com/llvm/llvm-project/pull/82668
More information about the llvm-commits
mailing list