aarch64: Add SME2p3/SVE2p3 x2 narrowing right shift intrinsics
Introduces new AArch64 intrinsics for signed and unsigned narrowing right shifts with SME2p3/SVE2p3 extensions.
This patch adds support for several new AArch64 SME2p3/SVE2p3 x2 narrowing right shift intrinsics. These include signed and unsigned variants for right shifts on 8-bit, 16-bit, and 32-bit data types, specifically svqrshrn_s8_s16, svqrshrn_u8_u16, svqshrn_s8_s16, svqshrn_s16_s32, svqshrn_u8_u16, svqshrn_u16_u32, and their unsigned variants. The addition of these intrinsics expands the compiler’s capabilities for efficient low-level manipulation of vector data on compatible AArch64 hardware.
In Details
New intrinsics for SVE2p3/SME2p3 x2 narrowing right shifts have been added to the AArch64 backend. These include svqrshrn (signed rounding, unsigned saturating), svqshrn (signed saturating), and their corresponding unsigned saturation variants. The changes involve updates to AArch64 ACLE built-in headers, definition files, and machine description files, including new iterator definitions (SVE_FULL_HIx2) and unspec elements (UNSPEC_SQSHRN, etc.). This expands the range of SIMD operations accessible through compiler intrinsics for advanced AArch64 features.
- AArch64
- The 64-bit ARM architecture. GCC supports generating code for this architecture.
- SVE2p3
- Scalable Vector Extension 2, Part 3. An advanced feature of the Arm architecture that provides enhanced vector processing capabilities, including advanced rounding and saturation operations.
- SME2p3
- Scalable Matrix Extension 2, Part 3. A further extension to the Arm architecture, building on SVE, designed for high-performance matrix operations.
- Intrinsics
- Functions or subroutines that are built directly into the compiler or language, often mapping closely to specific hardware instructions. They provide a way to access low-level functionality or optimize critical code paths.
- Narrowing right shift
- A shift operation that reduces the bit width of the data type. A right shift moves bits to the right, and narrowing implies the result fits into a smaller data type than the source.
- Saturation
- In arithmetic operations, saturation means that if the result of an operation exceeds the maximum representable value for the destination data type, it is clamped to that maximum value. Similarly, if it falls below the minimum, it's clamped to the minimum.