RFR: JDK-8318228: RISC-V: C2 ConvF2HF

Hamlin Li mli at openjdk.org
Tue Jan 16 18:48:33 UTC 2024


Hi,
Can you review the patch to add ConvHF2F intrinsic to JDK for riscv?
Thanks!

## Test
### Functionality
#### hotspot tests
(running in progress...)
test/hotspot/jtreg/compiler/intrinsics/ 
test/hotspot/jtreg/compiler/c2/irTests

#### jdk tests
test/jdk/java/lang/Float/Binary16Conversion*.java

### Performance
tested on licheepi.

#### with UseZfh enabled

Benchmark                                     (size)  Mode  Cnt     Score   Error  Units
Fp16ConversionBenchmark.floatToFloat16          2048  avgt    2  4170.549          ns/op
Fp16ConversionBenchmark.floatToFloat16Memory    2048  avgt    2    21.492          ns/op


#### with UseZfh disabled
(i.e. disable the intrinsic)

Benchmark                                     (size)  Mode  Cnt      Score   Error  Units
Fp16ConversionBenchmark.floatToFloat16          2048  avgt    2  25036.647          ns/op
Fp16ConversionBenchmark.floatToFloat16Memory    2048  avgt    2     27.326          ns/op

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

Commit messages:
 - clean code
 - Initial commit: float to float16

Changes: https://git.openjdk.org/jdk/pull/17450/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17450&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8318228
  Stats: 57 lines in 3 files changed: 57 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/17450.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17450/head:pull/17450

PR: https://git.openjdk.org/jdk/pull/17450


More information about the hotspot-compiler-dev mailing list