Skip to content
Snippets Groups Projects
Commit 12c60ff1 authored by Richard Sandiford's avatar Richard Sandiford
Browse files

aarch64: Rework sme_2mode_function insns

Many of the SME ZA intrinsics have two type suffixes: one for ZA
and one for the vectors.  The ZA suffix only conveys an element
size, while the vector suffix conveys both an element type and
an element size.  Internally, the ZA suffix maps to an integer mode;
e.g. za32 maps to VNx4SI.

For SME2, it was relatively convenient to use the modes associated
with both suffixes directly.  For example, the (non-widening) FMLA
intrinsics used SME_ZA_SDF_I to iterate over the possible ZA modes,
used SME_ZA_SDFx24 to iterate over the possible vector tuple modes,
and used a C++ condition to make sure that the element sizes agree.

However, for later patches it's more convenient to rely only on
the vector mode in cases where the ZA and vector element sizes
are the same.  This means splitting the widening MOPA/S patterns
from the non-widening ones, but otherwise it's not a big change.

gcc/
	* config/aarch64/iterators.md (SME_ZA_SDF_I): Delete.
	(SME_MOP_HSDF): Replace with...
	(SME_MOP_SDF): ...this.
	* config/aarch64/aarch64-sme.md: Change the non-widening FMLA and
	FMLS patterns so that both mode parameters are the same, rather than
	using both SME_ZA_SDF_I and SME_ZA_SDFx24 and checking that their
	element sizes are the same.  Split the FMOPA and FMOPS patterns
	into separate non-widening and widening forms, then update the
	non-widening forms in a similar way to FMLA and FMLS.
	* config/aarch64/aarch64-sve-builtins-functions.h
	(sme_2mode_function_t::expand): If the two type suffixes have the same
	element size, use the vector tuple mode for both mode parameters.
parent 237380cd
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment