-
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: Implement AbsoluteCompare* and Compare* APIs #104464
Conversation
Note regarding the
|
1 similar comment
Note regarding the
|
@dotnet/arm64-contrib |
Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics |
@@ -1981,30 +1981,7 @@ int LinearScan::BuildHWIntrinsic(GenTreeHWIntrinsic* intrinsicTree, int* pDstCou | |||
getLowVectorOperandAndCandidates(intrin, &lowVectorOperandNum, &lowVectorCandidates); | |||
} | |||
|
|||
if ((intrin.id == NI_Sve_ConditionalSelect) && (intrin.op2->IsEmbMaskOp()) && |
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 was dead code
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.
Yeah, looks like we handle embedded masks just above this snippet, right here.
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!
} | ||
|
||
[method: MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
private void ConditionalSelectScenario_TrueValue({Op1VectorType}<{Op1BaseType}> mask, {Op1VectorType}<{Op1BaseType}> op1, {Op1VectorType}<{Op1BaseType}> op2, {Op1VectorType}<{Op1BaseType}> falseOp) |
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.
There are a couple of cases in this template where the second operand uses Op1BaseType
instead of Op2BaseType
. This shouldn't cause any problems for now, since the APIs you're adding use operands of the same type. Should we fix this before checking the new template in, or should we wait to fix this once we add new APIs with different operand types (like what we've been doing for the last few)? I'm fine with either approach.
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.
yes, perhaps it needs a audit for similar templates, so will probably do this on need basis.
Test changes LGTM, too. |
if (HWIntrinsicInfo::ReturnsPerElementMask(node->GetHWIntrinsicId())) | ||
{ | ||
nodeType = TYP_MASK; | ||
} |
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.
Shouldn't this just be node->TypeGet()
100% of the time?
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.
yes, will change it in follow-up PRs.
@@ -2059,7 +2036,7 @@ int LinearScan::BuildHWIntrinsic(GenTreeHWIntrinsic* intrinsicTree, int* pDstCou | |||
{ | |||
SingleTypeRegSet candidates = lowVectorOperandNum == 2 ? lowVectorCandidates : RBM_NONE; | |||
|
|||
if (intrin.op2->gtType == TYP_MASK) | |||
if (intrin.op2->OperIsHWIntrinsic(NI_Sve_ConvertVectorToMask)) |
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.
Why does this change the register set to MASK but regular TYP_MASK nodes do not?
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.
Its the same reason I mentioned in #102611 (comment)
Some changes are from @mikabl-arm contributions in #102611.
All stress tests are passing.