8383823: C2: Meet not symmetric for TypeAryKlassPtr types#31714
Open
hgqxjj wants to merge 1 commit into
Open
Conversation
|
👋 Welcome back ghan! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
The total number of required reviews for this PR has been set to 2 based on the presence of this label: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
While working on another C2 type-analysis PR (#30690), I used
TypeKlassPtr::filter(). This exposed aMeet Not Symmetricassert in some GHA test jobs involvingTypeAryKlassPtr.The issue is in
TypeAryKlassPtr::xmeet().meet_aryptr()may widen the outer array klass pointer from Constant to NotNull, but the element klass pointer may still keep the more precise type computed before that widening.The resultingTypeAryKlassPtrcan then fail the meet/dual symmetry check and trigger theMeet Not Symmetricassert.Solution:
When
meet_aryptr()returnsNOT_SUBTYPEand widens the outer array klass pointer from Constant to NotNull, recompute the element klass pointer meet after lowering AnyNull element klass pointers to NotNull.Test:
GHA
No standalone regression test has been added yet. I have not yet been able to reduce the failure to a small standalone test case.
The issue is reproducible through the other in-progress C2 type-analysis PR (#30690) which uses
TypeKlassPtr::filter(). With this fix applied, theMeet Not Symmetricassert no longer reproduces in those GHA test jobs.Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/31714/head:pull/31714$ git checkout pull/31714Update a local copy of the PR:
$ git checkout pull/31714$ git pull https://git.openjdk.org/jdk.git pull/31714/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 31714View PR using the GUI difftool:
$ git pr show -t 31714Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/31714.diff
Using Webrev
Link to Webrev Comment