2692b5c857
In PR 69577 we have: A: (set (reg:V2TI X) ...) B: (set (subreg:TI (reg:V2TI X) 0) ...) X gets allocated to an AVX register, as usual for V2TI. The problem is that the movti for B doesn't then preserve the other half of X, even though the subreg semantics are supposed to guarantee that. If instead the same value had been set by: A': (set (subreg:TI (reg:V2TI X) 16) ...) B: (set (subreg:TI (reg:V2TI X) 0) ...) the subreg in A' would have prevented the use of AVX registers for X, since you can't directly access the high part. IMO these are really the same thing. An alternative way to view it is that the original sequence is equivalent to: A: (set (reg:V2TI X) ...) B1: (set (subreg:TI (reg:V2TI X) 0) ...) B2: (set (subreg:TI (reg:V2TI X) 16) (subreg:TI (reg:V2TI X) 16)) in which B2 is a no-op and therefore implicit. The handling ought to be the same regardless of whether there is an rtl insn that explicitly assigns to (subreg:TI (reg:V2TI X) 16). This patch implements that idea. Hopefully the comments explain what's going on. Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabihf. gcc/ PR rtl-optimization/69577 * reginfo.c (record_subregs_of_mode): Add a partial_def parameter. (find_subregs_of_mode): Update accordingly. Iterate over partial definitions. gcc/testsuite/ PR rtl-optimization/69577 * gcc.target/i386/pr69577.c: New test. From-SVN: r233143 |
||
---|---|---|
boehm-gc | ||
config | ||
contrib | ||
fixincludes | ||
gcc | ||
gnattools | ||
gotools | ||
include | ||
INSTALL | ||
intl | ||
libada | ||
libatomic | ||
libbacktrace | ||
libcc1 | ||
libcilkrts | ||
libcpp | ||
libdecnumber | ||
libffi | ||
libgcc | ||
libgfortran | ||
libgo | ||
libgomp | ||
libiberty | ||
libitm | ||
libjava | ||
libmpx | ||
libobjc | ||
liboffloadmic | ||
libquadmath | ||
libsanitizer | ||
libssp | ||
libstdc++-v3 | ||
libvtv | ||
lto-plugin | ||
maintainer-scripts | ||
zlib | ||
.dir-locals.el | ||
.gitignore | ||
ABOUT-NLS | ||
ChangeLog | ||
ChangeLog.jit | ||
ChangeLog.tree-ssa | ||
compile | ||
config-ml.in | ||
config.guess | ||
config.rpath | ||
config.sub | ||
configure | ||
configure.ac | ||
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 | ||
Makefile.def | ||
Makefile.in | ||
Makefile.tpl | ||
missing | ||
mkdep | ||
mkinstalldirs | ||
move-if-change | ||
README | ||
symlink-tree | ||
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.