Skip to content
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

8285013: AArch64: [vectorapi] Backend support of ExpandV for SVE2 #198

Closed
wants to merge 1 commit into from

Conversation

e1iu
Copy link
Member

@e1iu e1iu commented Apr 28, 2022

This patch adds the backend for Vector.expand(mask).

The basic idea is to use TBL which can shuffle the elements in the given
vector flexibly. HISTCNT is used to generate the second source input for
TBL whose value is used to select the indexed element from src vector.

The final code for an int vector is generated as below:

   mov z17.s, #0
   histcnt z17.s, p0/z, z17.s, z17.s
   sub z17.s, z17.s, #1
   tbl z17.s, {z16.s}, z17.s

As the HISTCNT instruction only supports element in size of 32/64 bits,
expanding of subword type is missing now.


Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed

Issue

  • JDK-8285013: AArch64: [vectorapi] Backend support of ExpandV for SVE2

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/panama-vector pull/198/head:pull/198
$ git checkout pull/198

Update a local copy of the PR:
$ git checkout pull/198
$ git pull https://git.openjdk.java.net/panama-vector pull/198/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 198

View PR using the GUI difftool:
$ git pr show -t 198

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/panama-vector/pull/198.diff

This patch adds the backend for Vector.expand(mask).

The basic idea is to use TBL which can shuffle the elements in the given
vector flexibly. HISTCNT is used to generate the second source input for
TBL whose value is used to select the indexed element from src vector.

The final code for an int vector is generated as below:

```
   mov z17.s, #0
   histcnt z17.s, p0/z, z17.s, z17.s
   sub z17.s, z17.s, openjdk#1
   tbl z17.s, {z16.s}, z17.s
```

As the HISTCNT instruction only supports element in size of 32/64 bits,
expanding of subword type is missing now.

Change-Id: I0f08efcf4a740ee6719ab77bfba9a923e9c41eed
@bridgekeeper
Copy link

bridgekeeper bot commented Apr 28, 2022

👋 Welcome back eliu! A progress list of the required criteria for merging this PR into vectorIntrinsics will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr label Apr 28, 2022
@mlbridge
Copy link

mlbridge bot commented Apr 28, 2022

Webrevs

Copy link

@nsjian nsjian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice solution! I will run tests.

@openjdk
Copy link

openjdk bot commented Apr 28, 2022

@theRealELiu 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:

8285013: AArch64: [vectorapi] Backend support of ExpandV for SVE2

Reviewed-by: njian

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 5 new commits pushed to the vectorIntrinsics branch:

  • 40ac814: Removing extra newlines and spaces from generated test cases
  • e6d37c4: Compress/expand op spec.
  • f0b78ab: 8284459: Add x86 back-end implementation for LEADING and TRAILING ZEROS COUNT operations
  • 01a1477: Use Integer/Long compress and expand.
  • 97858e0: Remove byte[] and ByteBuffer access methods.

Please see this link for an up-to-date comparison between the source branch of this pull request and the vectorIntrinsics branch.
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 vectorIntrinsics branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Apr 28, 2022
@nsjian
Copy link

nsjian commented Apr 28, 2022

Nice solution! I will run tests.

My tests are clean.

@e1iu
Copy link
Member Author

e1iu commented Apr 28, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Apr 28, 2022

Going to push as commit 35d92ab.
Since your change was applied there have been 5 commits pushed to the vectorIntrinsics branch:

  • 40ac814: Removing extra newlines and spaces from generated test cases
  • e6d37c4: Compress/expand op spec.
  • f0b78ab: 8284459: Add x86 back-end implementation for LEADING and TRAILING ZEROS COUNT operations
  • 01a1477: Use Integer/Long compress and expand.
  • 97858e0: Remove byte[] and ByteBuffer access methods.

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated label Apr 28, 2022
@openjdk openjdk bot closed this Apr 28, 2022
@openjdk
Copy link

openjdk bot commented Apr 28, 2022

@theRealELiu Pushed as commit 35d92ab.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants