Go to file
Uros Bizjak e95395926a i386: Fix mode of ZERO_EXTRACT RTXes, remove ext_register_operand predicate.
The mode of ZERO_EXTRACT RTX should match the mode of its LOC register
operand.  The mode should be HI, SI or DImode to enable combine to synthesize
extractions from HImode and DImode operands, in addition to existing SImode.
Further, these changes tighten allowed modes for extv, extzv and insv
named patterns and finally enable removal of ext_register_operand
special predicate.

2020-18-06  Uroš Bizjak  <ubizjak@gmail.com>

gcc/ChangeLog:

	* config/i386/i386.md (*cmpqi_ext<mode>_1): Use SWI248 mode
	iterator instead of SImode for ZERO_EXTRACT RTX.  Use SWI248
	mode iterator for the first operand of ZERO_EXTRACT RTX.
	Change ext_register_operand predicate to register_operand.
	Rename from *cmpqi_ext_1.
	(*cmpqi_ext<mode>_2): Ditto.  Rename from *cmpqi_ext_2.
	(*cmpqi_ext<mode>_3): Ditto.  Rename from *cmpqi_ext_3.
	(*cmpqi_ext<mode>_4): Ditto.  Rename from *cmpqi_ext_4.
	(cmpi_ext_3): Use HImode instead of SImode for ZERO_EXTRACT RTX.
	(*extv<mode>): Use SWI24 mode iterator for the first operand
	of ZERO_EXTRACT RTX.  Change ext_register_operand predicate
	to register_operand.
	(*extzv<mode>): Use SWI248 mode iterator for the first operand
	of ZERO_EXTRACT RTX.  Change ext_register_operand predicate
	to register_operand.
	(*extzvqi): Use SWI248 mode iterator instead of SImode for
	ZERO_EXTRACT RTX.  Use SWI248 mode iterator for the first operand
	of ZERO_EXTRACT RTX.  Change ext_register_operand predicate to
	register_operand.
	(*extzvqi_mem_rex64 and corresponding peephole2):  Use SWI248 mode
	iterator instead of SImode for ZERO_EXTRACT RTX.  Use SWI248
	mode iterator for the first operand of ZERO_EXTRACT RTX.
	Change ext_register_operand predicate to register_operand.
	(@insv<mode>_1): Use SWI248 mode iterator for the first operand
	of ZERO_EXTRACT RTX.  Change ext_register_operand predicate to
	register_operand.
	(*insvqi_1): Use SWI248 mode iterator instead of SImode
	for ZERO_EXTRACT RTX.  Use SWI248 mode iterator for the
	first operand of ZERO_EXTRACT RTX.  Change ext_register_operand
	predicate to register_operand.
	(*insvqi_2): Ditto.
	(*insvqi_3): Ditto.
	(*insvqi_1_mem_rex64 and corresponding peephole2):  Use SWI248 mode
	iterator instead of SImode for ZERO_EXTRACT RTX.  Use SWI248
	mode iterator for the first operand of ZERO_EXTRACT RTX.
	Change ext_register_operand predicate to register_operand.
	(addqi_ext_1): New expander.
	(*addqi_ext<mode>_1): Use SWI248 mode iterator instead of SImode
	for ZERO_EXTRACT RTX.  Use SWI248 mode iterator for the first
	operand of ZERO_EXTRACT RTX.  Change ext_register_operand predicate
	to register_operand.  Rename from *addqi_ext_1.
	(*addqi_ext<mode>_2): Ditto. Rename from *addqi_ext_2.
	(divmodqi4): Use HImode instead of SImode for ZERO_EXTRACT RTX.
	(udivmodqi4): Ditto.
	(testqi_ext_1): Use HImode instead of SImode for ZERO_EXTRACT RTX.
	(*testqi_ext<mode>_1): Use SWI248 mode iterator instead of SImode
	for ZERO_EXTRACT RTX.  Use SWI248 mode iterator for the first
	operand of ZERO_EXTRACT RTX.  Change ext_register_operand predicate
	to register_operand.  Rename from *testqi_ext_1.
	(*testqi_ext<mode>_2): Ditto.  Rename from *testqi_ext_2.
	(andqi_ext_1): New expander.
	(*andqi_ext<mode>_1): Use SWI248 mode iterator instead of SImode
	for ZERO_EXTRACT RTX.  Use SWI248 mode iterator for the first
	operand of ZERO_EXTRACT RTX.  Change ext_register_operand predicate
	to register_operand.  Rename from andqi_ext_1.
	(*andqi_ext<mode>_1_cc): Ditto.  Rename from *andqi_ext_1_cc.
	(*andqi_ext<mode>_2): Ditto.  Rename from *andqi_ext_2.
	(*<code>qi_ext<mode>_1): Ditto.  Rename from *<code>qi_ext_1.
	(*<code>qi_ext<mode>_2): Ditto.  Rename from *<code>qi_ext_2.
	(xorqi_ext_1_cc): Use HImode instead of SImode for ZERO_EXTRACT RTX.
	(*xorqi_ext<mode>_1_cc):  Use SWI248 mode iterator instead of SImode
	for ZERO_EXTRACT RTX.  Use SWI248 mode iterator for the first
	operand of ZERO_EXTRACT RTX.  Change ext_register_operand predicate
	to register_operand.  Rename from *xorqi_ext_1_cc.
	* config/i386/i386-expand.c (ix86_split_idivmod): Emit ZERO_EXTRACT
	in mode, matching its first operand.
	(promote_duplicated_reg): Update for renamed insv<mode>_1.
	* config/i386/predicates.md (ext_register_operand): Remove predicate.

gcc/testsuite/ChangeLog:

	* gcc.target/i386/pr78904-1a.c: New test.
	* gcc.target/i386/pr78904-1b.c: Ditto.
	* gcc.target/i386/pr78904-2a.c: Ditto.
	* gcc.target/i386/pr78904-2b.c: Ditto.
	* gcc.target/i386/pr78904-3a.c: Ditto.
	* gcc.target/i386/pr78904-3b.c: Ditto.
	* gcc.target/i386/pr78904-4a.c: Ditto.
	* gcc.target/i386/pr78904-4b.c: Ditto.
	* gcc.target/i386/pr78904-5a.c: Ditto.
	* gcc.target/i386/pr78904-5b.c: Ditto.
	* gcc.target/i386/pr78904-6a.c: Ditto.
	* gcc.target/i386/pr78904-6b.c: Ditto.
	* gcc.target/i386/pr78967-1a.c: Ditto.
	* gcc.target/i386/pr78967-1b.c: Ditto.
	* gcc.target/i386/pr78967-2a.c: Ditto.
	* gcc.target/i386/pr78967-2b.c: Ditto.
2020-06-18 20:12:48 +02:00
config
contrib gcc-changelog: checkout & pull order 2020-06-18 14:45:39 +02:00
fixincludes
gcc i386: Fix mode of ZERO_EXTRACT RTXes, remove ext_register_operand predicate. 2020-06-18 20:12:48 +02:00
gnattools
gotools
include
INSTALL
intl
libada
libatomic
libbacktrace
libcc1
libcpp
libdecnumber
libffi
libgcc Daily bump. 2020-06-18 00:16:37 +00:00
libgfortran Daily bump. 2020-06-14 00:16:18 +00:00
libgo libgo: update x/sys/cpu to add all GOARCHes supported by gccgo 2020-06-15 14:20:07 -07:00
libgomp Daily bump. 2020-06-18 00:16:37 +00:00
libhsail-rt
libiberty
libitm
libobjc
liboffloadmic
libphobos
libquadmath
libsanitizer Daily bump. 2020-06-10 00:16:47 +00:00
libssp
libstdc++-v3 Daily bump. 2020-06-18 00:16:37 +00:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore Add .clang-tidy to git ignored. 2020-06-12 16:03:02 +02:00
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2020-06-13 00:16:25 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure bootstrap: Fix --disable-bootstrap with older g++. 2020-06-08 16:42:35 -04:00
configure.ac bootstrap: Fix --disable-bootstrap with older g++. 2020-06-08 16:42:35 -04:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS MAINTAINERS: Add myself as xtensa port maintainer 2020-06-06 01:26:56 -07:00
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

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.