]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Improve LIM dump and some testcases
authorRichard Biener <rguenther@suse.de>
Mon, 17 Nov 2025 10:29:46 +0000 (11:29 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 17 Nov 2025 12:09:43 +0000 (13:09 +0100)
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.

gcc/testsuite/c-c++-common/restrict-2.c
gcc/testsuite/gcc.dg/vect/slp-9.c
gcc/testsuite/gfortran.dg/pr104466.f90
gcc/tree-ssa-loop-im.cc

index ad19fb3f2d5e5f58a78b91804690f29ab002ec85..940365cd5499d0c3922f88bbffdce7e9e1760d39 100644 (file)
@@ -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" } } */
index 4fb6953cced876c2a1e5761b0f94968c5774da9e..88697647f28d2b7afc93f132fb4df324fee03268 100644 (file)
@@ -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;
 
index ec0e45866be830b642057e292c6371cbfdb98634..bc14065b563849be2c6f2c97182555b37fafeefa 100644 (file)
       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" } }
index 4c0a46f93e63e8b3fbd9cf1621c53d5604045e3c..c8f4676b6f66781d832da84011b614390259c531 100644 (file)
@@ -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);