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
8278171: [vectorapi] Mask incorrectly computed for zero extending cast #6634
Conversation
|
@merykitty 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. |
/label add hotspot-compiler |
@merykitty |
@PaulSandoz Could you take a look at this PR? Also, could you create an issue for this PR, please. |
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.
I am inclined to separated out. Fix the bug, add the tests, and integrate for 18. Then enhance with the intrinsics for 19.
If you agree to that I will create two bugs.
src/hotspot/cpu/x86/x86.ad
Outdated
case Op_VectorUCastB2X: | ||
if (size_in_bits == 256 && UseAVX < 2) { | ||
return false; // Implementation limitation | ||
} | ||
break; | ||
case Op_VectorUCastS2X: | ||
if (size_in_bits == 256 && UseAVX < 2) { | ||
return false; | ||
} | ||
break; | ||
case Op_VectorUCastI2X: | ||
if (size_in_bits == 256 && UseAVX < 2) { | ||
return false; | ||
} | ||
break; |
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.
Collapse cases, since each has the code code?
@PaulSandoz Yes, I think that should be the case, thank you very much. |
@merykitty here you go: [vectorapi] Mask incorrectly computed for zero extending cast [vectorapi] Add x64 intrinsics for unsigned (zero extended) casts |
/label remove hotspot,hotspot-compiler |
@merykitty The |
Looks good. Running tests. Something we should consider later: split this test out into smaller files and support the max vector. On supported platforms we could consider using the IR test framework to verify the correct IR node is generated. |
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.
Tests are good.
|
@merykitty This change now passes all automated pre-integration checks. 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 14 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 (@PaulSandoz) but any other Committer may sponsor as well.
|
/integrate |
@merykitty |
Thanks a lot for your support and review. Do I need another review here? |
/sponsor |
No need for this one, for next PR for the intrinsics will likely need two HotSpot reviewers. |
Going to push as commit 2e30fa9.
Your commit was automatically rebased without conflicts. |
@PaulSandoz @merykitty Pushed as commit 2e30fa9. |
When doing an unsigned upcast, we perform a signed cast followed by a bitwise and operation to clip the extended signed bit. The sign clip mask is currently calculated incorrectly, the correct mask should have the number of least significant bit set equal to the size of the source elements. This patch fixes this trivial issue and adds several tests for zero extension casts.
Thank you very much.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6634/head:pull/6634
$ git checkout pull/6634
Update a local copy of the PR:
$ git checkout pull/6634
$ git pull https://git.openjdk.java.net/jdk pull/6634/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 6634
View PR using the GUI difftool:
$ git pr show -t 6634
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6634.diff