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

Yueh-Ting (eop) Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 1 11:01:40 PDT 2023


eopXD 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"> {
----------------
craig.topper wrote:
> 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. 
My mistake. I suspect this is an oversight of the v-spec, just created an issue for this.

https://github.com/riscv/riscv-v-spec/issues/885


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