Skip to content

Less optimistic checking for const vector to pattern checks#124599

Merged
jakobbotsch merged 9 commits intodotnet:mainfrom
a74nh:minus3_github
Feb 24, 2026
Merged

Less optimistic checking for const vector to pattern checks#124599
jakobbotsch merged 9 commits intodotnet:mainfrom
a74nh:minus3_github

Conversation

@a74nh
Copy link
Contributor

@a74nh a74nh commented Feb 19, 2026

Fixes #124511

When checking a element of TBase size, ensure that no other bits other than the first bit are set

Fixes dotnet#124511

When checking a element of TBase size, ensure that no other bits
other than the first bit are set
Copilot AI review requested due to automatic review settings February 19, 2026 14:42
@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 Feb 19, 2026
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Feb 19, 2026
@dotnet-policy-service
Copy link
Contributor

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a JIT bug in ARM64 SVE intrinsics where constant vector patterns were incorrectly validated, leading to wrong results. The issue was that EvaluateSimdMaskToPattern only checked the lowest bit of each mask element, allowing invalid masks with extra bits set to pass validation.

Changes:

  • Enhanced mask validation to check all bits in each TBase-sized element, not just the lowest bit
  • Renamed finalOne to firstZero for clarity
  • Updated comments to better explain the mask format and validation logic

Copilot AI review requested due to automatic review settings February 19, 2026 15:30
Copy link
Contributor

Copilot AI left a comment

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 3 out of 3 changed files in this pull request and generated 1 comment.

Copilot AI review requested due to automatic review settings February 20, 2026 09:56
@a74nh a74nh changed the title Less optimistic checks for const vector to pattern checks Less optimistic checking for const vector to pattern checks Feb 20, 2026
Copy link
Contributor

Copilot AI left a comment

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 3 out of 3 changed files in this pull request and generated no new comments.

@jakobbotsch
Copy link
Member

Seems like one of the existing SVE regression tests is failing with this change.

@a74nh
Copy link
Contributor Author

a74nh commented Feb 23, 2026

Seems like one of the existing SVE regression tests is failing with this change.

That's fixed now - just an issue with creating the mask for longs.

@jakobbotsch jakobbotsch merged commit 3b61bfa into dotnet:main Feb 24, 2026
130 of 134 checks passed
@a74nh a74nh deleted the minus3_github branch February 24, 2026 13:03
iremyux pushed a commit to iremyux/dotnet-runtime that referenced this pull request Mar 2, 2026
…net#124599)

When checking a element of TBase size, ensure that no other bits other
than the first bit are set
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.

JIT: Invalid result with SVE intrinsics

3 participants