================
@@ -2211,6 +2223,18 @@ ParseStatus RISCVAsmParser::parseVTypeI(OperandVector 
&Operands) {
 
   if (getLexer().is(AsmToken::EndOfStatement) && State == VTypeState_Done) {
     RISCVII::VLMUL VLMUL = RISCVVType::encodeLMUL(Lmul, Fractional);
+    if (Fractional) {
+      unsigned ELEN = STI->hasFeature(RISCV::FeatureStdExtZve64x) ? 64 : 32;
+      unsigned MaxSEW = ELEN / Lmul;
+      // If MaxSEW < 8, we should have printed warning about reserved LMUL.
+      if (MaxSEW >= 8 && Sew > MaxSEW)
+        Warning(
+            SEWLoc,
+            Twine("The use of vtype encodings with SEW > ") + Twine(MaxSEW) +
----------------
topperc wrote:

I don't think you need `Twine` around the strings. 
https://www.llvm.org/docs/CodingStandards.html#error-and-warning-messages

You can probably drop the word "The" at the beginning.

https://github.com/llvm/llvm-project/pull/94313
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to