RFR: 8350960: RISC-V: Add riscv backend for Float16 operations - vectorization [v3]
Hamlin Li
mli at openjdk.org
Wed May 14 08:30:08 UTC 2025
On Wed, 14 May 2025 00:21:44 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> No, it uses T_SHORT instead, in Float16.java it also uses a short as underlying payload.
>> And if you check the generated assembly code, you'll find some code like `vsetivli t0,16,e16,m1,tu,mu`.
>>
>> To avoid confusion, I will add an assertion here so that it can be understood later.
>
> Thanks for the answer. I see that is also reflected on the C2 source code [1].
> Why not save this `Matcher::vector_element_basic_type(this)` call then? I mean:
>
> assert(Matcher::vector_element_basic_type(this) == T_SHORT, "must");
> __ vsetvli_helper(T_SHORT, Matcher::vector_length(this));
>
>
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/vectornode.cpp#L63
Make sense, fixed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25181#discussion_r2088371205
More information about the hotspot-compiler-dev
mailing list