From 5869faffd32c442675220851f371cc0173f6529b Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 28 Oct 2019 10:59:01 +0000 Subject: [PATCH] Fix unroll-and-jam.c on 32bit 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 | 5 +++++ gcc/testsuite/gcc.dg/unroll-and-jam.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 128679a..3fe8a78 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-28 Michael Matz + + PR middle-end/90796 + * gcc.dg/unroll-and-jam.c: Disable loop-invariant motion and adjust. + 2019-10-28 Ilya Leoshkevich PR rtl-optimization/92007 diff --git a/gcc/testsuite/gcc.dg/unroll-and-jam.c b/gcc/testsuite/gcc.dg/unroll-and-jam.c index bcfe1bd..7eb6421 100644 --- a/gcc/testsuite/gcc.dg/unroll-and-jam.c +++ b/gcc/testsuite/gcc.dg/unroll-and-jam.c @@ -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 @@ -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; \ -- 2.7.4