-
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
Add support for Sve.Store() #102262
Add support for Sve.Store() #102262
Conversation
Note regarding the
|
@a74nh @kunalspathak @dotnet/arm64-contrib @arch-arm64-sve |
Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics |
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 a big PR and thanks for working on it. Overall, looks good except some nit comments. Also, please run the tests, including the stress tests and share the results.
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs
Outdated
Show resolved
Hide resolved
break; | ||
} | ||
|
||
case NI_Sve_Store: |
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.
Looking at #102180 reminded me that we can do the following....
For NI_Sve_Store
remove the Special Code Gen flag and this case statement. This will cause the generic code to call emitIns_R_R_R()
.
You can now add a special case in emitIns_R_R_R()
so that for NI_Sve_Store
it just calls down to emitIns_R_R_R_I()
with 0
for the immediate. Eg:
runtime/src/coreclr/jit/emitarm64sve.cpp
Line 4377 in 692660e
case INS_sve_ld1b: |
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.
Curious...
NI_AdvSimd_Store
uses gtNewSimdStoreNode()
which eventually gets generated in genCodeForStoreInd()
. This has extra code, for example, isvolatile checks.
Meanwhile NI_AdvSimd_StoreSelectedScalar
imports like a normal hwintrinsic and gets generated in hwintrinsiccodegenarm64.cpp
. This is the same for the various other stores.
Is there a special reason for using genCodeForStoreInd
?
Why do the other stores not use genCodeForStoreInd
?
Should NI_Sve_Store
use genCodeForStoreInd
?
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 will have to double check on this one. Opened #102347
Stress tests didn't flag anything
|
As noted in #102180 (comment), these should be https://dougallj.github.io/asil/doc/st4d_z_p_bi_64.html Similar API was named as |
src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveStoreTest.template
Outdated
Show resolved
Hide resolved
break; | ||
} | ||
|
||
case NI_Sve_Store: |
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 will have to double check on this one. Opened #102347
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. Thanks!
* Add support for Sve.Store() * Fix formatting issues * Remove incorrect instructions from comment * Rename Sve.Store() -> Sve.StoreAndZip() * Refactor test templates
* Add support for Sve.Store() * Fix formatting issues * Remove incorrect instructions from comment * Rename Sve.Store() -> Sve.StoreAndZip() * Refactor test templates
Contribute towards #99957.