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

Michael Maitland via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 23 10:26:48 PDT 2023


michaelmaitland added inline comments.


================
Comment at: clang/include/clang/Basic/riscv_vector.td:1856
   def vfwcvt_f_x_v : RVVConvBuiltin<"Fw", "Fwv", "csi", "vfwcvt_f">;
-  def vfwcvt_f_f_v : RVVConvBuiltin<"w", "wv", "xf", "vfwcvt_f">;
+  let RequiredFeatures = ["ZvfhminOrZvfh"] in
+    def vfwcvt_f_f_v : RVVConvBuiltin<"w", "wv", "xf", "vfwcvt_f">;
----------------
In general, I believe that `vfwcvt_f_f_v` and `vfncvt_f_f_w` do not require Zvfhmin or Zvfh. The only time that these intrinsics require Zvfhmin or Zvfh is when the operands to these intrinsics have EEW=16.


================
Comment at: clang/lib/Sema/Sema.cpp:2049
+        !TI.hasFeature("experimental-zvfhmin"))
+      Diag(Loc, diag::err_riscv_type_requires_extension, FD) << Ty << "zvfh";
     if (Ty->isRVVType(/* Bitwidth */ 32, /* IsFloat */ true) &&
----------------
Should this output `zvfhmin` instead of `zvfh` when `experimental-zvfhmin` feature is not included?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150253



More information about the llvm-commits mailing list