8347981: RISC-V: Add Zfa zli imm loads#23171
Conversation
|
👋 Welcome back rehn! A progress list of the required criteria for merging this PR into |
|
@robehn This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 46 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
|
Thanks for havinga look @luhenry ! |
|
It's seem you made a non-review comment above, I can't reply. can_zfa_zli_float() method only checks if we can use a zli for that imm. Right now we have two cases:
As many application are memory bound and loading may miss L1. Therefore we should add more cases to above, for exampel: The callsite is asking do I need to load from an address using fld/flw or can I materialize. |
RealFYang
left a comment
There was a problem hiding this comment.
Thanks for the update. Seems fine to me modulo one minor comment.
Thank you ! |
|
@luhenry do you have any futher concerns, or are you happy ? :) |
|
Thank you @luhenry ! |
|
/integrate |
|
Going to push as commit 9c55e25.
Your commit was automatically rebased without conflicts. |
Hi, please consider!
This patch the Zfa zli floating point immediate load.
As a bonus it adds fmv_?_x(Rd, zr); for loading fp/dp 0x0.
There are some more instruction in Zfa, but this was such a clear use-case so I only did fli as a start.
When using one of the 32 'popular' floats we can now materialze them without a load.
E.g.
float f = f1 * 0.5 + f2 * 2.0;Only require 2 loads instead of 4: as '0.5' and '2.0' is such popular float values.
As Java is often memory bound we should also investigate doing lui+ssli+fmv for float/doubles instead of a load when materializing.
Note the _fli_s/_fli_d will be proper merged on the 8347794: RISC-V: Add Zfhmin - Float cleanup.
Passes:
./test/jdk/java/lang/Math
./test/hotspot/jtreg/compiler/floatingpoint/
./test/jdk/java/util/Formatter/
./test/jdk/java/lang/Float/
./test/jdk/java/lang/Double/
./test/hotspot/jtreg/compiler/c2/FloatingPointFoldingTest.java
./test/hotspot/jtreg/compiler/eliminateAutobox/
./test/hotspot/jtreg/vmTestbase/jit/
Running tier1
Thanks!
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23171/head:pull/23171$ git checkout pull/23171Update a local copy of the PR:
$ git checkout pull/23171$ git pull https://git.openjdk.org/jdk.git pull/23171/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 23171View PR using the GUI difftool:
$ git pr show -t 23171Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23171.diff
Using Webrev
Link to Webrev Comment