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

AArch64: Expose floating-point dot-product instructions for vectorizer

Enables AArch64's floating-point dot product instructions (FDOT) for use by the vectorizer, improving performance for dot-product computations.

This patch enables the AArch64 vectorizer to recognize and utilize floating-point dot product operations. It connects existing AdvSIMD and SVE FDOT instruction patterns to the sdot_prod optab, allowing loops that perform dot products to be compiled more efficiently. For example, a loop calculating sum += a[i] * b[i] can now use single FDOT instructions to multiply and accumulate pairs of half-precision inputs into single-precision elements, avoiding intermediate widening and separate multiply-accumulate steps.

In Details

This commit bridges the gap between the middle-end's support for recognizing floating-point dot product computations and the AArch64 backend's specific instruction patterns for AdvSIMD and SVE. It ensures that the sdot_prod optab correctly maps to the appropriate FDOT instructions (e.g., fdot v0.4s, v1.8h, v2.8h for AdvSIMD, fdot z0.s, z1.h, z2.h for SVE), provided the necessary architecture extensions (+f16f32dot for AdvSIMD, SVE2.1 or SME2 for SVE) are enabled. This facilitates vectorization of common numerical kernels.

Filed Under: aarch64vectorizationoptimizationSIMD