RFR: 8320646: RISC-V: C2 VectorCastHF2F [v2]

Fei Yang fyang at openjdk.org
Tue Feb 27 09:54:57 UTC 2024


On Wed, 7 Feb 2024 15:22:09 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> Hi,
>> Can you review this patch to add instrinsics for VectorCastHF2F/VectorCastF2HF?
>> Thanks!
>> 
>> ## Test
>> 
>> test/jdk/java/lang/Float/Binary16ConversionNaN.java
>> test/jdk/java/lang/Float/Binary16Conversion.java
>> 
>> hotspot/jtreg/compiler/intrinsics/float16
>> hotspot/jtreg/compiler/vectorization/TestFloatConversionsVectorjava
>> hotspot/jtreg/compiler/vectorization/TestFloatConversionsVectorNaN.java
>
> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
> 
>   add some comments

One comment after a brief look. Thanks.

src/hotspot/cpu/riscv/globals_riscv.hpp line 117:

> 115:   product(bool, UseZihintpause, false, EXPERIMENTAL,                             \
> 116:           "Use Zihintpause instructions")                                        \
> 117:   product(bool, UseZvfh, false, "Use Zvfh instructions")                         \

I don't think it's a good idea to have more and more experimental / disagnostic options for new RV extensions. I think it might be better to make use of the hwprobe syscall and take a vendor-specific approach. One example is https://github.com/openjdk/jdk/pull/17122 which adds instructions for RV Zcb extension.

-------------

PR Review: https://git.openjdk.org/jdk/pull/17698#pullrequestreview-1903034501
PR Review Comment: https://git.openjdk.org/jdk/pull/17698#discussion_r1503947198


More information about the hotspot-dev mailing list