Skip to content

Less optimistic checks for const vector to pattern checks#124599

Open
a74nh wants to merge 6 commits intodotnet:mainfrom
a74nh:minus3_github
Open

Less optimistic checks for const vector to pattern checks#124599
a74nh wants to merge 6 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.

Copy link
Member

Choose a reason for hiding this comment

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

It should be added to the existing merged test csproj. I think you can follow what happened in this PR:
#123603

Copy link
Member

Choose a reason for hiding this comment

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

(FWIW, we changed how regression tests are built in #121078)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

(FWIW, we changed how regression tests are built in #121078)

Is it still possible to run a just a single test using the new grouped method?

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

2 participants

Comments