-
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
Arm64/Sve: Handle ConvertTo* APIs properly #103876
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
@dotnet/arm64-contrib @amanasifkhalid PTAL @ebepho - For |
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 for fixing this!
|
||
// For now, make sure that we get here only for intrinsics that we are | ||
// sure about to rely on auxilary type's size. | ||
assert((embOp->GetHWIntrinsicId() == NI_Sve_ConvertToInt32) || |
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.
Do you intend for this assert to go away once @ebepho implements ConvertToInt64
, or should we keep checking for intrinsics with different base/return types? If the latter, I wonder if we ought to add a flag for these types of 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.
For now, we will update the assert, but may be later, we might consider adding a flag. For now, I want to see if there are more intrinsic categories that falls under this.
Co-authored-by: Aman Khalid <amankhalid@microsoft.com>
Co-authored-by: Aman Khalid <amankhalid@microsoft.com>
We were hitting an assert in these tests because we were not handling the wrapping of these intrinsics inside `ConditionalSelect.
ConvertTo*
APIs get contained insideConditionalSelect
. To do that we now store the auxiliary type as baseType of return vector and if that matches with the wrapped mask operation, then we contain the intrinsics.ConvertToInt32
implements https://docsmirror.github.io/A64/2023-06/fcvtzu_z_p_z.html for following variants:FCVTZS <Zd>.S, <Pg>/M, <Zn>.S
FCVTZS <Zd>.S, <Pg>/M, <Zn>.D
ConvertToUInt32
implements https://docsmirror.github.io/A64/2023-06/fcvtzs_z_p_z.html for following variants:FCVTZU <Zd>.S, <Pg>/M, <Zn>.S
FCVTZU <Zd>.S, <Pg>/M, <Zn>.D