Port NEON widening multiply/multiply-accumulate intrinsics
Switches AArch64 NEON widening multiply and multiply-accumulate intrinsics to the pragma-based framework.
This commit ports several AArch64 NEON widening multiply (vmull) and multiply-accumulate (vmlal, vmlsl) intrinsics to GCC’s pragma-based framework. The changes include handling of constant operands, upper halves of vectors, and ensures correct accumulation behavior for signed overflow according to ACLE standards. Some 32-bit forms and PMULL-based intrinsics remain handled by existing mechanisms.
In Details
This patch migrates AArch64 NEON vmull, vmlal, and vmlsl intrinsics to the pragma-based expansion framework. Folding logic is deferred until SSA form to manage constant operands correctly. Special handling is introduced for cases where both multiplicands are upper halves, one is a constant, or exactly one is an upper half, to correctly map to PMULL or widening instructions. Accumulation for vmlal/vmlsl uses unsigned types to match ACLE behavior for signed overflow.
- NEON
- ARM's Advanced SIMD extension, providing vector processing capabilities for multimedia and signal processing tasks.
- Intrinsics
- Functions that provide a way to use specific hardware instructions from within a high-level programming language like C or C++.
- Pragma-based framework
- A mechanism in GCC where specific code generation patterns and behaviors for intrinsics are defined using pragmas, allowing for a more structured and maintainable way to handle them.
- SSA form
- Static Single Assignment form. An intermediate representation in compilers where every variable is assigned a value exactly once, simplifying many optimization passes.
- ACLE
- ARM C Language Extensions. A set of C language extensions and intrinsic functions for ARM processors, including NEON and SVE.