Skip to content

SVE: Match, NoMatch#125163

Merged
tannergooding merged 4 commits intodotnet:mainfrom
dhartglassMSFT:arm_match
Mar 9, 2026
Merged

SVE: Match, NoMatch#125163
tannergooding merged 4 commits intodotnet:mainfrom
dhartglassMSFT:arm_match

Conversation

@dhartglassMSFT
Copy link
Contributor

@dhartglassMSFT dhartglassMSFT commented Mar 4, 2026

Partially contributes to #94021

  /// T: sbyte, short, byte, ushort
  public static unsafe Vector<T> Match(Vector<T> mask, Vector<T> left, Vector<T> right); // MATCH

  /// T: sbyte, short, byte, ushort
  public static unsafe Vector<T> NoMatch(Vector<T> mask, Vector<T> left, Vector<T> right); // NMATCH

@dotnet-policy-service
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.

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

Adds initial support for the Arm64 SVE2 Match / NoMatch intrinsics (and corresponding tests) to the runtime/JIT and the HWIntrinsic test generator.

Changes:

  • Introduces new SVE2 intrinsics Match and NoMatch for byte/sbyte/short/ushort.
  • Extends SVE2 test generation to cover the new intrinsics.
  • Adds managed test helper implementations for expected results.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs Adds Match/NoMatch helper logic for expected-value computation (but this file is generated).
src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs Adds generator entries to produce tests for Match/NoMatch.
src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs Adds the public ref declarations for Match/NoMatch.
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve2.cs Adds the SVE2 API surface for Match/NoMatch.
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve2.PlatformNotSupported.cs Adds PNSE stubs for Match/NoMatch when SVE2 isn’t supported.
src/coreclr/jit/hwintrinsiclistarm64sve.h Registers the new SVE2 intrinsics with the JIT intrinsic table.

Copy link
Member

@jakobbotsch jakobbotsch left a comment

Choose a reason for hiding this comment

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

LGTM, would wait for @a74nh's review and possibly @tannergooding's as well

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.

Other than the nit, LGTM

@tannergooding tannergooding merged commit 376038b into dotnet:main Mar 9, 2026
176 of 180 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.

5 participants