Skip to content

Conversation

SwapnilGaikwad
Copy link
Contributor

Equivalent to #119712 for gathers where offsets are incorrectly treated as indices which is leading to incorrect code being emitted.

Discussed here.

@dotnet/arm64-contrib @a74nh @tannergooding @EgorBo

@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 Sep 18, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Sep 18, 2025
Copy link
Contributor

@a74nh a74nh left a comment

Choose a reason for hiding this comment

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

The isLoadingBytes is a little ugly. Alternative would be to split the switch cases. But, then it'd duplicate the code underneath isLoadingBytes. So, I'm happy

This is similar enough to #119712 that I feel we need both in .NET11 if possible.

So, LGTM.

Copy link
Member

@EgorBo EgorBo left a comment

Choose a reason for hiding this comment

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

@tannergooding could you please take a quick look if your feedback was addressed

@SwapnilGaikwad
Copy link
Contributor Author

The isLoadingBytes is a little ugly. Alternative would be to split the switch cases. But, then it'd duplicate the code underneath isLoadingBytes.

Updated compares to use intrinsics only instead of the instructions and intrinsics for better clarity.

@EgorBo
Copy link
Member

EgorBo commented Sep 22, 2025

@SwapnilGaikwad could you please file a manual backport to release/10.0 branch with changes from #119712 and this PR combined?

@SwapnilGaikwad
Copy link
Contributor Author

@SwapnilGaikwad could you please file a manual backport to release/10.0 branch with changes from #119712 and this PR combined?

Hey @EgorBo , not sure how to do that. Would that be a different PR with changes combined?

@EgorBo
Copy link
Member

EgorBo commented Sep 22, 2025

@SwapnilGaikwad could you please file a manual backport to release/10.0 branch with changes from #119712 and this PR combined?

Hey @EgorBo , not sure how to do that. Would that be a different PR with changes combined?

Yes. Our backport bot doesn't know how to combine changes from two PRs and since the approval process for backports is not simple for RC2/GA, it's better to file just one PR with both

@EgorBo
Copy link
Member

EgorBo commented Sep 22, 2025

I think you can just cherry-pick two commits or just extract them as patches and apply to your release/5.0 branch

e.g.

https://github.com/dotnet/runtime/pull/119712.patch
https://github.com/dotnet/runtime/pull/119853.patch

@SwapnilGaikwad
Copy link
Contributor Author

I think you can just cherry-pick two commits or just extract them as patches and apply to your release/5.0 branch

e.g.

https://github.com/dotnet/runtime/pull/119712.patch https://github.com/dotnet/runtime/pull/119853.patch

Combined these changes with scatters in #119959.

@EgorBo EgorBo merged commit 6197471 into dotnet:main Sep 22, 2025
115 of 118 checks passed
@SwapnilGaikwad SwapnilGaikwad deleted the github-fix-gatherWithOffsets branch September 24, 2025 10:25
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 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.

4 participants