-
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
Implement StoreVectorNxM for Arm64 #94129
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics Issue DetailsContribute towards #84510 // ST3 (multiple structures)
public static unsafe void StoreVector128x3(byte* address, (Vector128<byte> Value1, Vector128<byte> Value2, Vector128<byte> Value3) value);
public static unsafe void StoreVector128x3(sbyte* address, (Vector128<sbyte> Value1, Vector128<sbyte> Value2, Vector128<sbyte> Value3) value);
public static unsafe void StoreVector128x3(short* address, (Vector128<short> Value1, Vector128<short> Value2, Vector128<short> Value3) value);
public static unsafe void StoreVector128x3(ushort* address, (Vector128<ushort> Value1, Vector128<ushort> Value2, Vector128<ushort> Value3) value);
public static unsafe void StoreVector128x3(int* address, (Vector128<int> Value1, Vector128<int> Value2, Vector128<int> Value3) value);
public static unsafe void StoreVector128x3(uint* address, (Vector128<uint> Value1, Vector128<uint> Value2, Vector128<uint> Value3) value);
public static unsafe void StoreVector128x3(long* address, (Vector128<long> Value1, Vector128<long> Value2, Vector128<long> Value3) value);
public static unsafe void StoreVector128x3(ulong* address, (Vector128<ulong> Value1, Vector128<ulong> Value2, Vector128<ulong> Value3) value);
public static unsafe void StoreVector128x3(float* address, (Vector128<float> Value1, Vector128<float> Value2, Vector128<float> Value3) value);
public static unsafe void StoreVector128x3(double* address, (Vector128<double> Value1, Vector128<double> Value2, Vector128<double> Value3) value);
public static unsafe void StoreVector64x3(byte* address, (Vector64<byte> Value1, Vector64<byte> Value2, Vector64<byte> Value3) value);
public static unsafe void StoreVector64x3(sbyte* address, (Vector64<sbyte> Value1, Vector64<sbyte> Value2, Vector64<sbyte> Value3) value);
public static unsafe void StoreVector64x3(short* address, (Vector64<short> Value1, Vector64<short> Value2, Vector64<short> Value3) value);
public static unsafe void StoreVector64x3(ushort* address, (Vector64<ushort> Value1, Vector64<ushort> Value2, Vector64<ushort> Value3) value);
public static unsafe void StoreVector64x3(int* address, (Vector64<int> Value1, Vector64<int> Value2, Vector64<int> Value3) value);
public static unsafe void StoreVector64x3(uint* address, (Vector64<uint> Value1, Vector64<uint> Value2, Vector64<uint> Value3) value);
public static unsafe void StoreVector64x3(float* address, (Vector64<float> Value1, Vector64<float> Value2, Vector64<float> Value3) value);
// ST4 (multiple structures)
public static unsafe void StoreVector128x4(byte* address, (Vector128<byte> Value1, Vector128<byte> Value2, Vector128<byte> Value3, Vector128<byte> Value4) value);
public static unsafe void StoreVector128x4(sbyte* address, (Vector128<sbyte> Value1, Vector128<sbyte> Value2, Vector128<sbyte> Value3, Vector128<sbyte> Value4) value);
public static unsafe void StoreVector128x4(short* address, (Vector128<short> Value1, Vector128<short> Value2, Vector128<short> Value3, Vector128<short> Value4) value);
public static unsafe void StoreVector128x4(ushort* address, (Vector128<ushort> Value1, Vector128<ushort> Value2, Vector128<ushort> Value3, Vector128<ushort> Value4) value);
public static unsafe void StoreVector128x4(int* address, (Vector128<int> Value1, Vector128<int> Value2, Vector128<int> Value3, Vector128<int> Value4) value);
public static unsafe void StoreVector128x4(uint* address, (Vector128<uint> Value1, Vector128<uint> Value2, Vector128<uint> Value3, Vector128<uint> Value4) value);
public static unsafe void StoreVector128x4(long* address, (Vector128<long> Value1, Vector128<long> Value2, Vector128<long> Value3, Vector128<long> Value4) value);
public static unsafe void StoreVector128x4(ulong* address, (Vector128<ulong> Value1, Vector128<ulong> Value2, Vector128<ulong> Value3, Vector128<ulong> Value4) value);
public static unsafe void StoreVector128x4(float* address, (Vector128<float> Value1, Vector128<float> Value2, Vector128<float> Value3, Vector128<float> Value4) value);
public static unsafe void StoreVector128x4(double* address, (Vector128<double> Value1, Vector128<double> Value2, Vector128<double> Value3, Vector128<double> Value4) value);
public static unsafe void StoreVector64x4(byte* address, (Vector64<byte> Value1, Vector64<byte> Value2, Vector64<byte> Value3, Vector64<byte> Value4) value);
public static unsafe void StoreVector64x4(sbyte* address, (Vector64<sbyte> Value1, Vector64<sbyte> Value2, Vector64<sbyte> Value3, Vector64<sbyte> Value4) value);
public static unsafe void StoreVector64x4(short* address, (Vector64<short> Value1, Vector64<short> Value2, Vector64<short> Value3, Vector64<short> Value4) value);
public static unsafe void StoreVector64x4(ushort* address, (Vector64<ushort> Value1, Vector64<ushort> Value2, Vector64<ushort> Value3, Vector64<ushort> Value4) value);
public static unsafe void StoreVector64x4(int* address, (Vector64<int> Value1, Vector64<int> Value2, Vector64<int> Value3, Vector64<int> Value4) value);
public static unsafe void StoreVector64x4(uint* address, (Vector64<uint> Value1, Vector64<uint> Value2, Vector64<uint> Value3, Vector64<uint> Value4) value);
public static unsafe void StoreVector64x4(float* address, (Vector64<float> Value1, Vector64<float> Value2, Vector64<float> Value3, Vector64<float> Value4) value);
|
Hi @kunalspathak , would you prefer an overloaded name for the interleaved multi-structure stores like we did for |
sorry, but could you confirm which APIs are you asking about? |
The StoreVectorNX2, StoreVectorNx3, StoreVectorNx3 that result in ST2, ST3 and ST4 instructions respectively. |
Hi @kunalspathak, Could you please confirm if my understanding is correct?
If this is correct, then aren't these names a little confusing? |
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.
Changes looks good, some minor fixes needed.
src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs
Outdated
Show resolved
Hide resolved
Looking carefully, yes, you are right. I swapped the two. I will send a PR to fix it. Thanks for spotting it. |
Cool, I'll update this PR accordingly 👍 |
After merging #93223, I'll rebase/merge this PR and then mark it ready for review. |
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. Just a request to update the documentation for LoadVector equivalent.
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/AdvSimd.cs
Show resolved
Hide resolved
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
Contribute towards #84510