[PATCH] D115133: [RISCV] Support immediate vtype of VSETVLI/VSETIVLI in asm parser

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 5 22:36:33 PST 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:928
+      RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None;
+      assert(evaluateConstantImm(getImm(), Imm, VK) &&
+             "Invalid VTypeI Operand!");
----------------
You can't call evaluateConstantImm from inside the assert. The contents of the assert aren't evaluated in release builds. You'll need to use a variable to capture the result. And cast the variable to void to avoid an unused variable warning in release builds.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115133/new/

https://reviews.llvm.org/D115133



More information about the llvm-commits mailing list