Skip to content

Conversation

SwapnilGaikwad
Copy link
Contributor

@SwapnilGaikwad SwapnilGaikwad commented Sep 22, 2025

Backport of #119712 and #119853 to release/10.0

/cc @EgorBo @SwapnilGaikwad

Customer Impact

  • Customer reported
  • Found internally

These changes fix the incorrect codegen for some of the SVE Scatter and Gather APIs. These APIs take byte offsets are one of the arguments but the current codegen treats them as indices. It leads to incorrect behaviour and is a bug.
The current patch fixes this bug. The SVE APIs are introduced in .Net9, thus, the fix needs to be backported to .Net10.

Regression

  • Yes
  • No

Testing

Fix is verified by updating the corresponding tests to ensure the desired behaviour is exhibited by the program. Furthermore, it's also verified manually by inspecting generated assembly instructions before and after the fix.

Risk

Low. This is a low risk change as the SVE feature remains experimental in .Net9 and .Net10.

@SwapnilGaikwad
Copy link
Contributor Author

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

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Sep 22, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics
See info in area-owners.md if you want to be subscribed.

@tannergooding tannergooding changed the title Fix codegen for SVE Scatter*With*Offsets* and GatherVector*With*Offsets* [release/10.0] Fix codegen for SVE Scatter*With*Offsets* and GatherVector*With*Offsets* Sep 22, 2025
@tannergooding
Copy link
Member

The backport template needs to be filled out still. I've updated the original post to have that, but someone with all the relevant details would be better to fill it in.

@SwapnilGaikwad
Copy link
Contributor Author

The backport template needs to be filled out still. I've updated the original post to have that, but someone with all the relevant details would be better to fill it in.

I have filled in most of the details. Could you or someone verify if the target branch is correct? Not sure whether this work would fall against servicing category and needs target branch as release-10.0-staging.

@JulieLeeMSFT JulieLeeMSFT added the Servicing-approved Approved for servicing release label Sep 22, 2025
@JulieLeeMSFT JulieLeeMSFT added this to the 10.0.0 milestone Sep 22, 2025
@JulieLeeMSFT JulieLeeMSFT removed the Servicing-approved Approved for servicing release label Sep 22, 2025
@JulieLeeMSFT
Copy link
Member

Needs code review and please check test failures.

@SwapnilGaikwad
Copy link
Contributor Author

Needs code review and please check test failures.

The test failures seems unrelated to the changes. Also, they are on x64 machines and the change is SVE only so should be unrelated to the failures.

@steveisok steveisok added Servicing-consider Issue for next servicing release review Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 23, 2025
@agocke agocke changed the base branch from release/10.0 to release/10.0-rc2 September 24, 2025 16:35
@agocke agocke merged commit f9b7826 into dotnet:release/10.0-rc2 Sep 24, 2025
163 of 171 checks passed
@SwapnilGaikwad SwapnilGaikwad deleted the github-backport-fixSveSattersGathers branch September 29, 2025 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.Runtime.Intrinsics community-contribution Indicates that the PR has been added by a community member Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants