https://gcc.gnu.org/g:5aa84759d9274e821ede14f2b42736a51a9e3a00
commit r16-5336-g5aa84759d9274e821ede14f2b42736a51a9e3a00 Author: Richard Biener <[email protected]> Date: Mon Nov 17 11:29:46 2025 +0100 Improve LIM dump and some testcases The following avoids the newline between 'Moving statement' and the actual stmt in dumps to make specific scanning easier. * tree-ssa-loop-im.cc (move_computations_worker): Avoid newline between 'Moving statement' and actual statement dump in dumpfile. * gcc.dg/vect/slp-9.c: Use noipa function attribute, drop -fno-early-inlining option. * c-c++-common/restrict-2.c: Explicitly look for hoisted loads. * gfortran.dg/pr104466.f90: Adjust. Diff: --- gcc/testsuite/c-c++-common/restrict-2.c | 2 +- gcc/testsuite/gcc.dg/vect/slp-9.c | 3 +-- gcc/testsuite/gfortran.dg/pr104466.f90 | 2 +- gcc/tree-ssa-loop-im.cc | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gcc/testsuite/c-c++-common/restrict-2.c b/gcc/testsuite/c-c++-common/restrict-2.c index ad19fb3f2d5e..940365cd5499 100644 --- a/gcc/testsuite/c-c++-common/restrict-2.c +++ b/gcc/testsuite/c-c++-common/restrict-2.c @@ -10,4 +10,4 @@ void foo (float * __restrict__ a, float * __restrict__ b, int n, int j) /* We should move the RHS of the store out of the loop. */ -/* { dg-final { scan-tree-dump-times "Moving statement" 11 "lim2" } } */ +/* { dg-final { scan-tree-dump-times "Moving statement _\[0-9\]+ = \\\*_" 2 "lim2" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/slp-9.c b/gcc/testsuite/gcc.dg/vect/slp-9.c index 4fb6953cced8..88697647f28d 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-9.c +++ b/gcc/testsuite/gcc.dg/vect/slp-9.c @@ -1,5 +1,4 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-additional-options "-fno-early-inlining" } */ #include <stdarg.h> #include "tree-vect.h" @@ -11,7 +10,7 @@ short Y[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))); int result[N]; /* short->int widening-mult */ -int +int __attribute__((noipa)) foo1(int len) { int i; diff --git a/gcc/testsuite/gfortran.dg/pr104466.f90 b/gcc/testsuite/gfortran.dg/pr104466.f90 index ec0e45866be8..bc14065b5638 100644 --- a/gcc/testsuite/gfortran.dg/pr104466.f90 +++ b/gcc/testsuite/gfortran.dg/pr104466.f90 @@ -113,4 +113,4 @@ END ! { dg-final { scan-tree-dump-not ": dependent" "lim2" } } -! { dg-final { scan-tree-dump "Moving statement\[\n\r\]_\[0-9\]+ = n" "lim2" } } +! { dg-final { scan-tree-dump "Moving statement _\[0-9\]+ = n" "lim2" } } diff --git a/gcc/tree-ssa-loop-im.cc b/gcc/tree-ssa-loop-im.cc index 4c0a46f93e63..c8f4676b6f66 100644 --- a/gcc/tree-ssa-loop-im.cc +++ b/gcc/tree-ssa-loop-im.cc @@ -1383,7 +1383,7 @@ move_computations_worker (basic_block bb) if (dump_file && (dump_flags & TDF_DETAILS)) { - fprintf (dump_file, "Moving statement\n"); + fprintf (dump_file, "Moving statement "); print_gimple_stmt (dump_file, stmt, 0); fprintf (dump_file, "(cost %u) out of loop %d.\n\n", cost, level->num);
