-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
8257182: JCK test failures in integer / long rotation tests #1562
Conversation
👋 Welcome back chagedorn! A progress list of the required criteria for merging this PR into |
@chhagedorn 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
|
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 great! Thanks for fixing it and adding a regression test.
src/hotspot/share/opto/mulnode.cpp
Outdated
int shift = r2->get_con() & (BitsPerJavaInteger - 1); // semantics of Java shifts | ||
return TypeInt::make((r1->get_con() << shift) | (r1->get_con() >> (32 - shift))); | ||
unsigned int r1_con = (unsigned int)r1->get_con(); | ||
unsigned int shift = (unsigned int)(r2->get_con()) & (unsigned int)(BitsPerJavaInteger - 1); // semantics of Java shifts |
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'd prefer to use juint which actually is the same, but would be more consistent IMHO.
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.
+1
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 agree, I'll change it to juint
@TheRealMDoerr @vnkozlov Thanks for your reviews! |
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.
@chhagedorn 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 8 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
@iwanowww Thanks for your review! |
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.
@TobiHartmann @vnkozlov @TheRealMDoerr Thanks for your reviews! |
/integrate |
@chhagedorn Since your change was applied there have been 26 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 4a85514. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
The
RotateLeftNode::Value()
andRotateRightNode::Value()
methods use an arithmetic instead of a logical shift due to applying the shift operator>>
to a signed instead of an unsigned number. When, for example, rotating a negative even integer (least significant bit is 0) to the right, we should always get a positive number (most significant bit becoming 0). However, the arithmetic shift keeps the integer being negative. This lets some JCK rotation tests fail with -Xcomp.The previously failing JCK tests work again with -Xcomp by applying this fix.
Thanks,
Christian
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/1562/head:pull/1562
$ git checkout pull/1562