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

AArch64: Turn on GPR narrowing pass by default

The GPR narrowing pass is now enabled by default for all AArch64 targets, optimizing code by using smaller register sizes where possible.

This commit enables the GPR (General Purpose Register) narrowing pass by default for all AArch64 targets. The GPR narrowing pass attempts to use smaller register sizes (e.g., 32-bit registers instead of 64-bit registers) when possible, which can improve code density and performance, especially on memory-constrained systems.

In Details

The GPR narrowing pass is an optimization that attempts to reduce the size of registers used in the generated code. This is achieved by using 32-bit registers instead of 64-bit registers when the full 64-bit range is not required. The commit modifies aarch64-tuning-flags.def to enable AARCH64_EXTRA_TUNE_NARROW_GP_WRITES. Search terms: GCC AArch64 GPR narrowing.

For Context

Modern processors often have registers of different sizes (e.g., 32-bit and 64-bit). Using smaller registers can improve performance and code size, especially when dealing with smaller data types. This commit enables an optimization pass that automatically narrows the size of general-purpose registers (GPRs) on AArch64 architectures where appropriate. Search terms: GCC AArch64 GPR narrowing.

Filed Under: aarch64optimizationregister allocation