Go to file
Aldy Hernandez a311163fd8 Do not call range_on_path_entry for SSAs defined within the path
In the path solver, when requesting the range of an SSA for which we
know nothing, we ask the ranger for the range incoming to the path.
We do this by asking for all the incoming ranges to the path entry
block and unioning them.

The problem here is that we're asking for a range on path entry for an
SSA which *is* defined in the path, but for which we know nothing
about:

	some_global.1_2 = some_global;
	_3 = (char) some_global.1_2;

This request is causing us to ask for range_on_edge of _3 on the
incoming edges to the path.  This is a bit of nonsensical request
because _3 isn't live on entry to the path, so ranger correctly
returns UNDEFINED.  The proper thing is to avoid asking this in the
first place.

I have added a relevant assert, since it doesn't make sense to call
range_on_path_entry for SSAs defined within the path.

Tested on x86-64 Linux.

	PR tree-optimization/102736

gcc/ChangeLog:

	PR tree-optimization/102736
	* gimple-range-path.cc (path_range_query::range_on_path_entry):
	Assert that the requested range is defined outside the path.
	(path_range_query::ssa_range_in_phi): Do not call
	range_on_path_entry for SSA names that are defined within the
	path.

gcc/testsuite/ChangeLog:

	* gcc.dg/tree-ssa/pr102736.c: New test.
2021-10-14 14:23:00 +02:00
c++tools
config
contrib
fixincludes
gcc Do not call range_on_path_entry for SSAs defined within the path 2021-10-14 14:23:00 +02:00
gnattools
gotools
include
INSTALL
intl
libada
libatomic
libbacktrace
libcc1
libcody
libcpp Daily bump. 2021-10-07 00:16:24 +00:00
libdecnumber
libffi
libgcc Daily bump. 2021-10-14 00:16:31 +00:00
libgfortran
libgo
libgomp Daily bump. 2021-10-13 00:16:22 +00:00
libiberty Daily bump. 2021-10-13 00:16:22 +00:00
libitm
libobjc
liboffloadmic
libphobos
libquadmath
libsanitizer Daily bump. 2021-10-09 00:16:26 +00:00
libssp
libstdc++-v3 libstdc++: Fix test for feature test macro 2021-10-14 09:08:01 +01:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2021-10-13 00:16:22 +00:00
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 MAINTAINERS: Add myself to DCO section 2021-10-07 17:49:00 +05:30
Makefile.def Mark certain subdirectories as missing TAGS targets. 2021-10-12 17:00:43 -04:00
Makefile.in Mark certain subdirectories as missing TAGS targets. 2021-10-12 17:00:43 -04:00
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.