]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/86270 - improve SSA coalescing for loop exit test
authorRichard Biener <rguenther@suse.de>
Wed, 12 Feb 2025 10:20:10 +0000 (11:20 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 20 Feb 2025 07:38:41 +0000 (08:38 +0100)
commit94d01a884702934bc03ccedff62e2c65515c8c83
treec3bd123e7381217f39d5b869307194756224d5a8
parent83bc61c9fd6581d0a4c4ee16bdfdaeedcdd6ebcd
tree-optimization/86270 - improve SSA coalescing for loop exit test

The PR indicates a very specific issue with regard to SSA coalescing
failures because there's a pre IV increment loop exit test.  While
IVOPTs created the desired IL we later simplify the exit test into
the undesirable form again.  The following fixes this up during RTL
expansion where we try to improve coalescing of IVs.  That seems
easier that trying to avoid the simplification with some weird
heuristics (it could also have been written this way).

PR tree-optimization/86270
* tree-outof-ssa.cc (insert_backedge_copies): Pattern
match a single conflict in a loop condition and adjust
that avoiding the conflict if possible.

* gcc.target/i386/pr86270.c: Adjust to check for no reg-reg
copies as well.
gcc/testsuite/gcc.target/i386/pr86270.c
gcc/tree-outof-ssa.cc