Skip to content

Fix for 127141 - Remove unneeded spilling around profiler hooks - #128731

Merged
dhartglassMSFT merged 6 commits into
dotnet:mainfrom
dhartglassMSFT:127141
Jun 2, 2026
Merged

dhartglassMSFT merged 6 commits into
dotnet:mainfrom
dhartglassMSFT:127141

Conversation

@dhartglassMSFT

Copy link
Copy Markdown
Contributor

On ARM64, only the lower halves of q8-q15 (128b) are callee save. LSRA spills upper halves of these into d8-d15 (64b subreg)

"UpperVectorSave" ref position tracks these around calls. LSRA currently just does this "upper-half-save-into-d8_d15" for all enregistered uppersave refs around calls.

Problem is PROF_HOOK does NOT kill q0-q7. So we end up with more enregistered refs around a profiler hook than may be handled by d8-d15.

Fix is that q0-q7 do not need their upper halves spilled around PROF_HOOK. I double checked with Noah that this is the case. And the asm stub does call out q0-q7 being preserved.

I was not able to recreate a repro, a profiled tail call taking v512 params seems to not be enough.

fixes #127141

Copilot AI review requested due to automatic review settings May 28, 2026 22:58
@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 28, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@dhartglassMSFT dhartglassMSFT changed the title Fix for 127141 - too much spilling around profiler hooks Fix for 127141 - Remove unneeded spilling around profiler hooks May 29, 2026
@dhartglassMSFT
dhartglassMSFT marked this pull request as ready for review May 29, 2026 18:32
Copilot AI review requested due to automatic review settings May 29, 2026 18:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread src/coreclr/jit/lsra.cpp Resolved
Comment thread src/coreclr/jit/lsra.cpp Resolved
@dhartglassMSFT
dhartglassMSFT merged commit 3472dd5 into dotnet:main Jun 2, 2026
142 of 144 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview6 milestone Jun 3, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 3, 2026
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.

Test Failure: runtime-coreclr jitstress-random, assertion in lsra

3 participants