Go to file
Richard Biener 68e0063397 Force the selection operand of a GIMPLE COND_EXPR to be a register
This goes away with the selection operand allowed to be a GENERIC
tcc_comparison tree.  It keeps those for vectorizer pattern recog,
those are short lived and removing this instance is a bigger task.

The patch doesn't yet remove dead code and functionality, that's
left for a followup.  Instead the patch makes sure to produce
valid GIMPLE IL and continue to optimize COND_EXPRs where the
previous IL allowed and the new IL showed regressions in the testsuite.

2022-05-16  Richard Biener  <rguenther@suse.de>

	* gimple-expr.cc (is_gimple_condexpr): Equate to is_gimple_val.
	* gimplify.cc (gimplify_pure_cond_expr): Gimplify the condition
	as is_gimple_val.
	* gimple-fold.cc (valid_gimple_rhs_p): Simplify.
	* tree-cfg.cc (verify_gimple_assign_ternary): Likewise.
	* gimple-loop-interchange.cc (loop_cand::undo_simple_reduction):
	Build the condition of the COND_EXPR separately.
	* tree-ssa-loop-im.cc (move_computations_worker): Likewise.
	* tree-vect-generic.cc (expand_vector_condition): Likewise.
	* tree-vect-loop.cc (vect_create_epilog_for_reduction):
	Likewise.
	* vr-values.cc (simplify_using_ranges::simplify): Likewise.
	* tree-vect-patterns.cc: Add comment indicating we are
	building invalid COND_EXPRs and why.
	* omp-expand.cc (expand_omp_simd): Gimplify the condition
	to the COND_EXPR separately.
	(expand_omp_atomic_cas): Note part that should be unreachable
	now.
	* tree-ssa-forwprop.cc (forward_propagate_into_cond): Adjust
	condition for valid replacements.
	* tree-if-conv.cc (predicate_bbs): Simulate previous
	re-folding of the condition in folded COND_EXPRs which
	is necessary because of unfolded GIMPLE_CONDs in the IL
	as in for example gcc.dg/fold-bopcond-1.c.
	* gimple-range-gori.cc (gori_compute::condexpr_adjust):
	Handle that the comparison is now in the def stmt of
	the select operand.  Required by gcc.dg/pr104526.c.

	* gcc.dg/gimplefe-27.c: Adjust.
	* gcc.dg/gimplefe-45.c: Likewise.
	* gcc.dg/pr101145-2.c: Likewise.
	* gcc.dg/pr98211.c: Likewise.
	* gcc.dg/torture/pr89595.c: Likewise.
	* gcc.dg/tree-ssa/divide-7.c: Likewise.
	* gcc.dg/tree-ssa/ssa-lim-12.c: Likewise.
2022-05-23 11:30:39 +02:00
c++tools
config Daily bump. 2022-05-21 00:16:32 +00:00
contrib
fixincludes
gcc Force the selection operand of a GIMPLE COND_EXPR to be a register 2022-05-23 11:30:39 +02:00
gnattools
gotools
include Daily bump. 2022-05-19 00:16:32 +00:00
INSTALL
intl
libada
libatomic
libbacktrace
libcc1
libcody
libcpp Daily bump. 2022-05-21 00:16:32 +00:00
libdecnumber Daily bump. 2022-05-21 00:16:32 +00:00
libffi
libgcc Daily bump. 2022-05-21 00:16:32 +00:00
libgfortran
libgo
libgomp OpenMP: Handle descriptors in target's firstprivate [PR104949] 2022-05-23 10:54:32 +02:00
libiberty Daily bump. 2022-05-19 00:16:32 +00:00
libitm
libobjc
liboffloadmic
libphobos Daily bump. 2022-05-17 00:16:28 +00:00
libquadmath
libsanitizer
libssp
libstdc++-v3 Daily bump. 2022-05-21 00:16:32 +00:00
libvtv
lto-plugin
maintainer-scripts Daily bump. 2022-05-21 00:16:32 +00:00
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2022-05-14 00:17:19 +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 write after approval 2022-05-13 09:30:38 -05:00
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.