Kewen Lin 282462b395 rs6000: Raise error for __vector_{quad,pair} uses without MMA enabled [PR106736]
As PR106736 shows, it's unexpected to use __vector_quad and
__vector_pair types without MMA support, it would cause ICE
when expanding the corresponding assignment.  We can't guard
these built-in types registering under MMA support as Peter
pointed out in that PR, because the registering is global,
it doesn't work for target pragma/attribute support with MMA
enabled.  The existing verify_type_context mentioned in [2]
can help to make the diagnostics invalid built-in type uses
better, but as Richard pointed out in [4], it can't deal with
all cases.  As the discussions in [1][3], this patch is to
check the invalid use of built-in types __vector_quad and
__vector_pair in mov pattern of OOmode and XOmode, on the
currently being expanded gimple assignment statement.  It
still puts an assertion in else arm rather than just makes
it go through, it's to ensure we can catch any other possible
unexpected cases in time if there are.

[1] https://gcc.gnu.org/pipermail/gcc/2022-December/240218.html
[2] https://gcc.gnu.org/pipermail/gcc/2022-December/240220.html
[3] https://gcc.gnu.org/pipermail/gcc/2022-December/240223.html
[4] https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608083.html

	PR target/106736

gcc/ChangeLog:

	* config/rs6000/mma.md (define_expand movoo): Call function
	rs6000_opaque_type_invalid_use_p to check and emit error message for
	the invalid use of opaque type.
	(define_expand movxo): Likewise.
	* config/rs6000/rs6000-protos.h
	(rs6000_opaque_type_invalid_use_p): New function declaration.
	(currently_expanding_gimple_stmt): New extern declaration.
	* config/rs6000/rs6000.cc (rs6000_opaque_type_invalid_use_p): New
	function.

gcc/testsuite/ChangeLog:

	* gcc.target/powerpc/pr106736-1.c: New test.
	* gcc.target/powerpc/pr106736-2.c: Likewise.
	* gcc.target/powerpc/pr106736-3.c: Likewise.
	* gcc.target/powerpc/pr106736-4.c: Likewise.
	* gcc.target/powerpc/pr106736-5.c: Likewise.
2022-12-20 21:02:08 -06:00
2022-11-24 00:17:47 +00:00
2022-11-15 08:32:29 +00:00
2022-12-20 00:17:00 +00:00
2022-11-24 00:17:47 +00:00
2022-11-24 00:17:47 +00:00
2022-11-17 00:16:52 +00:00
2022-12-18 00:16:57 +00:00
2022-11-02 00:17:38 +00:00
2022-11-24 00:17:47 +00:00
2022-12-08 00:17:45 +00:00
2022-11-24 00:17:47 +00:00
2022-12-17 00:17:56 +00:00
2022-12-16 00:17:46 +00:00
2022-12-12 14:18:14 -08:00
2022-12-17 00:17:56 +00:00
2022-11-24 00:17:47 +00:00
2022-12-12 00:22:21 +00:00
2022-12-20 00:17:00 +00:00
2022-10-13 00:17:37 +00:00
2022-12-20 00:17:00 +00:00
2022-11-24 00:17:47 +00:00
2022-12-01 00:17:51 +00:00
2022-11-24 00:17:47 +00:00
2022-12-14 17:43:08 +00:00
2022-12-09 11:08:55 +01:00
2022-12-14 17:43:08 +00: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.1 GiB
Languages
C++ 31.9%
C 31.3%
Ada 12%
D 6.5%
Go 6.4%
Other 11.5%