aarch64: Add SVE AES2 ACLE builtins

Add ACLE support for the SVE AES2 multi-vector AES indexed
instructions and the 128-bit PMULL/PMLAL pair forms.

This adds builtin shapes and expanders for svaese_lane, svaesd_lane,
svaesemc_lane, svaesdimc_lane, svpmull_pair and svpmlal_pair, together
with the corresponding RTL patterns and tests.  Also add preprocessor
feature macros for SVE AES2 and SSVE AES.

gcc/
	* config/aarch64/aarch64.h (TARGET_SVE_AES2): Define.
	* config/aarch64/aarch64.md (UNSPEC_SSVE_LANE_SELECT): New unspec.
	* config/aarch64/aarch64-acle-builtins.cc
	(function_resolver::finish_opt_n_resolution): Add overload taking an
	sve_type argument.  Make the existing overload delegate to it.
	* config/aarch64/aarch64-acle-builtins.h
	(function_resolver::finish_opt_n_resolution): Declare the new overload.
	* config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins): Define
	__ARM_FEATURE_SVE_AES2 and __ARM_FEATURE_SSVE_AES.
	* config/aarch64/aarch64-sve-builtins-functions.h
	(unspec_based_aes_lane_function): New typedef.
	(unspec_based_aes_lane_mc_function): Likewise.
	* config/aarch64/aarch64-sve-builtins-shapes.cc
	(binary_to_pair_opt_n_def): New shape.
	(ternary_to_pair_opt_n_def): Likewise.
	(binary_aes_lane_def): Likewise.
	* config/aarch64/aarch64-sve-builtins-shapes.h: Declare new shapes.
	* config/aarch64/aarch64-sve-builtins-sve2.cc: Add new function
	entries.
	* config/aarch64/aarch64-sve-builtins-sve2.def: Add new ACLE
	builtin definitions.
	* config/aarch64/aarch64-sve-builtins-sve2.h: Declare new functions.
	* config/aarch64/aarch64-sve2.md: Add PMULL/PMLAL pair and AES
	indexed multi-vector patterns.
	* config/aarch64/iterators.md: Add iterators and attrs for new
	patterns.
	* config/aarch64/predicates.md (const_0_to_3_operand): New predicate.

gcc/testsuite/
	* gcc.target/aarch64/pragma_cpp_predefs_5.c: Test new feature macros.
	* gcc.target/aarch64/sve/acle/asm/test_sve_acle.h
	(TEST_XN_INDEXED): New macro.
	* gcc.target/aarch64/sve2/acle/asm/aesd_lane_u8.c: New test.
	* gcc.target/aarch64/sve2/acle/asm/aesdimc_lane_u8.c: New test.
	* gcc.target/aarch64/sve2/acle/asm/aese_lane_u8.c: New test.
	* gcc.target/aarch64/sve2/acle/asm/aesemc_lane_u8.c: New test.
	* gcc.target/aarch64/sve2/acle/asm/pmlal_pair_u64.c: New test.
	* gcc.target/aarch64/sve2/acle/asm/pmull_pair_u64.c: New test.
	* lib/target-supports.exp: Add sve-aes2 assembler probe.
23 files changed