From: Richard Guenther Date: Mon, 28 Apr 2008 09:22:28 +0000 (+0000) Subject: re PR tree-optimization/34223 (missed optimization - complete unrolling pass before... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0e8d83837e0c00a7bd52deedd2e3ed691f703310;p=gcc.git re PR tree-optimization/34223 (missed optimization - complete unrolling pass before the vectorizer) 2008-04-28 Richard Guenther PR testsuite/34223 * gcc.dg/vect/vect-118.c: Rename to ... * gcc.dg/vect/O3-vect-pr34223.c: ... this. From-SVN: r134747 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 78d868bd0e2..c15f9739ac6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2008-04-28 Richard Guenther + + PR testsuite/34223 + * gcc.dg/vect/vect-118.c: Rename to ... + * gcc.dg/vect/O3-vect-pr34223.c: ... this. + 2008-04-28 Richard Guenther PR tree-optimization/36066 diff --git a/gcc/testsuite/gcc.dg/vect/O3-vect-pr34223.c b/gcc/testsuite/gcc.dg/vect/O3-vect-pr34223.c new file mode 100644 index 00000000000..22ce72c75fe --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/O3-vect-pr34223.c @@ -0,0 +1,33 @@ +/* { dg-require-effective-target vect_int } */ + +#include "tree-vect.h" + +#define M 10 +#define N 3 + +void __attribute__((noinline)) +foo (int n, int *ub, int *uc) +{ + int i, j, tmp1; + + for (i = 0; i < n; i++) + { + tmp1 = 0; + for (j = 0; j < M; j++) + { + tmp1 += uc[i] * ((int)(j << N) / M); + } + ub[i] = tmp1; + } +} + +int main() +{ + int uc[16], ub[16]; + check_vect (); + foo (16, uc, ub); + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-118.c b/gcc/testsuite/gcc.dg/vect/vect-118.c deleted file mode 100644 index 6c0268cc78c..00000000000 --- a/gcc/testsuite/gcc.dg/vect/vect-118.c +++ /dev/null @@ -1,34 +0,0 @@ -/* { dg-require-effective-target vect_int } */ -/* { dg-options "-O3 -fdump-tree-vect-details" } */ - -#include "tree-vect.h" - -#define M 10 -#define N 3 - -void __attribute__((noinline)) -foo (int n, int *ub, int *uc) -{ - int i, j, tmp1; - - for (i = 0; i < n; i++) - { - tmp1 = 0; - for (j = 0; j < M; j++) - { - tmp1 += uc[i] * ((int)(j << N) / M); - } - ub[i] = tmp1; - } -} - -int main() -{ - int uc[16], ub[16]; - check_vect (); - foo (16, uc, ub); - return 0; -} - -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { cleanup-tree-dump "vect" } } */