Go to file
Maciej W. Rozycki 29e1cbdc0c PR middle-end/103059: reload: Also accept ASHIFT with indexed addressing
Correct a `vax-netbsdelf' target regression ultimately caused by commit
c605a8bf92 ("VAX: Accept ASHIFT in address expressions") (needed for
LRA) and as of commit 4a960d548b ("Avoid invalid loop transformations
in jump threading registry.") causing a build error in libgcc:

.../libgcc/libgcov-driver.c: In function 'gcov_do_dump':
.../libgcc/libgcov-driver.c:686:1: error: insn does not satisfy its constraints:
  686 | }
      | ^
(insn 2051 2050 2052 185 (set (reg/f:SI 0 %r0 [555])
        (plus:SI (ashift:SI (mem/c:SI (plus:SI (reg/f:SI 13 %fp)
                        (const_int -28 [0xffffffffffffffe4])) [40 %sfp+-28 S4 A32])
                (const_int 3 [0x3]))
            (plus:SI (reg/v/f:SI 9 %r9 [orig:176 fn_buffer ] [176])
                (const_int 24 [0x18])))) ".../libgcc/libgcov-driver.c":172:40 614 {movaddrdi}
     (nil))
during RTL pass: postreload
.../libgcc/libgcov-driver.c:686:1: internal compiler error: in extract_constrain_insn, at recog.c:2670
0x1122a5ff _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
	.../gcc/rtl-error.c:108
0x1122a697 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
	.../gcc/rtl-error.c:118
0x111b5f2f extract_constrain_insn(rtx_insn*)
	.../gcc/recog.c:2670
0x11143eef reload_cse_simplify_operands
	.../gcc/postreload.c:407
0x11142fdb reload_cse_simplify
	.../gcc/postreload.c:132
0x11143533 reload_cse_regs_1
	.../gcc/postreload.c:238
0x11142ce7 reload_cse_regs
	.../gcc/postreload.c:66
0x1114af33 execute
	.../gcc/postreload.c:2355
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

This is because reload does not recognize the ASHIFT form of scaled
indexed addressing that the offending commit enabled the backend to
produce, and as seen in the RTL above lets the pseudo holding the
index part become the original memory reference rather than reloading it
into a hard register.

Fix it then by adding said form to reload, removing the build failure
and numerous similar regressions throughout `vax-netbsdelf' test suites
run with the source as at right before the build regression.

Cf. <https://gcc.gnu.org/pipermail/gcc-patches/2021-March/567256.html>,
and commit 6b3034eaba ("lra: Canonicalize mult to shift in address
reloads").

	gcc/
	PR middle-end/103059
	* reload.c (find_reloads_address_1): Also accept the ASHIFT form
	of indexed addressing.
	(find_reloads): Adjust accordingly.
2021-11-24 13:15:06 +00:00
c++tools
config
contrib Update GMP/MPFR/MPC/ISL version in contrib/download_prerequisites 2021-11-24 11:10:06 +01:00
fixincludes Daily bump. 2021-11-24 00:16:29 +00:00
gcc PR middle-end/103059: reload: Also accept ASHIFT with indexed addressing 2021-11-24 13:15:06 +00:00
gnattools
gotools
include Daily bump. 2021-11-13 00:16:39 +00:00
INSTALL
intl
libada
libatomic
libbacktrace Daily bump. 2021-11-13 00:16:39 +00:00
libcc1
libcody
libcpp Daily bump. 2021-11-24 00:16:29 +00:00
libdecnumber
libffi Daily bump. 2021-11-16 00:16:31 +00:00
libgcc Daily bump. 2021-11-23 00:16:27 +00:00
libgfortran
libgo
libgomp openmp: Fix up handling of kind(host) and kind(nohost) in ACCEL_COMPILERs [PR103384] 2021-11-24 10:30:32 +01:00
libiberty
libitm
libobjc
liboffloadmic
libphobos Daily bump. 2021-11-20 00:16:35 +00:00
libquadmath
libsanitizer Daily bump. 2021-11-19 00:16:34 +00:00
libssp
libstdc++-v3 Daily bump. 2021-11-24 00:16:29 +00:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2021-11-17 00:16:29 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure configure, Darwin: Set appropriate defaults for host-shared. 2021-11-16 19:44:51 +00:00
configure.ac configure, Darwin: Set appropriate defaults for host-shared. 2021-11-16 19:44:51 +00: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 to DCO section and update email address 2021-11-16 22:49:55 +01:00
Makefile.def Make opcodes configure depend on bfd configure 2021-11-12 18:34:12 +10:30
Makefile.in Make opcodes configure depend on bfd configure 2021-11-12 18:34:12 +10:30
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.