-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Implement struct promotion for incoming multireg structs #13417
Comments
@dotnet/jit-contrib |
This is described in the first-class-structs document here: https://github.com/dotnet/coreclr/blob/master/Documentation/design-docs/first-class-structs.md#improve-struct-promotion |
Add a link to issue #26710 in the relevant section.
In 5.0 we added support for enregistering multireg struct args for x64 Linux, but additional work is needed for non-HFA multireg args on Arm64. |
Fixed with #43870 |
We are currently not promoting incoming multireg structs: https://github.com/dotnet/coreclr/blob/9479f67577bbb02ea611777b00308f42252fb2bc/src/jit/lclvars.cpp#L1914-L1926
Example derived from the discussion in dotnet/corefx#40998:
On Windows x64 the struct is promoted and we eliminate bounds checks:
asm
On Linux x64 we don't promote the struct (since it's an incoming multireg struct) and don't eliminate bounds checks:
asm
category:cq
theme:structs
skill-level:expert
cost:large
The text was updated successfully, but these errors were encountered: