Port NEON square-root intrinsics to pragma-based framework
Integrates NEON square-root intrinsics into GCC's pragma framework for unified handling and optimization.
This commit ports the NEON square-root intrinsics (vsqrt, vsqrtq) for floating-point types to the pragma-based framework on aarch64. By moving these intrinsics into this unified system, GCC can manage their lowering and optimization more consistently. The direct function definitions in arm_neon.h are removed, and new function bases and definition groups are added in aarch64-neon-builtins-base.cc and .def. A new test case is included to verify the correct functioning of these ported square-root operations.
In Details
This patch continues the migration of NEON intrinsics to the pragma-based framework by handling the square-root functions (vsqrt and vsqrtq). New function bases and definition groups for these intrinsics are created in aarch64-neon-builtins-base.cc and .def, respectively. As part of this process, the direct declarations of vsqrt_f32, vsqrt_f64, vsqrtq_f32, vsqrtq_f64, vsqrt_f16, and vsqrtq_f16 are removed from arm_neon.h. This change aims to streamline the compiler's internal representation and optimization strategies for these common mathematical operations.
- NEON
- ARM's Advanced SIMD extension, a set of single instruction, multiple data (SIMD) instructions used for accelerating multimedia and signal processing tasks on ARM processors.
- intrinsics
- Special functions that allow C/C++ code to directly access specific hardware instructions, such as those in NEON. They provide a higher-level abstraction than inline assembly but offer similar control.
- pragma-based framework
- An internal compiler framework that uses pragmas to define and manage the behavior and lowering of specific language constructs or intrinsic functions. It aims to centralize and simplify the compiler's handling of these features.
- SIMD
- Single Instruction, Multiple Data. A class of parallel computers in Flynn's taxonomy that perform the same operation on multiple data points simultaneously using a single instruction.
- square-root
- A mathematical operation that finds the number which, when multiplied by itself, equals a given number. In floating-point arithmetic, it's a fundamental function.