]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Make more use of sve_type in ACLE code
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 5 Dec 2023 10:11:21 +0000 (10:11 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Tue, 5 Dec 2023 10:11:21 +0000 (10:11 +0000)
commit1f7f076ad6293cad19d35efdf726eb48cf78e3dd
treec763b20e91e1f68827b310dc406f475546e361c2
parent1b52d4b66e8b91ec1e3de9c0b79aaf258824b875
aarch64: Make more use of sve_type in ACLE code

This patch makes some functions operate on sve_type, rather than just
on type suffixes.  It also allows an overload to be resolved based on
a mode and sve_type.  In this case the sve_type is used to derive the
group size as well as a type suffix.

This is needed for the SME2 intrinsics and the new tuple forms of
svreinterpret.  No functional change intended on its own.

gcc/
* config/aarch64/aarch64-sve-builtins.h
(function_resolver::lookup_form): Add an overload that takes
an sve_type rather than type and group suffixes.
(function_resolver::resolve_to): Likewise.
(function_resolver::infer_vector_or_tuple_type): Return an sve_type.
(function_resolver::infer_tuple_type): Likewise.
(function_resolver::require_matching_vector_type): Take an sve_type
rather than a type_suffix_index.
(function_resolver::require_derived_vector_type): Likewise.
* config/aarch64/aarch64-sve-builtins.cc (num_vectors_to_group):
New function.
(function_resolver::lookup_form): Add an overload that takes
an sve_type rather than type and group suffixes.
(function_resolver::resolve_to): Likewise.
(function_resolver::infer_vector_or_tuple_type): Return an sve_type.
(function_resolver::infer_tuple_type): Likewise.
(function_resolver::infer_vector_type): Update accordingly.
(function_resolver::require_matching_vector_type): Take an sve_type
rather than a type_suffix_index.
(function_resolver::require_derived_vector_type): Likewise.
* config/aarch64/aarch64-sve-builtins-shapes.cc (get_def::resolve)
(set_def::resolve, store_def::resolve, tbl_tuple_def::resolve): Update
calls accordingly.
gcc/config/aarch64/aarch64-sve-builtins-shapes.cc
gcc/config/aarch64/aarch64-sve-builtins.cc
gcc/config/aarch64/aarch64-sve-builtins.h