-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Updating the JIT to recognize and handle Vector64/128/256<T> for nint/nuint #52016
Conversation
Also CC @echesakovMSFT |
We already have negative tests assertion that the various APIs throw |
Logged #52017 for the API proposal. Most of the surface area is generic and support comes that way. There is also some surface area that can be exposed for cases like: |
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.
Looks great. Thank you for the quick fix! There is still one outstanding suggestion regarding Vector256NUIntHandle
.
Co-authored-by: Anton Lapounov <anton.lapounov@microsoft.com>
8a13818
to
0fdacc4
Compare
cc @dotnet/jit-contrib |
@@ -1502,7 +1502,7 @@ int MethodTable::GetVectorSize() | |||
// We need to verify that T (the element or "base" type) is a primitive type. | |||
TypeHandle typeArg = GetInstantiation()[0]; | |||
CorElementType corType = typeArg.GetSignatureCorElementType(); | |||
if (corType >= ELEMENT_TYPE_I1 && corType <= ELEMENT_TYPE_R8) | |||
if (((corType >= ELEMENT_TYPE_I1) && (corType <= ELEMENT_TYPE_R8)) || (corType == ELEMENT_TYPE_I) || (corType == ELEMENT_TYPE_U)) |
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 VM was not correctly handling nint
or nuint
for the purposes of GetVectorSize()
which was impacting downstream decisions about whether it was HFA/HVA and how it should be handled.
|
@jkotas (for the small VM side change) and @dotnet/jit-contrib could you give this a quick secondary review. It should be good to merge otherwise. |
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.
LGTM. Thank you!
This resolves the dotnet/runtime side for dotnet/runtimelab#1035 by recognizing
nint
andnuint
forVector64/128/256<T>
as valid ABI types.The general-purpose methods (such as
As
,GetElement
,WithElement
, etc) are blocked until they go through API review.CC. @jkotas, @AntonLapounov