[llvm-branch-commits] [RISCV][MC] Warn if SEW/LMUL may not be compatible (PR #94313)

Craig Topper via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jun 5 10:20:18 PDT 2024


================
@@ -2155,6 +2155,17 @@ bool RISCVAsmParser::parseVTypeToken(const AsmToken &Tok, VTypeState &State,
       break;
     if (!RISCVVType::isValidLMUL(Lmul, Fractional))
       break;
+
+    if (Fractional) {
+      unsigned ELEN = STI->hasFeature(RISCV::FeatureStdExtZve64x) ? 64 : 32;
+      unsigned MinLMUL = ELEN / 8;
+      if (Lmul > MinLMUL)
+        Warning(
+            Tok.getLoc(),
+            Twine("The use of vtype encodings with LMUL < SEWMIN/ELEN == mf") +
+                Twine(MinLMUL) + Twine(" is reserved"));
----------------
topperc wrote:

Is it actually reserved? I thought it was just implementation defined.

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


More information about the llvm-branch-commits mailing list