-
Notifications
You must be signed in to change notification settings - Fork 155
8269580: assert(is_valid()) failed: invalid register (-1) #172
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. |
|
/label hotspot-compiler-dev |
|
@jatin-bhateja The |
vnkozlov
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.
Good.
What testing you did?
|
@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 34 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 |
No explicit test added since the code flow involves post allocation system initialization pattern which is very frequently exercised by almost all jtreg tests on KNL |
|
I have to test it in our system before you push. I will let you know results. |
|
tier1-3 testing passed. |
| predicate(!((ClearArrayNode*)n)->is_large() && | ||
| UseAVX > 2 && VM_Version::supports_avx512vlbw() && | ||
| UseAVX > 2 && |
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.
VM_Version::supports_avx512vlbw() check is required otherwise MacroAssembler::clear_mem will assert. See the code snippet below. The assert is generated because the emovdqu with smaller than 512 bit vector width is not supported unless avx512vl() is available on the platform.
// Clearing constant sized memory using YMM/ZMM registers.
void MacroAssembler::clear_mem(Register base, int cnt, Register rtmp, XMMRegister xtmp, KRegister mask) {
assert(UseAVX > 2 && VM_Version::supports_avx512vlbw(), "");
dean-long
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.
I can't convince myself that this fix is correct. The logic that controls when the mask register is used seems much more complicated that the predicate that guards it.
|
Hi @sviswa7 , in all the following code paths originating from rep_stos and rep_stos_evex instruction pattern EVEX encoded instructions are guarded by compile time checks, thus it should be safe to remove AVX512BW check from rep_stos and just enable it for UseAVX <= 2.
This bug is related to clear operation over small non-constant length. |
|
@jatin-bhateja I see your point. With your change, the predicates are enough to prevent the assert. But I noticed an existing issue for both the small and large cases. The predicates do not prevent some cases where a mask register will be reserved when it isn't really needed. For example when UseFastStosb is TRUE or UseXMMForObjInit is FALSE. It seems like a good followup RFE. |
|
Hi @dean-long , yes extra opmask allocation will exist for non default control path, but its not a bug, and that's the penalty of packing mutiple flows in one pattern. We can do more cleanup in this flow as suggested. |
|
/integrate |
|
Going to push as commit 4bbf11d.
Your commit was automatically rebased without conflicts. |
|
@jatin-bhateja Pushed as commit 4bbf11d. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
predicate(!((ClearArrayNode*)n)->is_large() &&
(UseAVX <= 2 || !VM_Version::supports_avx512vlbw()));
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk17 pull/172/head:pull/172$ git checkout pull/172Update a local copy of the PR:
$ git checkout pull/172$ git pull https://git.openjdk.java.net/jdk17 pull/172/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 172View PR using the GUI difftool:
$ git pr show -t 172Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk17/pull/172.diff