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
8261394: [vector] Crash with "assert(Matcher::vector_size_supported(elem_bt, length)) failed: length in range" #38
Conversation
👋 Welcome back xgong! A progress list of the required criteria for merging this PR into |
Webrevs
|
Hi, could anyone please take a look at this PR? Thanks so much! |
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, but perhaps @sviswa7 may take a look as well?
@XiaohongGong 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 no new commits pushed to the 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 (@nsjian, @sviswa7) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
For ACOSDouble64VectorTests, I think @sviswa7 would like to generate code like this:
However, the fix will generate code like this.
Maybe, it's OK to call vector_acos_double64 for Double64Vector on x86. |
@DamonFool is correct, with this change the vector stubs are not being called at all.
// TODO When mask usage is supported, VecMaskNotUsed needs to be VecMaskUseLoad. |
This change doesn't call vector_acos_double64 for Double64Vector on x86 either. Let's push it to fix the bug ASAP. |
Hi @sviswa7 @DamonFool, the suggested solution makes sense to me. Thanks for looking at this change. I will update the patch ASAP. |
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 it.
Thanks for the review @DamonFool @sviswa7 @nsjian |
/integrate |
@XiaohongGong |
/sponsor |
@DamonFool Only Committers are allowed to sponsor changes. |
/sponsor |
@nsjian @XiaohongGong Pushed as commit e901c4d. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
The crash is introduced by [1] and happens when the compiler is making an unspported vector type:
Before vectorization for each vector intrinsic, the hotspot will check whether current arch supports the vector operation from several aspects like the backend implementation, the vector type and length. Once one of them is not matched, the compiler will stop the vectorization and go back to the default java implementation.
The changes in [1] missed the check for "Op_CallLeafVector". I think the double 64-bits vector is not supported to be vectorized. However, due to the missing check, the compiler continues the progress and then the crash happens.
This patch fixes it by making sure the check contains all opcodes.
[1] https://bugs.openjdk.java.net/browse/JDK-8261267
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/panama-vector pull/38/head:pull/38
$ git checkout pull/38