aarch64: Generalise _m rules for SVE intrinsics
commit8de9304d94d4ec42863a25c1cb1a1ba9a1e3e0fe
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 5 Dec 2023 10:11:28 +0000 (5 10:11 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Tue, 5 Dec 2023 10:11:28 +0000 (5 10:11 +0000)
tree78c4d3aff6ba533a916d669d7ec5576a11370a82
parent1ec23d5a29bc5d89cef60e2aba2fe4095ee12a8f
aarch64: Generalise _m rules for SVE intrinsics

In SVE there was a simple rule that unary merging (_m) intrinsics
had a separate initial argument to specify the values of inactive
lanes, whereas other merging functions took inactive lanes from
the first operand to the operation.

That rule began to break down in SVE2, and it continues to do
so in SME.  This patch therefore adds a virtual function to
specify whether the separate initial argument is present or not.
The old rule is still the default.

gcc/
* config/aarch64/aarch64-sve-builtins.h
(function_shape::has_merge_argument_p): New member function.
* config/aarch64/aarch64-sve-builtins.cc:
(function_resolver::check_gp_argument): Use it.
(function_expander::get_fallback_value): Likewise.
* config/aarch64/aarch64-sve-builtins-shapes.cc
(apply_predication): Likewise.
(unary_convert_narrowt_def::has_merge_argument_p): New function.
gcc/config/aarch64/aarch64-sve-builtins-shapes.cc
gcc/config/aarch64/aarch64-sve-builtins.cc
gcc/config/aarch64/aarch64-sve-builtins.h