-
Notifications
You must be signed in to change notification settings - Fork 706
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
Fix reference array element alignment test for stable arrays #15512
Fix reference array element alignment test for stable arrays #15512
Conversation
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.
Code changes LGTM with one mild suggestion.
Another suggestion about the message:
take compressed references in account when checking if array element is null
For most types, the alignment check is there just to make sure that we're looking at exactly one array element when we try to determine whether the value is zero, but as I mentioned in my other comment, a misaligned reference load isn't even safe to perform at all. So I think it would make more sense to characterize this in the description/commit message as a fix for the reference array element alignment test. It does also ensure that we're looking at exactly one array element for the purpose of checking for a null though, so I'll leave it to you how best to describe it
edited to add: IMO it would be good at least to spell out the problem that this fixes (which I assume is the following): we would spuriously fail to fold loads of reference array elements at odd positions when compressed references were enabled because the alignment test looked for 8-byte alignment even though only 4-byte alignment is really required
- we would spuriously fail to fold loads of reference array elements at odd positions when compressed references were enabled because the alignment test looked for 8-byte alignment even though only 4-byte alignment is really required
995be92
to
75dbc84
Compare
Jenkins test sanity all jdk17 |
@vijaysun-omr, has your question been adequately addressed? And if so, do you have anything further, or does the change look OK to you? (subject to the PR testing, of course) |
Yes, thanks, I have approved the change now. |
elements at odd positions when compressed references were enabled
because the alignment test looked for 8-byte alignment even though
only 4-byte alignment is really required