From afa38a953b6a862b3c5cb5632981a3b2d61969c3 Mon Sep 17 00:00:00 2001 From: Dorit Nuzman Date: Sun, 26 Feb 2006 09:27:35 +0000 Subject: re PR tree-optimization/26359 (Over optimization of loop when using -ftree-vectorize) PR tree-optimization/26359 * tree-ssa-alias.c (new_type_alias): Set fields for new tag. From-SVN: r111451 --- gcc/ChangeLog | 5 +++++ gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.dg/vect/dump-tree-dceloop-pr26359.c | 16 ++++++++++++++++ gcc/testsuite/gcc.dg/vect/vect.exp | 6 ++++++ gcc/tree-ssa-alias.c | 3 +++ 5 files changed, 37 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/vect/dump-tree-dceloop-pr26359.c (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 526af5d..84c278d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2006-02-26 Dorit Nuzman + + PR tree-optimization/26359 + * tree-ssa-alias.c (new_type_alias): Set fields for new tag. + 2006-02-25 Roger Sayle * simplify-rtx.c (simplify_relational_operation_1): Simplify diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9656f4e..b75722d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2006-02-26 Dorit Nuzman + + PR tree-optimizations/26359 + * gcc.dg/vect/vect.exp: Compile tests prefixed with "dump-tree-dceloop" + with -fdump-tree-dceloop-details. + * gcc.dg/vect/dump-tree-dceloop-pr26359.c: New test. + 2006-02-25 Roger Sayle PR middle-end/23673 diff --git a/gcc/testsuite/gcc.dg/vect/dump-tree-dceloop-pr26359.c b/gcc/testsuite/gcc.dg/vect/dump-tree-dceloop-pr26359.c new file mode 100644 index 0000000..6ec068c --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/dump-tree-dceloop-pr26359.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_int } */ + +int a[256], b[256], c[256]; + +foo () { + int i; + + for (i=0; i<256; i++){ + a[i] = b[i] + c[i]; + } +} + +/* { dg-final { scan-tree-dump-times "Deleting : vect_" 0 "dceloop" } } */ +/* { dg-final { cleanup-tree-dump "dceloop" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect.exp b/gcc/testsuite/gcc.dg/vect/vect.exp index 9cf78ff..eddb5b9 100644 --- a/gcc/testsuite/gcc.dg/vect/vect.exp +++ b/gcc/testsuite/gcc.dg/vect/vect.exp @@ -108,6 +108,12 @@ lappend DEFAULT_VECTCFLAGS "-ftrapv" dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/trapv-vect*.\[cS\]]] \ "" $DEFAULT_VECTCFLAGS +# -fdump-tree-dceloop-details tests +set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS +lappend DEFAULT_VECTCFLAGS "-fdump-tree-dceloop-details" +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/dump-tree-dceloop-*.\[cS\]]] \ + "" $DEFAULT_VECTCFLAGS + # With -Os lappend DEFAULT_VECTCFLAGS "-Os" dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/Os-vect-*.\[cS\]]] \ diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index a32c843..fe69198 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -2712,6 +2712,9 @@ new_type_alias (tree ptr, tree var) add_may_alias (tag, al); } } + + TREE_READONLY (tag) = TREE_READONLY (var); + MTAG_GLOBAL (tag) = is_global_var (var); } -- cgit v1.1