]> git.ipfire.org Git - thirdparty/gcc.git/commit
AArch64: Add SVE support for simd clones [PR96342]
authorTamar Christina <tamar.christina@arm.com>
Fri, 20 Dec 2024 14:27:25 +0000 (14:27 +0000)
committerTamar Christina <tamar.christina@arm.com>
Fri, 20 Dec 2024 14:28:56 +0000 (14:28 +0000)
commitd7d3dfe7a2a26e370805ddf835bfd00c51d32f1b
tree928865727c76bde47fc1a0d235209577a0bd44e3
parent6ecb365d4c3f36eaf684c38fc5d9008a1409c725
AArch64: Add SVE support for simd clones [PR96342]

This patch finalizes adding support for the generation of SVE simd clones when
no simdlen is provided, following the ABI rules where the widest data type
determines the minimum amount of elements in a length agnostic vector.

gcc/ChangeLog:

PR target/96342
* config/aarch64/aarch64-protos.h (add_sve_type_attribute): Declare.
* config/aarch64/aarch64-sve-builtins.cc (add_sve_type_attribute): Make
visibility global and support use for non_acle types.
* config/aarch64/aarch64.cc
(aarch64_simd_clone_compute_vecsize_and_simdlen): Create VLA simd clone
when no simdlen is provided, according to ABI rules.
(simd_clone_adjust_sve_vector_type): New helper function.
(aarch64_simd_clone_adjust): Add '+sve' attribute to SVE simd clones
and modify types to use SVE types.
* omp-simd-clone.cc (simd_clone_mangle): Print 'x' for VLA simdlen.
(simd_clone_adjust): Adapt safelen check to be compatible with VLA
simdlen.

gcc/testsuite/ChangeLog:

PR target/96342
* gcc.target/aarch64/declare-simd-2.c: Add SVE clone scan.
* gcc.target/aarch64/vect-simd-clone-1.c: New test.
* g++.target/aarch64/vect-simd-clone-1.C: New test.

Co-authored-by: Victor Do Nascimento <victor.donascimento@arm.com>
Co-authored-by: Tamar Christina <tamar.christina@arm.com>
gcc/config/aarch64/aarch64-protos.h
gcc/config/aarch64/aarch64-sve-builtins.cc
gcc/config/aarch64/aarch64.cc
gcc/omp-simd-clone.cc
gcc/testsuite/g++.target/aarch64/vect-simd-clone-1.C [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/declare-simd-2.c
gcc/testsuite/gcc.target/aarch64/vect-simd-clone-1.c [new file with mode: 0644]