-
Notifications
You must be signed in to change notification settings - Fork 5k
Run fgValueNumberConstLoad for invariant loads #86154
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 Issue DetailsWe have a separate path for jit-diff:
diff example: https://www.diffchecker.com/ZF1cltJi/ Main use-case - field access for
|
Build failure is unrelated (src/tests/JIT/opt/SSA/MemorySsa.csproj test failed to build and is fixed in #86176) @jakobbotsch @SingleAccretion PTAL, this should produce more diffs when I enable more kinds of frozen objects |
@@ -10445,7 +10445,7 @@ bool Compiler::fgValueNumberConstLoad(GenTreeIndir* tree) | |||
int size = (int)genTypeSize(tree->TypeGet()); | |||
const int maxElementSize = sizeof(simd_t); | |||
|
|||
if ((varTypeIsSIMD(tree) || varTypeIsIntegral(tree) || varTypeIsFloating(tree) || tree->TypeIs(TYP_REF)) && | |||
if (!tree->TypeIs(TYP_BYREF, TYP_STRUCT) && |
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.
reversed type checks for TP
We have a separate path for
GTF_IND_INVARIANT
where we could miss some optimization opportunites defined infgValueNumberConstLoad
jit-diff:
diff example: https://www.diffchecker.com/ZF1cltJi/