[PATCH] D150253: [RISCV] Add Zvfhmin extension for clang.

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 1 10:55:42 PDT 2023


craig.topper added inline comments.


================
Comment at: clang/include/clang/Basic/riscv_vector.td:2219
+  def vfwcvt_f_f_v : RVVConvBuiltin<"w", "wv", "f", "vfwcvt_f">;
+  let RequiredFeatures = ["ZvfhminOrZvfh"] in
+    def vfwcvt_f_f_v_fp16 : RVVConvBuiltin<"w", "wv", "x", "vfwcvt_f"> {
----------------
eopXD wrote:
> I think using `ZvfhminOrZvfh` is not accurate here. By the v-spec:
> 
> > When the Zvfhmin extension is implemented, the vfwcvt.f.f.v and vfncvt.f.f.w instructions become defined when SEW=16. 
> > The Zvfh extension depends on the Zve32f and Zfhmin extensions.
> 
> I think making it `let RequiredFeatures = ["Zvfhmin"]` would be clearer.
Note that the spec says Zfhmin(no v) not Zvfhmin. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150253



More information about the cfe-commits mailing list