From: Mike Stump Date: Thu, 15 Jan 2015 18:21:51 +0000 (+0000) Subject: unroll_1.c: Rename gcc.dg/unroll_[1-5].c to unroll-[2-6]. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1357c6e1675c5fd1729128d1873fc4ef375747b8;p=gcc.git unroll_1.c: Rename gcc.dg/unroll_[1-5].c to unroll-[2-6]. * gcc.dg/unroll_1.c: Rename gcc.dg/unroll_[1-5].c to unroll-[2-6]. * gcc.dg/unroll_2.c: Likewise. * gcc.dg/unroll_3.c: Likewise. * gcc.dg/unroll_4.c: Likewise. * gcc.dg/unroll_5.c: Likewise. From-SVN: r219675 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 63f3f90fcbe..b54bd8a3ded 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2015-01-15 Mike Stump + + * gcc.dg/unroll_1.c: Rename gcc.dg/unroll_[1-5].c to unroll-[2-6]. + * gcc.dg/unroll_2.c: Likewise. + * gcc.dg/unroll_3.c: Likewise. + * gcc.dg/unroll_4.c: Likewise. + * gcc.dg/unroll_5.c: Likewise. + 2015-01-15 Tejas Belagod PR target/63971 diff --git a/gcc/testsuite/gcc.dg/unroll-2.c b/gcc/testsuite/gcc.dg/unroll-2.c new file mode 100644 index 00000000000..7c9495d0261 --- /dev/null +++ b/gcc/testsuite/gcc.dg/unroll-2.c @@ -0,0 +1,30 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-cunrolli-details=stderr -fno-peel-loops -fno-tree-vrp -fdisable-tree-cunroll -fenable-tree-cunrolli" } */ + +unsigned a[100], b[100]; +inline void bar() +{ + a[10] = b[10]; +} + +int foo(void) +{ + int i; + bar(); + for (i = 0; i < 2; i++) /* { dg-message "note: loop with 3 iterations completely unrolled" } */ + { + a[i]= b[i] + 1; + } + return 1; +} + +int foo2(void) +{ + int i; + for (i = 0; i < 2; i++) /* { dg-message "note: loop with 3 iterations completely unrolled" } */ + { + a[i]= b[i] + 1; + } + return 1; +} +/* { dg-prune-output ".*" } */ diff --git a/gcc/testsuite/gcc.dg/unroll-3.c b/gcc/testsuite/gcc.dg/unroll-3.c new file mode 100644 index 00000000000..d3b9637fa6a --- /dev/null +++ b/gcc/testsuite/gcc.dg/unroll-3.c @@ -0,0 +1,32 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-cunrolli-details -fno-peel-loops -fno-tree-vrp -fdisable-tree-cunrolli=foo -fenable-tree-cunrolli=foo" } */ + +unsigned a[100], b[100]; +inline void bar() +{ + a[10] = b[10]; +} + +int foo(void) +{ + int i; + bar(); + for (i = 0; i < 2; i++) + { + a[i]= b[i] + 1; + } + return 1; +} + +int foo2(void) +{ + int i; + for (i = 0; i < 2; i++) + { + a[i]= b[i] + 1; + } + return 1; +} + +/* { dg-final { scan-tree-dump-times "loop with 3 iterations completely unrolled" 1 "cunrolli" } } */ +/* { dg-final { cleanup-tree-dump "cunrolli" } } */ diff --git a/gcc/testsuite/gcc.dg/unroll-4.c b/gcc/testsuite/gcc.dg/unroll-4.c new file mode 100644 index 00000000000..01378618ad4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/unroll-4.c @@ -0,0 +1,32 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-cunrolli-details -fno-peel-loops -fno-tree-vrp -fdisable-tree-cunroll -fenable-tree-cunrolli=foo -fdisable-tree-cunrolli=foo2" } */ + +unsigned a[100], b[100]; +inline void bar() +{ + a[10] = b[10]; +} + +int foo(void) +{ + int i; + bar(); + for (i = 0; i < 2; i++) + { + a[i]= b[i] + 1; + } + return 1; +} + +int foo2(void) +{ + int i; + for (i = 0; i < 2; i++) + { + a[i]= b[i] + 1; + } + return 1; +} + +/* { dg-final { scan-tree-dump-times "loop with 3 iterations completely unrolled" 1 "cunrolli" } } */ +/* { dg-final { cleanup-tree-dump "cunrolli" } } */ diff --git a/gcc/testsuite/gcc.dg/unroll-5.c b/gcc/testsuite/gcc.dg/unroll-5.c new file mode 100644 index 00000000000..679d8f916b6 --- /dev/null +++ b/gcc/testsuite/gcc.dg/unroll-5.c @@ -0,0 +1,32 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-cunrolli-details -fno-peel-loops -fno-tree-vrp -fdisable-tree-cunroll -fenable-tree-cunrolli=foo2 -fdisable-tree-cunrolli=foo" } */ + +unsigned a[100], b[100]; +inline void bar() +{ + a[10] = b[10]; +} + +int foo(void) +{ + int i; + bar(); + for (i = 0; i < 2; i++) + { + a[i]= b[i] + 1; + } + return 1; +} + +int foo2(void) +{ + int i; + for (i = 0; i < 2; i++) + { + a[i]= b[i] + 1; + } + return 1; +} + +/* { dg-final { scan-tree-dump-times "loop with 3 iterations completely unrolled" 1 "cunrolli" } } */ +/* { dg-final { cleanup-tree-dump "cunrolli" } } */ diff --git a/gcc/testsuite/gcc.dg/unroll-6.c b/gcc/testsuite/gcc.dg/unroll-6.c new file mode 100644 index 00000000000..edb9c26a685 --- /dev/null +++ b/gcc/testsuite/gcc.dg/unroll-6.c @@ -0,0 +1,35 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -fdump-rtl-loop2_unroll -funroll-loops" } */ +/* { dg-require-effective-target int32plus } */ + +void abort (void); +int *a; +/* Fails on MIPS16 because equality checks are implemented using XOR. + It's unlikely MIPS16 users would want unrolling anyway. */ +#ifdef __mips +__attribute__((nomips16)) +#endif +int t() +{ + int i; + for (i=0;i<1000000;i++) + if (a[i]) + return 1; + return 0; +} +#ifdef __mips +__attribute__((nomips16)) +#endif +int t2() +{ + int i; + for (i=0;i<3000000;i++) + if (a[i]) + abort (); + return 0; +} +/* { dg-final { scan-rtl-dump-times "upper bound: 999999" 1 "loop2_unroll" } } */ +/* { dg-final { scan-rtl-dump-not "realistic bound: 999999" "loop2_unroll" } } */ +/* { dg-final { scan-rtl-dump-times "upper bound: 2999999" 1 "loop2_unroll" } } */ +/* { dg-final { scan-rtl-dump-times "realistic bound: 2999999" 1 "loop2_unroll" } } */ +/* { dg-final { cleanup-rtl-dump "loop2_unroll" } } */ diff --git a/gcc/testsuite/gcc.dg/unroll_1.c b/gcc/testsuite/gcc.dg/unroll_1.c deleted file mode 100644 index 7c9495d0261..00000000000 --- a/gcc/testsuite/gcc.dg/unroll_1.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-cunrolli-details=stderr -fno-peel-loops -fno-tree-vrp -fdisable-tree-cunroll -fenable-tree-cunrolli" } */ - -unsigned a[100], b[100]; -inline void bar() -{ - a[10] = b[10]; -} - -int foo(void) -{ - int i; - bar(); - for (i = 0; i < 2; i++) /* { dg-message "note: loop with 3 iterations completely unrolled" } */ - { - a[i]= b[i] + 1; - } - return 1; -} - -int foo2(void) -{ - int i; - for (i = 0; i < 2; i++) /* { dg-message "note: loop with 3 iterations completely unrolled" } */ - { - a[i]= b[i] + 1; - } - return 1; -} -/* { dg-prune-output ".*" } */ diff --git a/gcc/testsuite/gcc.dg/unroll_2.c b/gcc/testsuite/gcc.dg/unroll_2.c deleted file mode 100644 index d3b9637fa6a..00000000000 --- a/gcc/testsuite/gcc.dg/unroll_2.c +++ /dev/null @@ -1,32 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-cunrolli-details -fno-peel-loops -fno-tree-vrp -fdisable-tree-cunrolli=foo -fenable-tree-cunrolli=foo" } */ - -unsigned a[100], b[100]; -inline void bar() -{ - a[10] = b[10]; -} - -int foo(void) -{ - int i; - bar(); - for (i = 0; i < 2; i++) - { - a[i]= b[i] + 1; - } - return 1; -} - -int foo2(void) -{ - int i; - for (i = 0; i < 2; i++) - { - a[i]= b[i] + 1; - } - return 1; -} - -/* { dg-final { scan-tree-dump-times "loop with 3 iterations completely unrolled" 1 "cunrolli" } } */ -/* { dg-final { cleanup-tree-dump "cunrolli" } } */ diff --git a/gcc/testsuite/gcc.dg/unroll_3.c b/gcc/testsuite/gcc.dg/unroll_3.c deleted file mode 100644 index 01378618ad4..00000000000 --- a/gcc/testsuite/gcc.dg/unroll_3.c +++ /dev/null @@ -1,32 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-cunrolli-details -fno-peel-loops -fno-tree-vrp -fdisable-tree-cunroll -fenable-tree-cunrolli=foo -fdisable-tree-cunrolli=foo2" } */ - -unsigned a[100], b[100]; -inline void bar() -{ - a[10] = b[10]; -} - -int foo(void) -{ - int i; - bar(); - for (i = 0; i < 2; i++) - { - a[i]= b[i] + 1; - } - return 1; -} - -int foo2(void) -{ - int i; - for (i = 0; i < 2; i++) - { - a[i]= b[i] + 1; - } - return 1; -} - -/* { dg-final { scan-tree-dump-times "loop with 3 iterations completely unrolled" 1 "cunrolli" } } */ -/* { dg-final { cleanup-tree-dump "cunrolli" } } */ diff --git a/gcc/testsuite/gcc.dg/unroll_4.c b/gcc/testsuite/gcc.dg/unroll_4.c deleted file mode 100644 index 679d8f916b6..00000000000 --- a/gcc/testsuite/gcc.dg/unroll_4.c +++ /dev/null @@ -1,32 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-cunrolli-details -fno-peel-loops -fno-tree-vrp -fdisable-tree-cunroll -fenable-tree-cunrolli=foo2 -fdisable-tree-cunrolli=foo" } */ - -unsigned a[100], b[100]; -inline void bar() -{ - a[10] = b[10]; -} - -int foo(void) -{ - int i; - bar(); - for (i = 0; i < 2; i++) - { - a[i]= b[i] + 1; - } - return 1; -} - -int foo2(void) -{ - int i; - for (i = 0; i < 2; i++) - { - a[i]= b[i] + 1; - } - return 1; -} - -/* { dg-final { scan-tree-dump-times "loop with 3 iterations completely unrolled" 1 "cunrolli" } } */ -/* { dg-final { cleanup-tree-dump "cunrolli" } } */ diff --git a/gcc/testsuite/gcc.dg/unroll_5.c b/gcc/testsuite/gcc.dg/unroll_5.c deleted file mode 100644 index edb9c26a685..00000000000 --- a/gcc/testsuite/gcc.dg/unroll_5.c +++ /dev/null @@ -1,35 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O3 -fdump-rtl-loop2_unroll -funroll-loops" } */ -/* { dg-require-effective-target int32plus } */ - -void abort (void); -int *a; -/* Fails on MIPS16 because equality checks are implemented using XOR. - It's unlikely MIPS16 users would want unrolling anyway. */ -#ifdef __mips -__attribute__((nomips16)) -#endif -int t() -{ - int i; - for (i=0;i<1000000;i++) - if (a[i]) - return 1; - return 0; -} -#ifdef __mips -__attribute__((nomips16)) -#endif -int t2() -{ - int i; - for (i=0;i<3000000;i++) - if (a[i]) - abort (); - return 0; -} -/* { dg-final { scan-rtl-dump-times "upper bound: 999999" 1 "loop2_unroll" } } */ -/* { dg-final { scan-rtl-dump-not "realistic bound: 999999" "loop2_unroll" } } */ -/* { dg-final { scan-rtl-dump-times "upper bound: 2999999" 1 "loop2_unroll" } } */ -/* { dg-final { scan-rtl-dump-times "realistic bound: 2999999" 1 "loop2_unroll" } } */ -/* { dg-final { cleanup-rtl-dump "loop2_unroll" } } */