-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8295967: RISC-V: Support negVI/negVL instructions for Vector API #10880
Conversation
👋 Welcome back dzhang! A progress list of the required criteria for merging this PR into |
@DingliZhang The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks.
@DingliZhang 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 82 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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@RealFYang) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
@yadongw @RealFYang Thanks for the review! |
@DingliZhang |
/sponsor |
Going to push as commit c116ae7.
Your commit was automatically rebased without conflicts. |
@RealFYang @DingliZhang Pushed as commit c116ae7. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Hi,
This patch will add support of
NegVI
,NegVL
for RISC-V and was implemented by referring to riscv-v-spec v1.0 [1].Tests are performed on qemu with parameter
-cpu rv64,v=true,vlen=256,vext_spec=v1.0
. By adding the-XX:+PrintAssembly -Xcomp -XX:-TieredCompilation -XX:+LogCompilation -XX:LogFile=compile.log
parameter when executing the test cases[2] [3] , the compilation log is as follows:At the same time, the following assembly code will be generated:
PS:
0x10072d7/0xe1040d7
are the machine code forvsetvli/vrsub
.After we implement these nodes, by using
-XX:+UseRVV
, the number of assembly instructions is reduced by about ~50% because of the different execution paths with the number of loops, similar toAddTest
[4].In the meantime, I also add an assembly pseudoinstruction
vneg.v
in macroAssembler_riscv.[1] https://github.com/riscv/riscv-v-spec/blob/v1.0/v-spec.adoc#111-vector-single-width-integer-add-and-subtract
[2] https://github.com/openjdk/jdk/tree/master/test/jdk/jdk/incubator/vector/Int256VectorTests.java
[3] https://github.com/openjdk/jdk/tree/master/test/jdk/jdk/incubator/vector/Long256VectorTests.java
[4] https://github.com/zifeihan/vector-api-test-rvv/blob/master/vector-api-rvv-performance.md
Please take a look and have some reviews. Thanks a lot.
Testing:
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10880/head:pull/10880
$ git checkout pull/10880
Update a local copy of the PR:
$ git checkout pull/10880
$ git pull https://git.openjdk.org/jdk pull/10880/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 10880
View PR using the GUI difftool:
$ git pr show -t 10880
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10880.diff