[PATCH] D108694: [RISCV] Add the zvl extension according to the v1.0-rc1 spec

Yueh-Ting Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 25 04:49:49 PDT 2021


eopXD added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCV.td:197
+          [FeatureStdExtV]>;
+def HasStdExtZvl : Predicate<"Subtarget->hasStdExtZvl()">;
+
----------------
Don't need the `AssemblerPredicate` here because this sub-extension is used to restrict vlen, which is treated as a constant in the assembly.


================
Comment at: llvm/lib/Target/RISCV/RISCVSubtarget.h:137
   bool hasStdExtZvlsseg() const { return HasStdExtZvlsseg; }
+  bool hasStdExtZvl() const { return ZvlLen != ExtZvl::NotSet; }
   bool hasStdExtZvamo() const { return HasStdExtZvamo; }
----------------
I don't think this function will be called. However other sub-extensions will have this function so I still created it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108694



More information about the llvm-commits mailing list