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

LiqinWeng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 5 23:39:35 PST 2022


Miss_Grape 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!");
----------------
craig.topper wrote:
> 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.
done


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

https://reviews.llvm.org/D115133



More information about the llvm-commits mailing list