Skip to content

Arm64-SVE: Fixes for returning Vector<T> through the return buffer - #131746

Open
snickolls-arm wants to merge 3 commits into
dotnet:mainfrom
snickolls-arm:return-buffer-fixes
Open

Arm64-SVE: Fixes for returning Vector<T> through the return buffer#131746
snickolls-arm wants to merge 3 commits into
dotnet:mainfrom
snickolls-arm:return-buffer-fixes

Conversation

@snickolls-arm

Copy link
Copy Markdown
Contributor

Invalidates debug information for return buffer when it holds TYP_SIMD. Computing an accurate stack offset is not possible in AOT, so we avoid introducing this support. Better information can be provided when the return value is passed in a vector register.

Prevent the hidden return buffer optimization when the local has TYP_SIMD. This optimization will no longer apply when the full vector calling convention is supported, so we avoid building support now.

Invalidates debug information for return buffer when it holds TYP_SIMD. Computing
an accurate stack offset is not possible in AOT, so we avoid introducing this support.
Better information can be provided when the return value is passed in a vector register.

Prevent the hidden return buffer optimization when the local has TYP_SIMD. This
optimization will no longer apply when the full vector calling convention is supported,
so we avoid building support now.
@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 Aug 3, 2026
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Aug 3, 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.

@jkotas jkotas added the arm-sve Work related to arm64 SVE/SVE2 support label Aug 3, 2026
@snickolls-arm

Copy link
Copy Markdown
Contributor Author

@dotnet/arm64-contrib Please could I have a review for this patch?

@jakobbotsch

Copy link
Copy Markdown
Member

Prevent the hidden return buffer optimization when the local has TYP_SIMD. This optimization will no longer apply when the full vector calling convention is supported, so we avoid building support now.

What support is that? It is not clear to me if this isn't just hiding some bug that should be addresses regardless.

@jakobbotsch

Copy link
Copy Markdown
Member

Is it just about the defSize part right below? If so then this seems ok.

@snickolls-arm

snickolls-arm commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Is it just about the defSize part right below? If so then this seems ok.

Yes, the assertion in GetSize() will fire without this change. I didn't want to update that to handle the possibility of inexact sizes, because we'd prefer to return through register z0 rather than the return buffer in future.

Comment thread src/coreclr/jit/codegencommon.cpp
Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
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 arm-sve Work related to arm64 SVE/SVE2 support community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants