[llvm] [RISCV][AsmParser] Allow parsing vsetvl omitting LMUL parameter (PR #115277)
Pengcheng Wang via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 7 00:44:08 PST 2024
================
@@ -2222,8 +2222,14 @@ bool RISCVAsmParser::parseVTypeToken(const AsmToken &Tok, VTypeState &State,
State = VTypeState_LMUL;
return false;
case VTypeState_LMUL: {
- if (!Identifier.consume_front("m"))
- break;
+ // Set LMUL to default if it is omitted.
+ if (!Identifier.consume_front("m")) {
+ Lmul = 1;
+ Fractional = false;
+ State = VTypeState_TailPolicy;
+ return parseVTypeToken(Tok, State, Sew, Lmul, Fractional, TailAgnostic,
----------------
wangpc-pp wrote:
I think we can just return false here?
https://github.com/llvm/llvm-project/pull/115277
More information about the llvm-commits
mailing list