-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8321648: Integral gather optimized mask computation. #17048
Conversation
👋 Welcome back jbhateja! A progress list of the required criteria for merging this PR into |
@jatin-bhateja 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. |
While you are at it, you can change the |
Hi @merykitty , Memory patterns fold address generation components (base , index, scale) into instruction encoding thus eliminating a need to emit explicit ADD, MUL instruction sequence to compute address, saving lea may prevent folding memory patterns and may prove to be costly. |
@jatin-bhateja Could you elaborate on what the failure mode for the incorrect instruction attribution would look like? Is this just inefficient execution or would it lead to a crash? |
Hi @TobiHartmann , These gather instruction are strictly applicable for AVX2 targets and will always be VEX encoded, instruction patterns corresponding to them operate on legacy vector register mask operands. Thus, this looks more of a typo error to set VL as true. Other change is for strength reduction and replacing a memory operand instruction. |
Thanks for the clarification, Jatin. So the incorrect encoding has no real (negative) effect on code generation? |
Instruction attributes VL allows EVEX to VEX demotions, iff participating vectors are allocated from lower register bank and are less than 512 bit wide. On the contrary, if RA makes an allocation from higher register bank then we may need EVEX bits to accomodate encoding for a reigister in higher register bank even if vectors are lesser than 512 bit wide. However, there are some instructions which are constrained to use VEX encoding and AVX2 gather belong to that class. Patch also strength reduces mask computation which is currently using memory operands. |
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.
Okay, so if I understand correctly, since these instructions are always VEX encoded, the VL set to true does not make a difference and should not lead to failures, correct?
Looks reasonable to me but someone more experienced with this should have a look as well.
/reviewers 2
@jatin-bhateja 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 78 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 |
@TobiHartmann |
Thanks @TobiHartmann , yes, that what my understanding is. |
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
/integrate |
Going to push as commit 76637c5.
Your commit was automatically rebased without conflicts. |
@jatin-bhateja Pushed as commit 76637c5. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Hi,
This bug fix patch optimizes integral gather mask computation using cheaper instruction and fixes incorrect instruction attributes in legacy integral gather instructions.
All Vector API JTREG tests are passing with this at various AVX levels.
Kindly review and share feedback.
Best Regards,
Jatin
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/17048/head:pull/17048
$ git checkout pull/17048
Update a local copy of the PR:
$ git checkout pull/17048
$ git pull https://git.openjdk.org/jdk.git pull/17048/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 17048
View PR using the GUI difftool:
$ git pr show -t 17048
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/17048.diff
Webrev
Link to Webrev Comment