-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Optimize Vector128/256.Equals via TestZ #55875
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
Changes from 4 commits
4558287
c129424
16cc234
b846016
65fbda2
cd32850
661a31c
b892666
33e304a
6bc3a50
eff49e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20219,8 +20219,33 @@ GenTree* Compiler::impInlineFetchArg(unsigned lclNum, InlArgInfo* inlArgInfo, In | |
| // TODO-1stClassStructs: We currently do not reuse an existing lclVar | ||
| // if it is a struct, because it requires some additional handling. | ||
|
|
||
| if (!varTypeIsStruct(lclTyp) && !argInfo.argHasSideEff && !argInfo.argHasGlobRef && | ||
| !argInfo.argHasCallerLocalRef) | ||
| bool substitute = false; | ||
| switch (argNode->OperGet()) | ||
| { | ||
| #ifdef FEATURE_HW_INTRINSICS | ||
| case GT_HWINTRINSIC: | ||
| { | ||
| // Enable for all parameterless (=invariant) hw intrinsics such as | ||
| // Vector128<>.Empty and Vector256<>.AllBitSets. We might consider | ||
| // doing that for Vector.Create(cns) as well. | ||
| if ((argNode->gtGetOp1() == nullptr) && (argNode->gtGetOp2() == nullptr)) | ||
| { | ||
| substitute = true; | ||
| } | ||
| break; | ||
| } | ||
| #endif | ||
|
|
||
| // TODO: Enable substitution for CORINFO_HELP_TYPEHANDLE_TO_RUNTIMETYPE (typeof(T)) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have an existing issue for this
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's why I want to merge it - to start experimenting with it 🙂 the issue is #40381
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. I just wanted to make sure we had some github issue corresponding to the TODO, so its not just a comment we'll forget about |
||
| // but in order to benefit from that, we need to move various "typeof + IsValueType" | ||
| // optimizations from importer to morph. | ||
|
|
||
| default: | ||
| break; | ||
| } | ||
|
|
||
| if (substitute || (!varTypeIsStruct(lclTyp) && !argInfo.argHasSideEff && !argInfo.argHasGlobRef && | ||
| !argInfo.argHasCallerLocalRef)) | ||
| { | ||
| /* Get a *LARGE* LCL_VAR node */ | ||
| op1 = gtNewLclLNode(tmpNum, genActualType(lclTyp) DEBUGARG(lclNum)); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.