Go to file
Tom de Vries 8d268d75ad [testsuite] Enable pr94600-{1,3}.c tests for nvptx
When compiling test-case pr94600-1.c for nvptx, this gimple mem move:
...
  MEM[(volatile struct t0 *)655404B] ={v} a0[0];
...
is expanded into a memcpy, but when compiling pr94600-2.c instead, this similar
gimple mem move:
...
  MEM[(volatile struct t0 *)655404B] ={v} a00;
...
is expanded into a 32-bit load/store pair.

In both cases, emit_block_move is called.

In the latter case, can_move_by_pieces (4 /* byte-size */, 32 /* bit-align */)
is called, which returns true (because by_pieces_ninsns returns 1, which is
smaller than the MOVE_RATIO of 4).

In the former case, can_move_by_pieces (4 /* byte-size */, 8 /* bit-align */)
is called, which returns false (because by_pieces_ninsns returns 4, which is
not smaller than the MOVE_RATIO of 4).

So the difference in code generation is explained by the alignment.  The
difference in alignment comes from the move sources: a0[0] vs. a00.  Both
have the same type with 8-bit alignment, but a00 is on stack, which based on
the base stack align and stack variable placement happens to result in a
32-bit alignment.

Enable test-cases pr94600-{1,3}.c for nvptx by forcing the currently 8-byte
aligned variables to have a 32-bit alignment for STRICT_ALIGNMENT targets.

Tested on nvptx.

gcc/testsuite/ChangeLog:

2020-10-01  Tom de Vries  <tdevries@suse.de>

	* gcc.dg/pr94600-1.c: Force 32-bit alignment for a0 for !non_strict_align
	targets.  Remove target clauses from scan tests.
	* gcc.dg/pr94600-3.c: Same.
2020-10-01 12:53:36 +02:00
config
contrib
fixincludes Daily bump. 2020-09-27 00:16:24 +00:00
gcc [testsuite] Enable pr94600-{1,3}.c tests for nvptx 2020-10-01 12:53:36 +02:00
gnattools
gotools
include Daily bump. 2020-09-25 00:16:27 +00:00
INSTALL
intl
libada
libatomic Daily bump. 2020-09-28 00:16:21 +00:00
libbacktrace Daily bump. 2020-09-29 00:16:30 +00:00
libcc1 Daily bump. 2020-09-26 00:16:25 +00:00
libcpp Daily bump. 2020-09-27 00:16:24 +00:00
libdecnumber
libffi Daily bump. 2020-09-25 00:16:27 +00:00
libgcc [RS6000] Adjust gcc asm for power10 2020-10-01 10:34:48 +09:30
libgfortran Daily bump. 2020-09-29 00:16:30 +00:00
libgo libgo: add 32-bit RISC-V (RV32) support 2020-09-30 19:47:48 -07:00
libgomp Daily bump. 2020-10-01 00:16:30 +00:00
libhsail-rt
libiberty Daily bump. 2020-09-25 00:16:27 +00:00
libitm [RS6000] Adjust gcc asm for power10 2020-10-01 10:34:48 +09:30
libobjc
liboffloadmic
libphobos
libquadmath
libsanitizer
libssp
libstdc++-v3 Daily bump. 2020-10-01 00:16:30 +00:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
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
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.