-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[RISC-V] Fused multiply-add #113961
Draft
tomeksowi
wants to merge
7
commits into
dotnet:main
Choose a base branch
from
tomeksowi:hw-intrinsics
base: main
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.
Draft
[RISC-V] Fused multiply-add #113961
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5bdfd84
Compiles
tomeksowi e022bf1
Clear crossgen SPC assert failures
tomeksowi 25dbf24
Fused multiply-add
tomeksowi 62830bf
Fix value numbering for hw intrinsics without SIMD
tomeksowi 1c53a04
Use RiscV64Base instruction set
tomeksowi c2acb78
Intrinsify MultiplyAddEstimate
tomeksowi c2bce30
More precise skip condition in JittedMethodsCountingTest
tomeksowi 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
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
Oops, something went wrong.
Oops, something went wrong.
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.
I'm still hesitating whether separating FEATURE_HW_INTRINSICS from SIMD and MASKED_HW_INTRINSICS is the right approach, there's been little code separation between them. Until we bring up the "V" extension the intrinsics RISC-V needs are scalar (e.g. FusedMultiplyAdd, LeadingZeroCount, PopCount, MultiplyHigh) and usually covered in common CoreLib parts like System.Math.
An alternative would be to handle them like #113689 and fix the value numbering for 3-operand GT_INTRINSIC to get FMA:
runtime/src/coreclr/jit/importercalls.cpp
Lines 4312 to 4316 in b21c93c
Not sure if changes would be less extensive than maintaining the above mentioned separation.
@dotnet/jit-contrib @jakobbotsch if you have an opinion.
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.
LeadingZeroCount and friends look doable via GT_INTRINSIC (WiP). So that leaves us with FMA as the odd one out.