[PATCH] D115133: [RISCV] Support immediate vtype of VSETVLI/VSETIVLI in asm parser
LiqinWeng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 27 19:11:20 PST 2021
Miss_Grape added inline comments.
================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:926
+ if (Kind == KindTy::Immediate) {
+ auto *CE = dyn_cast<MCConstantExpr>(getImm());
+ Imm = CE->getValue();
----------------
craig.topper wrote:
> I think we need to call `evaluateConstantImm` here. Since we used `evaluateConstantImm` in isVTypeImm which can find an immediate that isn't from an MCConstantExpr. I think we should assert that `evaluateConstantImm` returns true since we checked that in isVTypeImm.
Done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115133/new/
https://reviews.llvm.org/D115133
More information about the llvm-commits
mailing list