[PATCH] D125765: [RISCV] Add type aliases float16_t, float32_t and float64_t
Zakk Chen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 19 22:31:32 PDT 2022
khchen added a comment.
In D125765#3526835 <https://reviews.llvm.org/D125765#3526835>, @pcwang-thead wrote:
> In D125765#3524456 <https://reviews.llvm.org/D125765#3524456>, @khchen wrote:
>
>> I think we have no consensus in https://github.com/riscv-non-isa/rvv-intrinsic-doc/issues/18#issuecomment-817890161, and most people disagree the current naming,
>> maybe we need to have more followup discussion before landing this patch.
>
> Thanks for your reminding of previous discussion!
> Should we put this in next sync-up discussion agenda and settle it down? There are already some large code bases based GCC implementation, we should make it stable before it becomes too hard to change.
I think so. But I think maybe we need to raise an issue somewhere (maybe riscv-c-api-doc) to gather opinions from community first. (see below)
>> For example, maybe `_Float16` should be supported when enable zvh, not zvfh?
>
> You mean `zfh`? `float16_t` is only used in RVV intrinsics, so I think it is OK to me. And it is the same as generated type aliases in riscv_vector.h(at about line 130):
Yes, sorry for my typo.
I think maybe we need to have more comprehensive consideration about define floating type aliases in RISC-V world.
For example, before RISC-V support half floating type, we had posted https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/172 to update the spec for half floating-point type.
or like https://github.com/riscv-non-isa/riscv-c-api-doc/pull/25, it's trying to define a unified naming rules for all intrinsics.
so I think maybe we also need to have RFC in riscv-c-api-doc to define the convention for floating type aliases.
> #if defined(__riscv_zvfh)
> typedef __rvv_float16mf4_t vfloat16mf4_t;
> typedef __rvv_float16mf2_t vfloat16mf2_t;
> typedef __rvv_float16m1_t vfloat16m1_t;
> typedef __rvv_float16m2_t vfloat16m2_t;
> typedef __rvv_float16m4_t vfloat16m4_t;
> typedef __rvv_float16m8_t vfloat16m8_t;
> #endif
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125765/new/
https://reviews.llvm.org/D125765
More information about the cfe-commits
mailing list