]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Consolidate simd type lookup functions
authorAndrew Carlotti <andrew.carlotti@arm.com>
Thu, 21 Jul 2022 16:18:43 +0000 (17:18 +0100)
committerAndrew Carlotti <andrew.carlotti@arm.com>
Tue, 26 Jul 2022 09:31:00 +0000 (10:31 +0100)
commitf023cc54e86c6c6dd04298487a9c9000eab9133a
tree3e1f4efe649c86e7f0557e0a59db9be31e18a995
parent8a1e05b7618fed394b0928bec89e71748295d357
aarch64: Consolidate simd type lookup functions

There were several similarly-named functions, which each built or looked up an
operand type using a different subset of valid modes or qualifiers.

This change provides a single function to return operand types, which can
additionally handle const and pointer qualifiers.  For clarity, the existing
functionality is kept in separate helper functions.

gcc/ChangeLog:

* config/aarch64/aarch64-builtins.cc
(aarch64_simd_builtin_std_type): Rename to...
(aarch64_int_or_fp_type): ...this, and allow irrelevant qualifiers.
(aarch64_lookup_simd_builtin_type): Rename to...
(aarch64_simd_builtin_type): ...this. Add const/pointer
support, and extract table lookup to...
(aarch64_lookup_simd_type_in_table): ...this function.
(aarch64_init_crc32_builtins): Update to use aarch64_simd_builtin_type.
(aarch64_init_fcmla_laneq_builtins): Ditto.
(aarch64_init_simd_builtin_functions): Ditto.
gcc/config/aarch64/aarch64-builtins.cc