-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Sve2: Add ShiftRightLogicalNarrowingSaturate(Even|Odd) #123888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 pull request adds ShiftRightLogicalNarrowingSaturateEven and ShiftRightLogicalNarrowingSaturateOdd intrinsics to the Arm SVE2 instruction set. These saturating shift right operations narrow the data type while preventing overflow.
Changes:
- Added six new API signatures across different unsigned integer type combinations (byte/ushort, ushort/uint, uint/ulong)
- Integrated corresponding test generation entries for both Even and Odd variants
- Registered the intrinsics in the JIT compiler's hardware intrinsic list
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs | Added test generation entries for the six new intrinsic variants |
| src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs | Added public API surface declarations for the new intrinsics |
| src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve2.cs | Implemented the intrinsic methods with proper documentation |
| src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve2.PlatformNotSupported.cs | Added PlatformNotSupportedException stubs for unsupported platforms |
| src/coreclr/jit/hwintrinsiclistarm64sve.h | Registered the new intrinsics in the JIT's hardware intrinsic mapping table |
Comments suppressed due to low confidence (2)
src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs:1
- The helper method names use "ShiftRightArithmetic" but should be "ShiftRightLogical" to match the intrinsic being tested (ShiftRightLogicalNarrowingSaturateEven).
// Licensed to the .NET Foundation under one or more agreements.
src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs:1
- The helper method names use "ShiftRightArithmetic" but should be "ShiftRightLogical" to match the intrinsic being tested (ShiftRightLogicalNarrowingSaturateOdd).
// Licensed to the .NET Foundation under one or more agreements.
|
Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics |
|
@dotnet/arm64-contrib |
There was a problem hiding this 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 5 out of 5 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (6)
src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs:1
- The helper methods referenced in ValidateIterResult and GetIterResult use "ShiftRightArithmeticNarrowingSaturateEven" but should be "ShiftRightLogicalNarrowingSaturateEven" to match the method being tested (ShiftRightLogicalNarrowingSaturateEven).
// Licensed to the .NET Foundation under one or more agreements.
src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs:1
- The helper methods referenced in ValidateIterResult and GetIterResult use "ShiftRightArithmeticNarrowingSaturateEven" but should be "ShiftRightLogicalNarrowingSaturateEven" to match the method being tested (ShiftRightLogicalNarrowingSaturateEven).
// Licensed to the .NET Foundation under one or more agreements.
src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs:1
- The helper methods referenced in ValidateIterResult and GetIterResult use "ShiftRightArithmeticNarrowingSaturateEven" but should be "ShiftRightLogicalNarrowingSaturateEven" to match the method being tested (ShiftRightLogicalNarrowingSaturateEven).
// Licensed to the .NET Foundation under one or more agreements.
src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs:1
- The helper methods referenced in ValidateIterResult and GetIterResult use "ShiftRightArithmeticNarrowingSaturateOdd" but should be "ShiftRightLogicalNarrowingSaturateOdd" to match the method being tested (ShiftRightLogicalNarrowingSaturateOdd).
// Licensed to the .NET Foundation under one or more agreements.
src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs:1
- The helper methods referenced in ValidateIterResult and GetIterResult use "ShiftRightArithmeticNarrowingSaturateOdd" but should be "ShiftRightLogicalNarrowingSaturateOdd" to match the method being tested (ShiftRightLogicalNarrowingSaturateOdd).
// Licensed to the .NET Foundation under one or more agreements.
src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs:1
- The helper methods referenced in ValidateIterResult and GetIterResult use "ShiftRightArithmeticNarrowingSaturateOdd" but should be "ShiftRightLogicalNarrowingSaturateOdd" to match the method being tested (ShiftRightLogicalNarrowingSaturateOdd).
// Licensed to the .NET Foundation under one or more agreements.
Fixes #122022