Details
-
Enhancement
-
Resolution: Fixed
-
P4
-
21
-
b08
-
riscv
-
linux
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8311746 | 17.0.9 | Fei Yang | P4 | Resolved | Fixed | b01 |
Description
The code generation for MinI/MaxI nodes for Zbb could be improved when one of the source operands is constant 0. We can make use of the dedicated zero register of the architecture for these special cases.
The difference in -XX:+PrintOptoAssembly output looks like:
Before:
```
048 li R7, #0 # int, #@loadConI
04a + max R10, R12, R7 #@maxI_reg_b
04e # pop frame 32
```
After:
```
048 max R10, R12, zr #@maxI_reg_zero_b
04c # pop frame 32
```
Before:
```
028 li R7, #0 # int, #@loadConI
02a + min R10, R11, R7 #@minI_reg_b
02e # pop frame 32
```
After:
```
028 min R10, R11, zr #@minI_reg_zero_b
02c # pop frame 32
```
The difference in -XX:+PrintOptoAssembly output looks like:
Before:
```
048 li R7, #0 # int, #@loadConI
04a + max R10, R12, R7 #@maxI_reg_b
04e # pop frame 32
```
After:
```
048 max R10, R12, zr #@maxI_reg_zero_b
04c # pop frame 32
```
Before:
```
028 li R7, #0 # int, #@loadConI
02a + min R10, R11, R7 #@minI_reg_b
02e # pop frame 32
```
After:
```
028 min R10, R11, zr #@minI_reg_zero_b
02c # pop frame 32
```
Attachments
Issue Links
- backported by
-
JDK-8311746 RISC-V: Handle special cases for MinI/MaxI nodes for Zbb
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/966fc82d
-
Commit openjdk/jdk/61a5f114
-
Commit openjdk/riscv-port-jdk17u/ace6ce88
-
Review openjdk/jdk17u-dev/1427
-
Review openjdk/jdk/12176
-
Review openjdk/riscv-port-jdk17u/66
(2 links to)