-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8351950: C2: AVX512 vector assembler routines causing SIGFPE / no valid evex tuple_table entry #25021
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
Conversation
|
👋 Welcome back jbhateja! A progress list of the required criteria for merging this PR into |
|
@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 384 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 |
|
@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. |
Webrevs
|
eme64
left a comment
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.
@jatin-bhateja Thanks you for looking into this!
The fix looks generally reasonable, thanks for adding all the tests!
|
@jatin-bhateja I'll run some internal testing, please ping me in 24h for results! :) |
Please use the latest version |
|
@jatin-bhateja Ah ok. Last tests had passed, but I'll re-run now with your newest updates. |
|
@jatin-bhateja Tests for commit 2 / v01 have all passed 🟢 |
eme64
left a comment
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.
The fix looks reasonable to me. But I don't understand the x64 change, so we need some from Intel to review here. The Java tests look ok to me :)
|
Some more places correction needs to be done for address attributes:
|
|
Thanks for the update. It looks like you missed changing the input_size_in_bits to EVEX_64bit for evgatherdpd. |
|
@jatin-bhateja @sviswa7 Can you explain the impact of the |
sviswa7
left a comment
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 to me. Thanks for fixing this issue.
@eme64 In EVEX the displacement for memory in the addressing mode is encoded using compressed disp8 encoding scheme. The EVEX_FVM, EVEX_HVM, EVEX_QVM etc denote tuple type and are used to determine the scaling factor for displacement. Please see section "2.7.5 Compressed Displacement (disp8*N) Support in EVEX" in Intel SDM Volume 2. So to answer your question, if the tuple type is incorrect we will see wrong results if the displacement is non zero. |
For testing, the best way would be to create a SIMD instruction encoding test tool on similar lines as 52d752c in a separate future PR. |
|
@sviswa7 Thanks for the explanations! I'll re-run testing now, just to be sure. |
Hi @eme64 , On targets with AVX512 features, compressed disp8 encoding is not an optional feature, an instruction with a memory operand has a displacement which if is a multiple of scale (N determined using vector length, lane size embedded broadcast flag etc) then EVEX encoding always records compressed displacement i.e. effective displ = displacement / N. I agree with the suggestion of adding test points in the assembler test tool in a separate follow-up patch as it's an activity on its own, here is the JBS tracker for it https://bugs.openjdk.org/browse/JDK-8357567 |
eme64
left a comment
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.
Testing passed, change looks reasonable!
Looking forward to more testing in the future!
|
/integrate |
|
Going to push as commit 7002233.
Your commit was automatically rebased without conflicts. |
|
@jatin-bhateja Pushed as commit 7002233. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
PR adds missing EVEX compressed displacement attributes used for computing the scale factor (N) of compressed displacement.
AVX512 memory operand instructions use compressed disp8 encoding if the displacement is a multiple of scale (N), which depends on Vector Length, embedded broadcasting, and lane size. Please refer to section 2.7.5 of Intel SDM for more details.
e.g., Consider two instructions, one with displacement 0x10203040 and the other with displacement 0x40, instruction operates over full 64-byte vector hence scale N = 64. Displacement of latter instruction is a multiple of scale, thus can be represented by 1 byte displacement encoding, while the former requires 4 bytes to represent displacement in instruction encoding.
Kindly review and share your feedback.
Best Regards,
Jatin
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25021/head:pull/25021$ git checkout pull/25021Update a local copy of the PR:
$ git checkout pull/25021$ git pull https://git.openjdk.org/jdk.git pull/25021/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25021View PR using the GUI difftool:
$ git pr show -t 25021Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25021.diff
Using Webrev
Link to Webrev Comment