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

JIT: Disallow parameters passed in float regs from being enregistered in int regs #99286

Merged
merged 4 commits into from
Mar 8, 2024

Conversation

jakobbotsch
Copy link
Member

@jakobbotsch jakobbotsch commented Mar 5, 2024

Just verifying that we never see float reg -> int reg homing on all our
targets...
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Mar 5, 2024
@ghost ghost assigned jakobbotsch Mar 5, 2024
@ghost
Copy link

ghost commented Mar 5, 2024

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

Just verifying that we never see float reg -> int reg homing on all our targets...

Author: jakobbotsch
Assignees: jakobbotsch
Labels:

area-CodeGen-coreclr

Milestone: -

@jakobbotsch jakobbotsch reopened this Mar 7, 2024
@jakobbotsch
Copy link
Member Author

/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress, runtime-coreclr jitstressregs, runtime-coreclr libraries-jitstressregs

@jakobbotsch
Copy link
Member Author

/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress, runtime-coreclr jitstressregs, runtime-coreclr libraries-jitstressregs

Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@jakobbotsch jakobbotsch marked this pull request as ready for review March 7, 2024 20:12
@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @BruceForstall

Diffs.

This change is a follow-up to #96439. The logic in that PR is only correct under the assumption that parameters passed in float regs are never homed in integer regs. However, we can enregister structs of fitting size in integer registers if they have only whole uses, so that could still happen for a struct passed in float registers. This is a very rare case because such enregistration only kicks in when the struct parameter also was not promoted.

The right long term fix here is to generalize genFnPrologCalleeRegArgs to handle float and integer register parameters simultaneously. However, genFnPrologCalleeRegArgs is a pretty gnarly function, and I think backporting such a change to it is too risky, so this PR along with #96439 have the changes I am backporting in #98749.

@jakobbotsch jakobbotsch changed the title JIT: Validate some reg homing logic JIT: Disallow parameters passed in float regs from being enregistered in int regs Mar 7, 2024
@jakobbotsch jakobbotsch merged commit 4aa4ca5 into dotnet:main Mar 8, 2024
213 of 219 checks passed
@jakobbotsch jakobbotsch deleted the validate-reg-homing branch March 8, 2024 08:21
@github-actions github-actions bot locked and limited conversation to collaborators Apr 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants