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

Port NEON FP min/max intrinsics to pragma framework

AArch64 NEON floating-point min/max intrinsics are now handled by the pragma-based framework.

This commit ports the NEON floating-point min/max intrinsics (e.g., vmin, vmax) to the pragma-based framework for the aarch64 architecture. Similar to reduction intrinsics, the AArch64 fmin/fmax instructions have different semantics than GCC’s MIN_EXPR/MAX_EXPR, leading to their expansion via UNSPEC_FMIN and UNSPEC_FMAX. This change consolidates their handling, removes redundant definitions, and cleans up unused builtin functions.

In Details

This patch integrates NEON floating-point min/max intrinsics (vmin, vmax) for aarch64 into the pragma-based framework. The core issue is that AArch64 fmin/fmax instructions differ from GCC's internal MIN_EXPR/MAX_EXPR semantics, requiring expansion to UNSPEC_FMIN/UNSPEC_FMAX. The commit removes obsolete aarch64_general_gimple_fold_builtin cases and cleans up associated intrinsic definitions from arm_neon.h, as well as unused builtin functions.

For Context
NEON
ARM's advanced SIMD extension, providing a set of instructions for single instruction, multiple data (SIMD) processing.
intrinsic
A function that the compiler recognizes and translates directly into a specific machine instruction or a short sequence of instructions, often used to expose low-level hardware features.
pragma-based framework
A system within GCC that uses pragmas to define and manage intrinsic functions, allowing for a more structured and extensible way to handle them compared to hardcoding.
aarch64
The 64-bit ARM architecture.
UNSPEC
An internal GCC representation for operations that do not have a direct mapping to a standard GIMPLE operation, often used for target-specific instructions or complex expansions.
Filed Under: aarch64NEONintrinsicsfloating-point