-
Enhancement
-
Resolution: Fixed
-
P4
-
21
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8311766 | 17.0.9 | Fei Yang | P4 | Resolved | Fixed | b01 |
The old match rule also affects the vectorization of Math.sqrt() on float. The current implementation will convert float to double with `vcvtFtoD`, then do `vsqrtD`, and then convert the result back to float with `vcvtDtoF`. If we use the new `SqrtF` match rule, it will only use `vsqrtF` to do the conversion. Take the test (Sqrt.java) from
before:
```
19a loadV V1, [R13] # vector (rvv)
1a2 vcvtFtoD V2, V1
1ae vfsqrt.v V1, V2 #@vsqrtD
1b6 vcvtDtoF V1, V1
1c2 storeV [R14], V1 # vector (rvv)
```
after:
```
1be loadV V1, [R12] # vector (rvv)
1c6 vfsqrt.v V1, V1 #@vsqrtF
1ce addi R12, R29, #144 # ptr, #@addP_reg_imm
1d2 storeV [R12], V1 # vector (rvv)
```
- backported by
-
JDK-8311766 RISC-V: Improve vectorization of Match.sqrt() on floats
- Resolved
- is cloned by
-
JDK-8328633 s390x: Improve vectorization of Match.sqrt() on floats
- Resolved
- relates to
-
JDK-8190800 Support vectorization of Math.sqrt() on floats
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/966fc82d
-
Commit openjdk/jdk/e520cdc8
-
Commit openjdk/riscv-port-jdk11u/309291f1
-
Commit openjdk/riscv-port-jdk17u/42f752d9
-
Review openjdk/jdk17u-dev/1427
-
Review openjdk/jdk/14029
-
Review openjdk/riscv-port-jdk11u/3
-
Review openjdk/riscv-port-jdk17u/58