[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 Dec 15 18:46:48 PST 2021
    
    
  
Miss_Grape added inline comments.
================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:422
 
-  bool isVTypeI() const { return isVType(); }
+  template <int N> bool isVTypeImm() const {
+    int64_t Imm;
----------------
craig.topper wrote:
> This doesn't need to be a template. Just pass the bitwidth and use isUIntN instead of isUint
Done
================
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:
> `auto *CE` Don't hide the * with auto.
Done
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115133/new/
https://reviews.llvm.org/D115133
    
    
More information about the llvm-commits
mailing list