]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Relax add_overloaded_function assert
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 13 Nov 2024 17:21:35 +0000 (17:21 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Wed, 13 Nov 2024 17:21:35 +0000 (17:21 +0000)
commit2d7d8179cbccaddb308c966b9c1d4840c0d56b03
treec2c8a877d1b2a0abd491f79440b83484cd25a25f
parent99ec0eb32a03506142f30c158276b4131aa73fe8
aarch64: Relax add_overloaded_function assert

There are some SVE intrinsics that support one set of suffixes for
one extension (E1, say) and another set of suffixes for another
extension (E2, say).  It is usually the case that, mutatis mutandis,
E2 extends E1.  Listing E1 first would then ensure that the manual
C overload would also require E1, making it suitable for resolving
both the E1 forms and, where appropriate, the E2 forms.

However, there was one exception: the I8MM, F32MM, and F64MM extensions
to SVE each added variants of svmmla, but there was no svmmla for SVE
itself.  This was handled by adding an SVE entry for svmmla that only
defined the C overload; it had no variants of its own.

This situation occurs more often with upcoming patches.  Rather than
keep adding these dummy entries, it seemed better to make the code
automatically compute the lowest common denominator for all definitions
that share the same C overload.

gcc/
* config/aarch64/aarch64-protos.h
(aarch64_required_extensions::common_denominator): New member
function.
* config/aarch64/aarch64-sve-builtins-base.def: Remove zero-variant
entry for mmla.
* config/aarch64/aarch64-sve-builtins-shapes.cc (mmla_def): Remove
support for it.
* config/aarch64/aarch64-sve-builtins.cc
(function_builder::add_overloaded): Relax the assert for duplicate
definitions and instead calculate the common denominator of all
requirements.
gcc/config/aarch64/aarch64-protos.h
gcc/config/aarch64/aarch64-sve-builtins-base.def
gcc/config/aarch64/aarch64-sve-builtins-shapes.cc
gcc/config/aarch64/aarch64-sve-builtins.cc