GCC modified for the FreeChainXenon project
Find a file
Jakub Jelinek 4615cde5d7 simplify-rtx: Optimize (x - 1) * y + y [PR98334]
We don't try to optimize for signed x, y (int) (x - 1U) * y + y
into x * y, we can't do that with signed x * y, because the former
is well defined for INT_MIN and -1, while the latter is not.
We could perhaps optimize it during isel or some very late optimization
where we'd turn magically flag_wrapv, but we don't do that yet.

This patch optimizes it in simplify-rtx.c, such that we can optimize
it during combine.

2021-01-05  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/98334
	* simplify-rtx.c (simplify_context::simplify_binary_operation_1):
	Optimize (X - 1) * Y + Y to X * Y or (X + 1) * Y - Y to X * Y.

	* gcc.target/i386/pr98334.c: New test.
2021-01-05 10:59:00 +01:00
c++tools Daily bump. 2021-01-05 00:16:42 +00:00
config Daily bump. 2021-01-04 00:16:18 +00:00
contrib Daily bump. 2021-01-05 00:16:42 +00:00
fixincludes Daily bump. 2020-12-15 00:16:35 +00:00
gcc simplify-rtx: Optimize (x - 1) * y + y [PR98334] 2021-01-05 10:59:00 +01:00
gnattools
gotools Daily bump. 2020-12-31 00:16:29 +00:00
include Update copyright years. 2021-01-04 10:26:59 +01:00
INSTALL
intl
libada Update copyright years. 2021-01-04 10:26:59 +01:00
libatomic Update copyright years. 2021-01-04 10:26:59 +01:00
libbacktrace Update copyright years. 2021-01-04 10:26:59 +01:00
libcc1 Update copyright years. 2021-01-04 10:26:59 +01:00
libcody Daily bump. 2021-01-05 00:16:42 +00:00
libcpp Update copyright years. 2021-01-04 10:26:59 +01:00
libdecnumber Update copyright years. 2021-01-04 10:26:59 +01:00
libffi Daily bump. 2020-12-06 00:16:44 +00:00
libgcc Update copyright years. 2021-01-04 10:26:59 +01:00
libgfortran Update copyright years. 2021-01-04 10:26:59 +01:00
libgo internal/cpu: add aarch64 support functions 2021-01-01 15:13:50 -08:00
libgomp Update copyright years. 2021-01-04 10:26:59 +01:00
libhsail-rt Update copyright years. 2021-01-04 10:26:59 +01:00
libiberty Daily bump. 2021-01-05 00:16:42 +00:00
libitm Update copyright years. 2021-01-04 10:26:59 +01:00
libobjc Update copyright years. 2021-01-04 10:26:59 +01:00
liboffloadmic Daily bump. 2020-11-30 00:16:27 +00:00
libphobos Update copyright years. 2021-01-04 10:26:59 +01:00
libquadmath Daily bump. 2021-01-02 00:16:24 +00:00
libsanitizer Daily bump. 2020-12-06 00:16:44 +00:00
libssp Update copyright years. 2021-01-04 10:26:59 +01:00
libstdc++-v3 Update copyright years. 2021-01-04 10:26:59 +01:00
libvtv Update copyright years. 2021-01-04 10:26:59 +01:00
lto-plugin Update copyright years. 2021-01-04 10:26:59 +01:00
maintainer-scripts Daily bump. 2020-12-17 00:16:37 +00:00
zlib Daily bump. 2020-12-06 00:16:44 +00:00
.dir-locals.el .dir-locals.el: Set 'fill-column' to 80 for c-mode 2020-12-14 12:19:56 +01:00
.gitattributes
.gitignore Sync .gitignore with binutils-gdb 2020-12-02 11:04:01 -07:00
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2021-01-05 00:16:42 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess config.sub, config.guess : Import upstream 2020-11-07. 2020-11-23 19:30:01 +00:00
config.rpath
config.sub config.sub, config.guess : Import upstream 2020-11-07. 2020-11-23 19:30:01 +00:00
configure Add C++tools 2020-12-15 07:42:59 -08:00
configure.ac Add C++tools 2020-12-15 07:42:59 -08:00
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
depcomp
install-sh
libtool-ldflags
libtool.m4 Darwin : Update libtool and dependencies for Darwin20 [PR97865] 2020-12-05 08:43:20 +00:00
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS MAINTAINERS: Update my email address. 2021-01-04 17:37:54 +01:00
Makefile.def Add C++tools 2020-12-15 07:42:59 -08:00
Makefile.in Add C++tools 2020-12-15 07:42:59 -08:00
Makefile.tpl Add C++tools 2020-12-15 07:42:59 -08:00
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.