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
Recognize @IntrinsicCandidate java.lang.Math.multiplyHigh #17861
Recognize @IntrinsicCandidate java.lang.Math.multiplyHigh #17861
Conversation
b41e037
to
c61c2df
Compare
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.
Were you able to observe the transformation occurring? I think both of the below two problems would independently prevent it
You are right, I was wondering why I didn't see this transform happening after I opened the PR and was about to mark this WIP. I'll push the changes to enable them. |
c61c2df
to
23a477e
Compare
I can confirm the transformation happens now! |
Waiting on #17892 |
java.lang.Math.multiplyHigh has been an intrinsic candidate in the Java class library since JDK17. There is a single opcode which implements the functionality of multiplyHigh. This provides an opportunity to simplify calls to multiplyHigh much like other Math methods (abs, min, max, etc). This commit adds the following: + The recognition of java.lang.Math.multiplyHigh as a recognized method. + The replacement of calls to java.lang.Math.multiplyHigh with a single lmulh node as part of RecognizedCallTransformer Signed-off-by: James You <james.you@protonmail.com>
23a477e
to
f03f364
Compare
@jdmpapin , ready for another pass! |
Jenkins test sanity all jdk21 |
java.lang.Math.multiplyHigh has been an intrinsic candidate in the Java class library since JDK17. There is a single opcode which implements the functionality of multiplyHigh. This provides an opportunity to simplify calls to multiplyHigh much like other Math methods (abs, min, max, etc).
This commit adds the following: