Skip to content

Arm64 SVE2: CreateWhileGreaterThan* and CreateWhileReadAfterWrite*#127538

Merged
dhartglassMSFT merged 14 commits into
dotnet:mainfrom
dhartglassMSFT:sve2_whiteGT_and_WhileRAW
May 11, 2026
Merged

Arm64 SVE2: CreateWhileGreaterThan* and CreateWhileReadAfterWrite*#127538
dhartglassMSFT merged 14 commits into
dotnet:mainfrom
dhartglassMSFT:sve2_whiteGT_and_WhileRAW

Conversation

@dhartglassMSFT
Copy link
Copy Markdown
Contributor

@dhartglassMSFT dhartglassMSFT commented Apr 28, 2026

  • Add Intrinsics for CreateWhileGreaterThan*. The implementation is the same as the CreateWhileLess* intrinsics, except its SVE2, and the Mask bits are set starting from the end of the vector, rather than the beginning like for the Less*.

  • Add Intrinsics for CreateWhileReadAfterWrite*. Behavior of these depends on the pointer value (not contents) they're given, so we needed a new test template for them. The new tests check for when ptr==ptr2 that mask has all elements set, and when ptr1, ptr2 are off by one that only the first is set.

Tested via jitstress in the lab, linux-arm64 passes.

Contributes to #94021
CreateWhileGreater* APIs match the proposed change in #108233

@dotnet-policy-service
Copy link
Copy Markdown
Contributor

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

@dhartglassMSFT
Copy link
Copy Markdown
Contributor Author

/azp run runtime-coreclr jitstress

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
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

Adds test-generation coverage for new Arm64 SVE2 “CreateWhileGreaterThan*”, “CreateWhileGreaterThanOrEqual*”, and “CreateWhileReadAfterWriteMask*” intrinsics by wiring new templates, helpers, and generated test definitions.

Changes:

  • Introduces a new RW (read-after-write) mask test template covering same-address, reflection, and offset-by-one scenarios.
  • Adds scalar helper predicates for > and >= to validate generated “while greater-than” masks.
  • Registers the new template and expands the SVE2 generated test matrix with the new intrinsic variants.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

File Description
src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveCreateWhileRWMaskTest.template New template to validate CreateWhileReadAfterWriteMask* scenarios (same address, reflection, offset).
src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs Adds WhileGreaterThanMask / WhileGreaterThanOrEqualMask helper overloads used by generated tests.
src/tests/Common/GenerateHWIntrinsicTests/Arm/Templates.cs Registers SveCreateWhileRWMaskTest.template with the generator.
src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs Adds generated test entries for SVE2 CreateWhileGreaterThan*/CreateWhileGreaterThanOrEqual* and CreateWhileReadAfterWriteMask*.

Comment thread src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs
Copy link
Copy Markdown
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 10 out of 10 changed files in this pull request and generated 1 comment.

Comment thread src/tests/JIT/HardwareIntrinsics/Arm/Shared/SveCreateWhileRWMaskTest.template Outdated
@dhartglassMSFT
Copy link
Copy Markdown
Contributor Author

/azp run runtime-coreclr jitstress

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@dhartglassMSFT
Copy link
Copy Markdown
Contributor Author

dhartglassMSFT commented Apr 30, 2026

@tannergooding SVE2 intrinsics - jit+libraries changes are mostly boilerplate

Copy link
Copy Markdown
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.

LGTM. But, we should add randomness in the future.

Copilot AI review requested due to automatic review settings May 11, 2026 06:39
Copy link
Copy Markdown
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 10 out of 10 changed files in this pull request and generated 2 comments.

Comment thread src/tests/Common/GenerateHWIntrinsicTests/Arm/Templates.cs
@dhartglassMSFT dhartglassMSFT enabled auto-merge (squash) May 11, 2026 22:10
@dhartglassMSFT
Copy link
Copy Markdown
Contributor Author

other legs including superpmi-diffs are timeouts.

Arm64 hw intrin pipeline is hitting the 401s (PAT issue)

@dhartglassMSFT
Copy link
Copy Markdown
Contributor Author

/ba-g known pipeline issues

@dhartglassMSFT dhartglassMSFT merged commit 553a1fe into dotnet:main May 11, 2026
164 of 188 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants