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

Fei Yang fyang at openjdk.org
Thu Mar 7 03:00:55 UTC 2024


On Wed, 6 Mar 2024 17:51:13 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:
> 
>   minor improvements

Updated change looks good assuming it still passes the related tests.

test/hotspot/jtreg/compiler/vectorization/TestFloatConversionsVector.java line 31:

> 29:  * @requires (os.simpleArch == "x64" & (vm.cpu.features ~= ".*avx512f.*" | vm.cpu.features ~= ".*f16c.*")) |
> 30:  *           os.arch == "aarch64" |
> 31:  *           (os.arch == "riscv64" & vm.cpu.features ~= ".*zvfh.*")

A small question: I see you used following condition when doing the scalar version:
    `(os.arch == "riscv64" & vm.cpu.features ~= ".*zfh,.*")`
There is comma there for matching cpu features. Do we really need this comma? It is not there for this vector version.

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

Marked as reviewed by fyang (Reviewer).

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


More information about the hotspot-dev mailing list