Andrew Pinski 3ebe697f32 cfgcleanup: Protect latches always [PR123417]
So it turns out LOOPS_MAY_HAVE_MULTIPLE_LATCHES is set in places
along compiling. Setting it only means there might be multiple
latches currently. It does not mean let's go in an delete them
all; which is what remove_forwarder_block does currently. This
was happening before my set of patches too but since it was
only happening in merge_phi pass, latches were not cleared away
al of the time and then recreated.

This solves the problem by protecting latches all of the time
instead of depedent on LOOPS_MAY_HAVE_MULTIPLE_LATCHES not being set.

vect-uncounted_7.c needs to be xfailed here because we no longer
vectorize the code. Note the IR between GCC 15 and after this patch
is the same so I think this was just a case were the testcase
was added after the remove forwarder changes and should not have
vectorized (or vectorize differently).

Bootstrapped and tested on x86_64-linux-gnu.

	PR tree-optimization/123417
gcc/ChangeLog:

	* tree-cfgcleanup.cc (maybe_remove_forwarder_block): Always
	protect latches.

gcc/testsuite/ChangeLog:

	* gcc.dg/vect/vect-uncounted_7.c: xfail vect test.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
2026-01-10 05:09:17 -08:00
2026-01-10 00:16:49 +00:00
2026-01-10 00:16:49 +00:00
2026-01-10 00:16:49 +00:00
2026-01-10 00:16:49 +00:00
2026-01-10 00:16:49 +00:00
2026-01-08 00:16:32 +00:00
2026-01-10 00:16:49 +00:00
2026-01-07 00:16:25 +00:00
2026-01-10 00:16:49 +00:00
2026-01-10 00:16:49 +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 5.1 GiB
Languages
C++ 32%
C 30.9%
Ada 12.1%
D 6.5%
Go 6.5%
Other 11.5%