-
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
[mono] Intrinsify multiple LoadVector API's #98077
[mono] Intrinsify multiple LoadVector API's #98077
Conversation
Tagging subscribers to this area: @SamMonoRT, @fanyang-mono Issue Detailsnull
|
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. |
Mostly working. There is some issue with emitting |
src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs
Show resolved
Hide resolved
This has been resolved. The PR is ready to review. |
@fanyang-mono - can you trigger a pipeline that run these tests under mono? I think it was extra-platform or something? |
...ies/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/AdvSimd.PlatformNotSupported.cs
Show resolved
Hide resolved
src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs
Outdated
Show resolved
Hide resolved
@@ -1642,6 +1642,8 @@ MINI_OP(OP_ARM64_LDNP_SCALAR, "arm64_ldnp_scalar", VREG, IREG, NONE) | |||
MINI_OP(OP_ARM64_LDP, "arm64_ldp", VREG, IREG, NONE) | |||
MINI_OP(OP_ARM64_LDP_SCALAR, "arm64_ldp_scalar", VREG, IREG, NONE) | |||
|
|||
MINI_OP(OP_ARM64_LDM, "arm64_ldm", VREG, IREG, NONE) |
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.
are these custom names specific for mono? Can we write a comment for them because there will be more coming for store? Also, should arm64_ldm
reused for LoadVector*
and LoadAndUnzip
?
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.
All the custom names used in this file are specific for Mono IR. For LLVM codegen, they follows similar logic, so I use the same string for both LoadVector*
and LoadAndUnzip
@@ -13546,6 +13563,10 @@ add_intrinsic (EmitContext *ctx, int id) | |||
*/ | |||
LLVMTypeRef associated_type = intrin_types [vw][0]; | |||
intrins = add_intrins2 (module, id, distinguishing_type, associated_type, &intrins_type); | |||
} else if (kind == INTRIN_kind_add_pointer) { |
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.
what is this change about and why we have to track this separately? Mono supported APIs that takes pointers, right?
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.
This is related to calling LLVM intrinsics. Yes, Mono supports pointer type.
@fanyang-mono build failures are related. This is one from tvos-arm64
|
The latest commit should be able to resolve this build failure. |
/azp run runtime-llvm |
Why not also implement |
CI failures are known. |
The LLVM intrinsic that needs to be emitted is a little different. I need more time to make sure everything around it works properly. This PR is ready to be merged. Thus, I would prefer to get this one merged soon. |
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 make sure the tests you enabled ran and passed on mono.
CI lane (Mono full AOT with LLVM running runtime tests on arm64) which could validate this change is currently off. Here is the result from local run on my machine:
|
Contributes to #93081
This PR intrinsify the following API's: