Ping for https://gcc.gnu.org/pipermail/gcc-patches/2024-November/668794.html
On 14/11/2024 15:53, Akram Ahmad wrote:
Hi all, This patch series introduces standard names for scalar, Adv. SIMD, and SVE saturating arithmetic instructions in the aarch64 backend. Additional tests are added for scalar saturating arithmetic, as well as to test that the auto-vectorizer correctly inserts NEON instructions or scalar instructions where necessary, such as in 32 and 64-bit scalar unsigned arithmetic. There are also tests for the auto-vectorized SVE code. The biggest change from V1-V2 of this series is the optimisation for signed scalar arithmetic (32 and 64-bit) to avoid the use of FMOV in the case of a constant and non-constant operand (immediate or GP reg values respectively). This is only exhibited if early-ra is disabled due to an early-ra bug which is assigning FP registers for operands even if this would unnecessarily result in FMOV being used. This new optimisation is tested by means of check-function-bodies as well as an execution test. As with v1 of this patch, the only new regression failures on aarch64 are to do with unsigned scalar intrinsics (32 and 64-bit) not using the NEON instructions any more. Otherwise, there are no regressions. SVE currently uses the unpredicated version of the instruction in the backend. v1 -> v2: - Add new split for signed saturating arithmetic - New test for signed saturating arithmetic - Make addition tests accept commutative operands, other test fixes Only the first patch in this series is updated in v2. The other patch is already approved. If this is ok, could this be committed for me please? I do not have commit rights. Many thanks, Akram --- Akram Ahmad (2): aarch64: Use standard names for saturating arithmetic aarch64: Use standard names for SVE saturating arithmetic gcc/config/aarch64/aarch64-builtins.cc | 13 + gcc/config/aarch64/aarch64-simd-builtins.def | 8 +- gcc/config/aarch64/aarch64-simd.md | 209 ++++++++++++++- gcc/config/aarch64/aarch64-sve.md | 4 +- gcc/config/aarch64/arm_neon.h | 96 +++---- gcc/config/aarch64/iterators.md | 4 + .../saturating_arithmetic_autovect.inc | 58 +++++ .../saturating_arithmetic_autovect_1.c | 79 ++++++ .../saturating_arithmetic_autovect_2.c | 79 ++++++ .../saturating_arithmetic_autovect_3.c | 75 ++++++ .../saturating_arithmetic_autovect_4.c | 77 ++++++ .../aarch64/saturating-arithmetic-signed.c | 244 ++++++++++++++++++ .../aarch64/saturating_arithmetic.inc | 39 +++ .../aarch64/saturating_arithmetic_1.c | 36 +++ .../aarch64/saturating_arithmetic_2.c | 36 +++ .../aarch64/saturating_arithmetic_3.c | 30 +++ .../aarch64/saturating_arithmetic_4.c | 30 +++ .../aarch64/sve/saturating_arithmetic.inc | 68 +++++ .../aarch64/sve/saturating_arithmetic_1.c | 60 +++++ .../aarch64/sve/saturating_arithmetic_2.c | 60 +++++ .../aarch64/sve/saturating_arithmetic_3.c | 62 +++++ .../aarch64/sve/saturating_arithmetic_4.c | 62 +++++ 22 files changed, 1371 insertions(+), 58 deletions(-) create mode 100644 gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/saturating_arithmetic_autovect.inc create mode 100644 gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/saturating_arithmetic_autovect_1.c create mode 100644 gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/saturating_arithmetic_autovect_2.c create mode 100644 gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/saturating_arithmetic_autovect_3.c create mode 100644 gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/saturating_arithmetic_autovect_4.c create mode 100644 gcc/testsuite/gcc.target/aarch64/saturating-arithmetic-signed.c create mode 100644 gcc/testsuite/gcc.target/aarch64/saturating_arithmetic.inc create mode 100644 gcc/testsuite/gcc.target/aarch64/saturating_arithmetic_1.c create mode 100644 gcc/testsuite/gcc.target/aarch64/saturating_arithmetic_2.c create mode 100644 gcc/testsuite/gcc.target/aarch64/saturating_arithmetic_3.c create mode 100644 gcc/testsuite/gcc.target/aarch64/saturating_arithmetic_4.c create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/saturating_arithmetic.inc create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/saturating_arithmetic_1.c create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/saturating_arithmetic_2.c create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/saturating_arithmetic_3.c create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/saturating_arithmetic_4.c