-
Notifications
You must be signed in to change notification settings - Fork 737
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
x86: Implement fma intrinsic #21118
Open
BradleyWood
wants to merge
1
commit into
eclipse-openj9:master
Choose a base branch
from
BradleyWood:fma
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+170
−0
Open
x86: Implement fma intrinsic #21118
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
This isn't a comment on the approach you've taken to handle code generation of these methods. It's more an observation about the diverse mechanisms we seem to have in OMR and OpenJ9 for indicating whether the implementation of a recognized method that exists in the Java class libraries should be inlined as is, or a preferred implementation should be inlined by code generation.
Sometimes we have special opcodes that represent the precise semantics of a method that is often implemented using single hardware instructions, as is the case for
java.lang.Integer.numberOfLeadingZeros()
, or there might be a very specific query indicating whether the method can be inlined by code generation, as is the case forjava.lang.Class.isAssignableFrom()
.The fused multiply-add methods feel like something that ought to be represented using operations in the IL, but I see that we've not been handling it that way with the existing code generation support for the
java.lang.Math.fma
andjava.lang.StrictMath.fma
methods. I think this whole area could stand some clean up to reduce the number of ways these choices are communicated/managed between code generation and inlining.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, and I've been working on a PR for a little over a year now to simplify and make intrinsic handling more consistent and grok-able. Sadly, it's taking a while, but this problem is being worked on.
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.
The issue I have with this, is that I don't think there would be any other place we could use an FMA opcode. You can't just translate
a * b + c
into FMA because it would violate strictfp.