-
Notifications
You must be signed in to change notification settings - Fork 5k
ARM64-SVE: Fix hwintrinsics flags #107791
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
Conversation
This is ready. @dotnet/arm64-contrib @kunalspathak |
Difference between this PR and HEAD is that HEAD will mark some registers as delay free when it doesn't need to. |
Confirmed stress tests of the hwintrinsics tests fully pass. |
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.
Added a question about HW_Flag_ExplicitMaskedOperation
.
@@ -204,7 +204,8 @@ enum HWIntrinsicFlag : unsigned int | |||
// The intrinsic uses a mask in arg1 to select elements present in the result | |||
HW_Flag_ExplicitMaskedOperation = 0x20000, | |||
|
|||
// The intrinsic uses a mask in arg1 to select elements present in the result, and must use a low register. | |||
// The intrinsic uses a mask in arg1 (either explicitly, embdedd or optionally embedded) to select elements present |
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.
nit: something to fix in follow-up PR
// The intrinsic uses a mask in arg1 (either explicitly, embdedd or optionally embedded) to select elements present | |
// The intrinsic uses a mask in arg1 (either explicitly, embedded or optionally embedded) to select elements present |
HARDWARE_INTRINSIC(Sve, ConvertMaskToVector, -1, 1, {INS_sve_mov, INS_sve_mov, INS_sve_mov, INS_sve_mov, INS_sve_mov, INS_sve_mov, INS_sve_mov, INS_sve_mov, INS_sve_mov, INS_sve_mov}, HW_Category_Helper, HW_Flag_Scalable|HW_Flag_ExplicitMaskedOperation) | ||
HARDWARE_INTRINSIC(Sve, ConvertVectorToMask, -1, 2, {INS_sve_cmpne, INS_sve_cmpne, INS_sve_cmpne, INS_sve_cmpne, INS_sve_cmpne, INS_sve_cmpne, INS_sve_cmpne, INS_sve_cmpne, INS_sve_cmpne, INS_sve_cmpne}, HW_Category_Helper, HW_Flag_Scalable|HW_Flag_ReturnsPerElementMask|HW_Flag_LowMaskedOperation) | ||
HARDWARE_INTRINSIC(Sve, ConvertMaskToVector, -1, 1, {INS_sve_mov, INS_sve_mov, INS_sve_mov, INS_sve_mov, INS_sve_mov, INS_sve_mov, INS_sve_mov, INS_sve_mov, INS_sve_mov, INS_sve_mov}, HW_Category_Helper, HW_Flag_Scalable) | ||
HARDWARE_INTRINSIC(Sve, ConvertVectorToMask, -1, 2, {INS_sve_cmpne, INS_sve_cmpne, INS_sve_cmpne, INS_sve_cmpne, INS_sve_cmpne, INS_sve_cmpne, INS_sve_cmpne, INS_sve_cmpne, INS_sve_cmpne, INS_sve_cmpne}, HW_Category_Helper, HW_Flag_Scalable|HW_Flag_ExplicitMaskedOperation|HW_Flag_ReturnsPerElementMask|HW_Flag_LowMaskedOperation) |
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.
removing HW_Flag_ExplicitMaskedOperation
from MaskToVector
and putting it VectorToMask
makes sense, but wondering why it worked so far? probably we do not care of this flag and can be eliminated?
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.
spoke offline. As expected, this was never used for these 2 intrinsics, but good to have for correctness.
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.
We'll never use it because the converts will never be embedded
/backport to release/9.0 |
Started backporting to release/9.0: https://github.com/dotnet/runtime/actions/runs/10853493972 |
ARM64-SVE: Fix hwintrinsics flags
Spotted during implementation of #107459
SQADD and SQSUB have two variants, predicated and unpredicated. Currently we only support SVE1, so must use the unpredicated version. Remove RMW and low mask flags, because these are for the predicated version.
ConvertMaskToVector does not have an explicit mask, but ConvertVectorToMask does. Fix these.
Add assert checks to IsLowMaskedOperation