Fix unroll-and-jam.c on 32bit
authorMichael Matz <matz@suse.de>
Mon, 28 Oct 2019 10:59:01 +0000 (10:59 +0000)
committerMichael Matz <matz@gcc.gnu.org>
Mon, 28 Oct 2019 10:59:01 +0000 (10:59 +0000)
where LIM interacts with foo10.  On 64bit LIM doesn't do the problematic
change for whatever reason, but it seems better to disable LIM
alltogether, which requires a minor change in the testcase.

From-SVN: r277508

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/unroll-and-jam.c

index 128679a..3fe8a78 100644 (file)
@@ -1,3 +1,8 @@
+2019-10-28  Michael Matz  <matz@suse.de>
+
+       PR middle-end/90796
+       * gcc.dg/unroll-and-jam.c: Disable loop-invariant motion and adjust.
+
 2019-10-28  Ilya Leoshkevich  <iii@linux.ibm.com>
 
        PR rtl-optimization/92007
index bcfe1bd..7eb6421 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "-O3 -floop-unroll-and-jam --param unroll-jam-min-percent=0 -fdump-tree-unrolljam-details" } */
+/* { dg-options "-O3 -floop-unroll-and-jam -fno-tree-loop-im --param unroll-jam-min-percent=0 -fdump-tree-unrolljam-details" } */
 /* { dg-require-effective-target int32plus } */
 
 #include <stdio.h>
@@ -31,10 +31,10 @@ void checkb(void)
   //printf("  %d\n", sum);
 }
 
-unsigned i, j;
 #define TEST(name, body, test) \
 static void __attribute__((noinline,noclone)) name (unsigned long n, unsigned long m) \
 { \
+  unsigned i, j; \
   for (i = 1; i < m; i++) { \
       for (j = 1; j < n; j++) { \
          body; \