GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc/aarch64

AArch64: Implement changes for COMPACT and EXPAND SVE instructions

The Arm Scalable Vector Extension (SVE) now supports COMPACT and EXPAND instructions in streaming mode under SME2.2, with new intrinsics defined in the ACLE ma…

The Arm Scalable Vector Extension (SVE) now supports COMPACT and EXPAND instructions in streaming mode under SME2.2. The COMPACT instruction copies active vector elements to lower-numbered elements, while the EXPAND instruction copies lower-numbered vector elements to active elements. New intrinsics for these instructions have been added, as documented in the ACLE manual.

In Details

SVE2.2 and SME2.2 add new variants of COMPACT/EXPAND that operate on different widths, and allow streaming-mode execution. This commit modifies the builtin description files and instruction patterns in aarch64-sve{,2}.md to support these new intrinsics and instruction forms, enabled when SME2.2 is enabled. ASM tests have been added, and an existing test has been updated to reflect that svcompact is no longer nonstreaming-only.

For Context

The Scalable Vector Extension (SVE) is an Arm architecture extension that allows vector instructions to operate on vectors of varying lengths. This allows code to be written once and then run on different hardware with different vector lengths. Streaming SVE (SME) is an extension to SVE that allows vector operations to operate on streams of data. COMPACT and EXPAND are instructions that rearrange elements within a vector based on a predicate. This commit adds support for new variants of these instructions in SVE2.2 and SME2.2.

Filed Under: aarch64svesmeintrinsics