[llvm] [CodeGen][MIR] Support parsing of scalable vectors in MIR (PR #70893)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 1 00:02:28 PDT 2023
================
@@ -1946,24 +1946,41 @@ bool MIParser::parseLowLevelType(StringRef::iterator Loc, LLT &Ty) {
// Now we're looking for a vector.
if (Token.isNot(MIToken::less))
- return error(Loc,
- "expected sN, pA, <M x sN>, or <M x pA> for GlobalISel type");
+ return error(Loc, "expected sN, pA, <M x sN>, <M x pA>, <vscale x M x sN>, "
+ "or <vscale x M x pA> for GlobalISel type");
lex();
+ bool HasVScale = Token.stringValue() == "vscale";
----------------
topperc wrote:
Do you need to check that the token is an identifier before calling stringValue(). If the token isn't an identifier, I think the string value stored in it might be stale.
https://github.com/llvm/llvm-project/pull/70893
More information about the llvm-commits
mailing list