-
Enhancement
-
Resolution: Fixed
-
P4
-
23
-
b05
-
riscv
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8324222 | 22.0.1 | Ilya Gavrilin | P4 | Resolved | Fixed | b02 |
JDK-8326320 | 21.0.3 | Ilya Gavrilin | P4 | Resolved | Fixed | b04 |
We have several nodes which provide floating point <-> integer representation conversions. Some of this nodes use fmv instructions, other use store or load instructions to convert value.
On the RISC-V we prefer way using fmv instruction, because it faster, but now nodes, which use stack, selected.
This happens because reg_reg and stack_reg operations matches similar nodes and the matcher does not take into account the cost of transferring a value from the stack back to the register.
For example, we can have a look on IGV dumps for the simple code, which makes conversion like doubleToRawLongBits function. During matching MpveD2L machine independent node turn into MoveD2L_reg_stack node, and only after matching compiler adds BoundSpillCopy node to transfer converted value into the register.
On the RISC-V we prefer way using fmv instruction, because it faster, but now nodes, which use stack, selected.
This happens because reg_reg and stack_reg operations matches similar nodes and the matcher does not take into account the cost of transferring a value from the stack back to the register.
For example, we can have a look on IGV dumps for the simple code, which makes conversion like doubleToRawLongBits function. During matching MpveD2L machine independent node turn into MoveD2L_reg_stack node, and only after matching compiler adds BoundSpillCopy node to transfer converted value into the register.
- backported by
-
JDK-8324222 RISC-V: Tune costs for shuffles with no conversion
- Resolved
-
JDK-8326320 RISC-V: Tune costs for shuffles with no conversion
- Resolved
- links to
-
Commit openjdk/jdk21u-dev/4fcc5c74
-
Commit openjdk/jdk22u/bbbc0ea6
-
Commit openjdk/jdk/2acb5bd9
-
Review openjdk/jdk21u-dev/265
-
Review openjdk/jdk21u/434
-
Review openjdk/jdk22u/22
-
Review openjdk/jdk/17206
(4 links to)