-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Consistently use fgMakeMultiUse in the gtNewSimd*Node APIs #80242
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
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak Issue DetailsThis resolves a known issue with several of the helper APIs in that they were using
|
903e3df to
2666d89
Compare
|
CC. @dotnet/jit-contrib, @jakobbotsch should be ready for review Couple tiny regressions in tests, but that's somewhat expected since we're introducing a COMMA and doing the "right" thing now. |
|
/azp run runtime-coreclr jitstress-isas-x86, runtime-coreclr jitstress-isas-arm, runtime-coreclr outerloop |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run runtime-coreclr jitstress-isas-x86, runtime-coreclr jitstress-isas-arm, runtime-coreclr outerloop |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run runtime-coreclr jitstress-isas-x86, runtime-coreclr jitstress-isas-arm, runtime-coreclr outerloop |
|
Azure Pipelines successfully started running 3 pipeline(s). |
kunalspathak
left a comment
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 some questions.
| // op2 = Sse2.Multiply(op2.AsUInt32(), op1.AsUInt32()).AsInt32() | ||
| op2 = gtNewSimdHWIntrinsicNode(type, op2, op1, NI_SSE2_Multiply, CORINFO_TYPE_ULONG, simdSize, | ||
| isSimdAsHWIntrinsic); | ||
| // op2Dup = Sse2.Multiply(op1Dup.AsUInt32(), op2Dup.AsUInt32()).AsInt32() |
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.
Did you swap the op2 and op1 here? Earlier it was gtNewSimdHWIntrinsicNode(type, op2, op1,...) and now it is gtNewSimdHWIntrinsicNode(type, op1Dup, op2Dup,...).
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, but it's multiply and so is commutative.
In general we need to try and preserve evaluation order of the inputs. This is particularly important when using fgMakeMultiUse since it can introduce a GT_COMMA rather than just inserting a new GT_ASG node like impCloneExpr does.
| CORINFO_TYPE_INT, simdSize, isSimdAsHWIntrinsic); | ||
|
|
||
| op2 = gtNewSimdBinOpNode(GT_AND, type, v, u, simdBaseJitType, simdSize, isSimdAsHWIntrinsic); | ||
| op2 = gtNewSimdBinOpNode(GT_AND, type, u, v, simdBaseJitType, simdSize, isSimdAsHWIntrinsic); |
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 about this change? I assume it is just for the variable name alphabetical ordering?
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.
Same as above. This is GT_AND and so is commutative. We need to order the parameters correctly to preserve evaluation order.
kunalspathak
left a comment
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
|
Test failures are known, being disabled in #80522 |
This resolves a known issue with several of the helper APIs in that they were using
impCloneExpreven though they were not exclusive to import.