Jakub Jelinek 299c98578b expr: Optimize noop copies [PR96539]
At GIMPLE e.g. for __builtin_memmove we optimize away (to just the return
value) noop copies where src == dest, but at the RTL we don't, and as the
testcase shows, in some cases such copies can appear only at the RTL level
e.g. from trying to copy an aggregate by value argument to the same location
as it already has.  If the block move is expanded e.g. piecewise, we
actually manage to optimize it away, as the individual memory copies are
seen as noop moves, but if the target optabs are used, often the sequences
stay until final.

2020-08-11  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/96539
	* expr.c (emit_block_move_hints): Don't copy anything if x and y
	are the same and neither is MEM_VOLATILE_P.

	* gcc.target/i386/pr96539.c: New test.
2020-08-11 13:51:59 +02:00
2020-07-31 00:16:26 +00:00
2020-07-30 00:16:24 +00:00
2020-08-11 13:51:59 +02:00
2020-01-21 23:53:22 -08:00
2020-08-04 00:16:24 +00:00
2020-07-15 00:16:35 +00:00
2020-07-31 00:16:26 +00:00
2020-07-31 00:16:26 +00:00
2020-07-31 00:16:26 +00:00
2020-07-31 00:16:26 +00:00
2020-08-04 00:16:24 +00:00
2020-08-04 00:16:24 +00:00
2020-08-10 16:45:16 -07:00
2020-08-09 00:16:35 +00:00
2020-08-04 00:16:24 +00:00
2020-07-25 00:16:22 +00:00
2020-05-30 00:16:27 +00:00
2020-06-26 00:16:23 +00:00
2020-05-30 00:16:27 +00:00
2020-07-17 00:16:27 +00:00
2020-05-30 00:16:27 +00:00
2020-08-11 00:16:45 +00:00
2020-05-30 00:16:27 +00:00
2020-07-31 00:16:26 +00:00
2020-05-30 00:16:27 +00:00
2020-05-30 00:16:27 +00:00
2020-01-15 14:29:53 +01:00
2020-06-12 16:03:02 +02:00
2020-07-31 00:16:26 +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%