Add initial support for Vector64 on Arm64 and Amd64#47618
Merged
imhameed merged 13 commits intodotnet:masterfrom Feb 17, 2021
Merged
Add initial support for Vector64 on Arm64 and Amd64#47618imhameed merged 13 commits intodotnet:masterfrom
imhameed merged 13 commits intodotnet:masterfrom
Conversation
vargaz
reviewed
Jan 29, 2021
vargaz
reviewed
Jan 29, 2021
226a00a to
9d9f4e7
Compare
…trinsics.Vector64`1<byte>:get_Zero
…is enabled or type is 128
… a width-agnostic round-trip through memory instead of assuming 128-bit
4e2f0ae to
5b48eee
Compare
…ise vector initialization
Member
|
LGTM |
vargaz
reviewed
Feb 17, 2021
| #else | ||
| #define MONO_CLASS_IS_SIMD(cfg, klass) (((cfg)->opt & MONO_OPT_SIMD) && m_class_is_simd_type (klass)) | ||
| #define MONO_CLASS_IS_SIMD(cfg, klass) (((cfg)->opt & MONO_OPT_SIMD) && m_class_is_simd_type (klass) && (COMPILE_LLVM (cfg) || mono_type_size (m_class_get_byval_arg (klass), NULL) == 16)) | ||
| #endif |
Contributor
There was a problem hiding this comment.
This means that non-arm64 only supports vector128 in non-llvm mode right ?
Contributor
There was a problem hiding this comment.
Yeah. Maybe the enclosing preprocessor conditionals should be made more specific, and MONO_CLASS_IS_SIMD should expand to a constant "false" expression on everything other than x86, amd64, and arm64.
vargaz
approved these changes
Feb 17, 2021
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Contributes to #42350
This change:
Conditionally marks Vector64 as a SIMD type. Vector64 is treated as a
SIMD type on amd64 and arm64 only when the LLVM backend is in use. Vector128
continues to be supported with both LLVM and mini on amd64, as before; on arm64,
it continues to only be supported with LLVM.
Checks vector widths for compatibility when bitcasting.
Slightly cleans up return value handling for SIMD value types--conversion
from an aggregate to an LLVM vector-typed value now happens in one location.
Removes a 128-bit SIMD assumption in the lowering code for OP_SETRET.
Renames
emit_vector128toemit_sri_vectorand makes it width-agnostic.Improves the generated IR for non-broadcasting Vector64/Vector128.Create; the
resulting code works entirely in registers and does not depend on temporary
stack storage for writing values into individual vector lanes.