]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/116290 - fix compare-debug issue in ldist
authorRichard Biener <rguenther@suse.de>
Sun, 13 Oct 2024 13:12:44 +0000 (15:12 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 14 Oct 2024 06:14:37 +0000 (08:14 +0200)
commit566740013b3445162b8c4bc2205e4e568d014968
tree38fb5482cf9882ae6d559b2685b9de59f3146e61
parentb717c462b96e7870f8081d2bc330e4749a4b0538
tree-optimization/116290 - fix compare-debug issue in ldist

Loop distribution does different analysis with -g0/-g due to counting
a debug stmt starting a BB against a limit which will everntually
lead to different IVOPTs choices.  I've fixed a possible IVOPTs
issue on the way even though it doesn't make a difference here.

PR tree-optimization/116290
* tree-loop-distribution.cc (determine_reduction_stmt_1): PHIs
have no debug variants.  Start with first non-debug real stmt.
* tree-ssa-loop-ivopts.cc (find_givs_in_bb): Do not analyze
debug stmts.

* gcc.dg/pr116290.c: New testcase.
gcc/testsuite/gcc.dg/pr116290.c [new file with mode: 0644]
gcc/tree-loop-distribution.cc
gcc/tree-ssa-loop-ivopts.cc