[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 10:41:23 PDT 2023


eopXD added inline comments.


================
Comment at: clang/lib/Sema/Sema.cpp:2050
       Diag(Loc, diag::err_riscv_type_requires_extension, FD)
-          << Ty << "zvfh";
+          << Ty << "zvfh or zvfhmin";
     if (Ty->isRVVType(/* Bitwidth */ 32, /* IsFloat */ true) &&
----------------
We can remove `!TI.hasFeature("experimental-zvfh")` since `zvfh` will imply `zvfhmin`.


================
Comment at: clang/lib/Sema/Sema.cpp:2050
       Diag(Loc, diag::err_riscv_type_requires_extension, FD)
-          << Ty << "zvfh";
+          << Ty << "zvfh or zvfhmin";
     if (Ty->isRVVType(/* Bitwidth */ 32, /* IsFloat */ true) &&
----------------
eopXD wrote:
> We can remove `!TI.hasFeature("experimental-zvfh")` since `zvfh` will imply `zvfhmin`.
`"zvfh or zvfhmin"` -> `"zvfhmin"`


================
Comment at: clang/test/CodeGen/RISCV/rvv-intrinsics-handcrafted/zvfhmin-error.c:20
+
+// CHECK-ZVFHMIN-ERR: no matching function for call to '__riscv_vfadd'
+
----------------
eopXD wrote:
> If `zvfhmin` is not specified, should the compiler emit semantic error when encountering `vfloat16*_t` types?
Sorry I missed the test case below. Please ignore this comment.


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