diff --git a/clang/include/clang/Basic/riscv_vector.td b/clang/include/clang/Basic/riscv_vector.td --- a/clang/include/clang/Basic/riscv_vector.td +++ b/clang/include/clang/Basic/riscv_vector.td @@ -1504,6 +1504,16 @@ // and LMUL. let HeaderCode = [{ +#if defined(__riscv_zvfh) +typedef _Float16 float16_t; +#endif +#if defined(__riscv_f) +typedef float float32_t; +#endif +#if defined(__riscv_d) +typedef double float64_t; +#endif + #define vsetvl_e8mf8(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 5) #define vsetvl_e8mf4(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 6) #define vsetvl_e8mf2(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 7)