Victor Do Nascimento 0d0be1d10d aarch64: Fix aarch64 backend-use of (u|s|us)dot_prod patterns
Given recent changes to the dot_prod standard pattern name, this patch
fixes the aarch64 back-end by implementing the following changes:

1. Add 2nd mode to all (u|s|us)dot_prod patterns in .md files.
2. Rewrite initialization and function expansion mechanism for simd
builtins.
3. Fix all direct calls to back-end `dot_prod' patterns in SVE
builtins.

Finally, given that it is now possible for the compiler to
differentiate between the two- and four-way dot product, we add a test
to ensure that autovectorization picks up on dot-product patterns
where the result is twice the width of the operands.

gcc/ChangeLog:

	* config/aarch64/aarch64-simd.md
	(<sur>dot_prod<vsi2qi><vczle><vczbe>): Renamed to...
	(<sur>dot_prod<mode><vsi2qi><vczle><vczbe>): ...this.
	(usdot_prod<vsi2qi><vczle><vczbe>): Renamed to...
	(usdot_prod<mode><vsi2qi><vczle><vczbe>): ...this.
	(<su>sadv16qi): Adjust call to gen_udot_prod take second mode.
	(popcount<mode2>): fix use of `udot_prod_optab'.
	* config/aarch64/aarch64-sve.md
	(<sur>dot_prod<vsi2qi>): Renamed to...
	(<sur>dot_prod<mode><vsi2qi>): ...this.
	(@<sur>dot_prod<vsi2qi>): Renamed to...
	(@<sur>dot_prod<mode><vsi2qi>): ...this.
	(<su>sad<vsi2qi>): Adjust call to gen_udot_prod take second mode.
	* config/aarch64/aarch64-sve2.md
	(@aarch64_sve_<sur>dotvnx4sivnx8hi): Renamed to...
	(<sur>dot_prodvnx4sivnx8hi): ...this.
	* config/aarch64/aarch64-simd-builtins.def: Modify macro
	expansion-based initialization and expansion
	of (u|s|us)dot_prod builtins.
	* config/aarch64/aarch64-builtins.cc
	(CODE_FOR_aarch64_sdot_prodv8qi): Define as alias to
	new CODE_FOR_sdot_prodv2siv8qi.
	(CODE_FOR_aarch64_udot_prodv8qi): Define as alias to
	new CODE_FOR_udot_prodv2siv8qi.
	(CODE_FOR_aarch64_usdot_prodv8qi): Define as alias to
	new CODE_FOR_usdot_prodv2siv8qi.
	(CODE_FOR_aarch64_sdot_prodv16qi): Define as alias to
	new CODE_FOR_sdot_prodv4siv16qi.
	(CODE_FOR_aarch64_udot_prodv16qi): Define as alias to
	new CODE_FOR_udot_prodv4siv16qi.
	(CODE_FOR_aarch64_usdot_prodv16qi): Define as alias to
	new CODE_FOR_usdot_prodv4siv16qi.
	* config/aarch64/aarch64-sve-builtins-base.cc
	(svdot_impl::expand): s/direct/convert/ in
	`convert_optab_handler_for_sign' function call.
	(svusdot_impl::expand): add second mode argument in call to
	`code_for_dot_prod'.
	* config/aarch64/aarch64-sve-builtins.cc
	(function_expander::convert_optab_handler_for_sign): New class
	method.
	* config/aarch64/aarch64-sve-builtins.h
	(class function_expander): Add prototype for new
	`convert_optab_handler_for_sign' method.

gcc/testsuite/ChangeLog:
	* gcc.target/aarch64/sme/vect-dotprod-twoway.c (udot2): New.
2024-09-30 15:59:43 +01:00
2024-05-09 10:58:01 +00:00
2024-04-17 00:18:45 +00:00
2024-09-19 00:18:55 +00:00
2024-07-12 00:17:52 +00:00
2024-07-08 00:17:01 +00:00
2024-04-16 00:18:06 +00:00
2024-09-25 00:18:47 +00:00
2024-01-03 12:19:35 +01:00
2024-09-03 00:21:29 +00:00
2024-08-06 00:17:19 +00:00
2024-09-21 00:16:55 +00:00
2024-09-20 17:36:00 +00:00
2024-04-03 00:17:29 +00:00
2024-09-24 00:18:14 +00:00
2024-09-28 00:19:05 +00:00
2024-09-25 00:18:47 +00:00
2024-05-30 00:16:44 +00:00
2024-04-29 11:39:58 -07:00
2024-09-28 00:19:05 +00:00
2024-08-02 00:18:55 +00:00
2024-09-08 00:17:46 +00:00
2024-09-24 00:18:14 +00:00
2024-09-24 00:18:14 +00:00
2024-09-03 00:21:29 +00:00
2024-08-29 00:19:25 +00:00
2024-09-06 00:19:10 +00:00
2024-05-09 10:58:01 +00:00
2024-09-28 00:19:05 +00:00
2024-09-03 00:21:29 +00:00
2024-08-24 00:18:13 +00:00
2024-07-20 00:17:53 +00:00
2024-09-12 22:51:00 +08:00
2024-09-28 00:19:05 +00:00
2024-09-18 11:51:45 -06:00
2024-09-18 11:51:45 -06:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.
Description
No description provided
Readme 2.7 GiB
Languages
C++ 30.7%
C 30.1%
Ada 14.4%
D 6.1%
Go 5.7%
Other 12.5%