Skip to content
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

CI test: don't narrow cast(ind(x)) #105148

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/coreclr/jit/optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3518,6 +3518,13 @@ bool Compiler::optNarrowTree(GenTree* tree, var_types srct, var_types dstt, Valu

case GT_IND:

if (opts.OptimizationEnabled())
{
// Don't narrow casts of indirections when optimizations are enabled
// to enable more CSEs.
return false;
Comment on lines +3523 to +3525
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depending on the diffs it might be good to also check what they look like if we did this opt in lowering instead

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I know, I want to check first whether diffs are equal on x64 and arm64 since CAST handling is different in lower for arm64 and x64

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diffs: https://dev.azure.com/dnceng-public/public/_build/results?buildId=747840&view=ms.vss-build-web.run-extensions-tab not too bad as I expected. Arm64 are quite small, mostly because all loads are 4 bytes while size of the load is different on x64. I wasn't planning to finish it as I have other things to do, but if someone wants to take over - please feel free

}

NARROW_IND:

if ((dstSize > genTypeSize(tree->gtType)) &&
Expand Down
Loading