-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Revert unintentional alignment change for Vector256<T> #36673
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -90,7 +90,8 @@ public override bool ComputeContainsGCPointers(DefType type) | |
|
|
||
| public override ValueTypeShapeCharacteristics ComputeValueTypeShapeCharacteristics(DefType type) | ||
| { | ||
| if (type.Context.Target.Architecture == TargetArchitecture.ARM64) | ||
| if (type.Context.Target.Architecture == TargetArchitecture.ARM64 && | ||
| type.Instantiation[0].IsPrimitiveNumeric) | ||
| { | ||
| return type.InstanceFieldSize.AsInt switch | ||
| { | ||
|
|
@@ -106,8 +107,9 @@ public static bool IsVectorType(DefType type) | |
| { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What will happen for say
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Their alignment will be the same as for numeric |
||
| return type.IsIntrinsic && | ||
| type.Namespace == "System.Runtime.Intrinsics" && | ||
| ((type.Name == "Vector64`1") || (type.Name == "Vector128`1")) && | ||
| type.Instantiation[0].IsPrimitive; | ||
| (type.Name == "Vector64`1" || | ||
| type.Name == "Vector128`1" || | ||
| type.Name == "Vector256`1"); | ||
| } | ||
| } | ||
| } | ||
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.
Should this be a special
IsSupportedVectorBaseTypeinstead? We only support the 10 primitive types today, but that may change in the future when we addSystem.Halffor example (which is a supported vector type but which isn't an IL primitive).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.
That follows naming of the API,
getTypeForPrimitiveNumericClassis used to recognize those 10 allowed primitive types here:runtime/src/coreclr/src/jit/simd.cpp
Line 580 in e5badd7
If we add more allowed types, we should rename the API and this property at the same time.
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 assume that the fact we don't support this with
nintandnuint(IntPtr/UIntPtr) is intentional.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.
It is currently intentional but there is a proposal to extend support to those types as well: #36160
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.
Then we might want to throw a
RequiresRuntimeJitExceptionforVector*<nint>types to avoid a breaking change (passing in X vs. Q registers) later.