-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[mono] Implement AdvSimd #49260
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
Merged
Merged
[mono] Implement AdvSimd #49260
Changes from all commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
0848153
Checkpoint
imhameed 706cf0e
Add some shifts
imhameed 79514da
Implement rounding
imhameed 6cc2596
Implement ReverseElement{Bits,8,16,32}
imhameed f0e2e41
Add reciprocal fp/u32 operations
imhameed cca921b
Add some bitwise operations
imhameed dad5fed
Add negation
imhameed 6341449
Add every AdvSimd symbol name
imhameed 8580569
Minor cleanup
imhameed a9bc75e
Checkpoint
imhameed 8d16907
Implement some multiplication ops
imhameed e5a6b06
Fix amd64
imhameed 19cbca8
More multiplication
imhameed 6a88dc7
Implement min/max
imhameed a82ad4d
Add load ops
imhameed 5203566
Add clz/cls
imhameed da21e6f
Implement insert/insertscalar
imhameed 94b7396
Add fused ops
imhameed 0c5047c
Add extract
imhameed fabeff7
Add duplicate
imhameed 8d5e824
Add divide
imhameed 030032a
Add f32->{u32,i32}
imhameed 069bebb
Add fp64->{u64,i64}
imhameed 9788f4a
arm64 fp conversions
imhameed fc6f373
Add comparisons
imhameed 07a7bff
Implement ceiling
imhameed f8594f7
Revert some stray unrelated changes
imhameed f37685d
Implement more bitwise operations
imhameed e666083
More arithmetic
imhameed 5ebdb81
Implement Abs.*, Absolute.*
imhameed b20631f
Implement AbsoluteCompare.*
imhameed 4a78abe
Misc fixes to shifts, math
imhameed d5ab5ec
Implement missing stuff from AdvSimd.Arm64
imhameed 9e9adab
Implement the AdvSimd.Arm64 parts of fma
imhameed 6560bd2
More AdvSimd.Arm64
imhameed 5c60c8f
Implement ExtractVector64/ExtractVector128
imhameed 16a4f7c
Unroll instructions with immediate constants and no fallback support …
imhameed 643d6a4
... Fix MinPairwiseScalar/MinAcross/MaxPairwiseScalar/MaxAcross
imhameed 76d24b6
Fix brain-os for ld1/st1
imhameed aa657a8
???
imhameed e526dc6
Fix floating point Add/Subtract
imhameed e95199d
Fix CompareEqualScalar/CompareGreaterThanOrEqualScalar/CompareGreater…
imhameed c94c07b
Fix ShiftRightArithmeticRounded, ShiftRightArithmeticRoundedScalar, S…
imhameed 3d81808
Fix MultiplyDoublingWideningLowerAndSubtractSaturate, FusedMultiplySu…
imhameed d81b1f0
Fix ShiftLogicalSaturateScalar, ShiftArithmeticRoundedSaturateScalar,…
imhameed e69386d
Fix ShiftLeftLogicalSaturateUnsignedScalar, ShiftLogicalRoundedSatura…
imhameed 5b49456
Fix PopCount
imhameed f31aec1
Fix ReverseElement8, ReverseElement16, ReverseElement32
imhameed 12fd7c9
Fix ExtractNarrowingSaturateScalar, ExtractNarrowingSaturateUnsignedS…
imhameed d229944
More test fixes:
imhameed 5baa928
LoadAndReplicateToVector: coerce the source pointer to the element ty…
imhameed 0d67d57
Move OP_INSERT_* and OP_XCAST to a shared arm64/amd64 region
imhameed b14fc9a
Address feedback: move IntrinsicId (and another LLVM-only anonymous e…
imhameed 059bce5
Don't attempt to scalarize a non-scalar sqshlu
imhameed bd2e5b2
MultiplyDoublingWideningSaturateScalar etc.: consistently place the s…
imhameed ca728df
Explicitly zero out the unused bits in scalar ops built out of vector…
imhameed 24a89e1
Fix the vector concatenation overloads of Vector128/256
imhameed 14602df
Sha1.FixedRotate is a scalar-in-vector op. TODO: refactor to use XOP_…
imhameed 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 hidden or 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 hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#ifndef __MONO_MINI_LLVM_INTRINSICS_TYPES_H__ | ||
#define __MONO_MINI_LLVM_INTRINSICS_TYPES_H__ | ||
|
||
/* An intrinsic id. The lower 23 bits are used to store a mono-specific ID. The | ||
* next 9 bits store overload tag bits. In the configuration of LLVM 9 we use, | ||
* there are 7017 total intrinsics defined in IntrinsicEnums.inc, so only 13 | ||
* bits are needed to label each intrinsic overload group. | ||
*/ | ||
typedef enum { | ||
#define INTRINS(id, llvm_id) INTRINS_ ## id, | ||
#define INTRINS_OVR(id, llvm_id, ty) INTRINS_ ## id, | ||
#define INTRINS_OVR_2_ARG(id, llvm_id, ty1, ty2) INTRINS_ ## id, | ||
#define INTRINS_OVR_3_ARG(id, llvm_id, ty1, ty2, ty3) INTRINS_ ## id, | ||
#define INTRINS_OVR_TAG(id, ...) INTRINS_ ## id, | ||
#define INTRINS_OVR_TAG_KIND(id, ...) INTRINS_ ## id, | ||
#include "llvm-intrinsics.h" | ||
INTRINS_NUM | ||
} IntrinsicId; | ||
|
||
enum { | ||
XBINOP_FORCEINT_and, | ||
XBINOP_FORCEINT_or, | ||
XBINOP_FORCEINT_ornot, | ||
XBINOP_FORCEINT_xor, | ||
}; | ||
|
||
#endif /* __MONO_MINI_LLVM_INTRINSICS_TYPES_H__ */ |
This file contains hidden or 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 hidden or 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 hidden or 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.
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.
Uh oh!
There was an error while loading. Please reload this page.