Skip to content

JIT: mark pseudo return buffer temp as multi-reg return - #135594

Merged
EgorBo merged 1 commit into
dotnet:mainfrom
EgorBo:arm64/fix-134052
Oct 13, 2026
Merged

EgorBo merged 1 commit into
dotnet:mainfrom
EgorBo:arm64/fix-134052

Conversation

@EgorBo

@EgorBo EgorBo commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

When a call returning via a return buffer is returned from a method whose own return type is a multi-reg struct (e.g. an HFA on arm64), the temp created by impFixupStructReturnType was not marked lvIsMultiRegRet, asserting in Lowering. Let it fall through to the multi-reg handling.

Fixes #134052

No diffs

When a call returning via a return buffer is returned from a method whose
own return type is a multi-reg struct (e.g. an HFA on arm64), the temp
created by impFixupStructReturnType was not marked lvIsMultiRegRet,
asserting in Lowering. Let it fall through to the multi-reg handling.

Fixes dotnet#134052

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@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 Oct 11, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 5 pipeline(s).
11 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@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.

🟢 Approval recommended

The focused fix reuses established multi-register handling and includes targeted regression coverage.

0 open findings

What changed in this PR

Fixes JIT handling of pseudo return-buffer temporaries used as multi-register struct returns.

Changes:

  • Allows pseudo return-buffer temps to receive multi-register return metadata.
  • Adds regression coverage validating all HFA fields.
File Description
src/​coreclr/​jit/​importer.cpp Continues through existing multi-register handling.
src/​tests/​JIT/​Regression_ro_2/​Runtime_134052.cs Covers return-buffer-to-HFA bit casting.

🧠 Review effort: Balanced

@EgorBo

EgorBo commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

PTAL @dotnet/jit-contrib, simple bug-fix, no diffs

@EgorBo
EgorBo requested a review from a team October 12, 2026 12:06

@adamperlin adamperlin 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.

This looks reasonable to me!

@EgorBo
EgorBo merged commit 735755c into dotnet:main Oct 13, 2026
136 of 138 checks passed
@EgorBo
EgorBo deleted the arm64/fix-134052 branch October 13, 2026 14:15
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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.

JIT: (bug) [ARM64] Assertion failed 'varDsc->lvIsMultiRegRet' when a return-buffer call result is returned as an HFA

3 participants