-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[mono] Pass Vector64, Vector128, and Vector256 in SIMD registers whenever possible #60068
Comments
Would allow us to run these tests https://github.com/dotnet/runtime/tree/main/src/tests/Interop/PInvoke/Generics and implement mono/mono#17868 A related issue #9578 is tracking the CoreCLR work to unblock passing Vector128/Vector256 by value to P/Invokes. It's currently blocked (with a bad error message about the types not being blittable) due to CoreCLR incorrectly marshalling vector return values on Windows x64. A related issue is for CoreCLR to implement support for |
A specific use-case is to be able to call Apple platform APIs that have some arguments that have types with a |
We would need this across the board: LLVM, mini and interp should support it. |
When using LLVM as codegen backend, LLVM is able to does the work of sending the data to SIMD register before the operation. Here is an example from x64 c# code
When LLVM is enabled:
Thus, this work actually only apply to mini and interp. |
@fanyang-mono
What this issue is about is two things:
These two problems could be tackled separately: we could just do the managed-to-managed calls first. But we would still need to do something for LLVM (as your example shows) |
Gotcha! |
Nice to have, moving to 8.0.0 |
This is a tracking issue. Moving it to .NET9. |
In particular this should work for FFI calls, so we should respect the target platform's common calling convention(s).
An similar example is 128-bit vectors for amd64.
Handles input arguments:
Handles return argument:
The text was updated successfully, but these errors were encountered: