8390826: RISC-V: Use dedicated vector mask logical instructions - #32480
8390826: RISC-V: Use dedicated vector mask logical instructions#32480DingliZhang wants to merge 1 commit into
Conversation
|
👋 Welcome back dzhang! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
@DingliZhang The following labels 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 lists. If you would like to change these labels, use the /label pull request command. |
|
The total number of required reviews for this PR has been set to 2 based on the presence of this label: |
|
|
||
| instruct vmask_xnorI(vRegMask dst, vRegMask src1, vRegMask src2, immI_M1 m1) %{ | ||
| match(Set dst (XorVMask (XorVMask src1 src2) (MaskAll m1))); | ||
| match(Set dst (XorVMask src1 (XorVMask src2 (MaskAll m1)))); |
There was a problem hiding this comment.
Question: There are two matchings for this instruct. But seems the newly-add IR test only covered one of them, right? I am wondering if we really need both of them.
|
|
||
| instruct vmask_xnorL(vRegMask dst, vRegMask src1, vRegMask src2, immL_M1 m1) %{ | ||
| match(Set dst (XorVMask (XorVMask src1 src2) (MaskAll m1))); | ||
| match(Set dst (XorVMask src1 (XorVMask src2 (MaskAll m1)))); |
Hi, please consider.
This is a follow-up to JDK-8390101.
On RISC-V, several VectorMask logical operations involving an all-bits-set mask are currently emitted as sequences of multiple RVV mask instructions. These include:
RVV provides mask logical instructions that can implement these operations directly.
This change adds RISC-V C2 match rules to emit:
The rules cover byte, short, int, and long vector element types and replace multi-instruction mask logical sequences with a single RVV mask instruction.
Testing
MaskLogicOperationsBenchmarkon sg2044:compiler/vectorapi/AllBitsSetVectorMatchRuleTest.javapassed on sg2044test/jdk/jdk/incubator/vectorpassed on sg2044tier1on sg2044Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/32480/head:pull/32480$ git checkout pull/32480Update a local copy of the PR:
$ git checkout pull/32480$ git pull https://git.openjdk.org/jdk.git pull/32480/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 32480View PR using the GUI difftool:
$ git pr show -t 32480Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/32480.diff
Using Webrev
Link to Webrev Comment