re PR tree-optimization/26359 (Over optimization of loop when using -ftree-vectorize)
authorDorit Nuzman <dorit@il.ibm.com>
Sun, 26 Feb 2006 09:27:35 +0000 (09:27 +0000)
committerDorit Nuzman <dorit@gcc.gnu.org>
Sun, 26 Feb 2006 09:27:35 +0000 (09:27 +0000)
        PR tree-optimization/26359
        * tree-ssa-alias.c (new_type_alias): Set fields for new tag.

From-SVN: r111451

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/dump-tree-dceloop-pr26359.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect.exp
gcc/tree-ssa-alias.c

index 526af5d7054dae73d4ecfa0fe24abddb63a7ceb8..84c278de5e77035dd6158ac8b66d2b3f5d88250a 100644 (file)
@@ -1,3 +1,8 @@
+2006-02-26  Dorit Nuzman  <dorit@il.ibm.com>
+
+       PR tree-optimization/26359
+       * tree-ssa-alias.c (new_type_alias): Set fields for new tag.
+
 2006-02-25  Roger Sayle  <roger@eyesopen.com>
 
        * simplify-rtx.c (simplify_relational_operation_1):  Simplify
index 9656f4ee3ffafcb2456b4f6063696b0cc4b1e4f8..b75722d071b78ae41c5be0e9561c767421b09649 100644 (file)
@@ -1,3 +1,10 @@
+2006-02-26  Dorit Nuzman  <dorit@il.ibm.com>
+
+       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  <roger@eyesopen.com>
 
        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 (file)
index 0000000..6ec068c
--- /dev/null
@@ -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" } } */
index 9cf78ff85192d0737932be260949f03dbc3551c6..eddb5b9b3c89bca0ae375821dd20ee3cec803380 100644 (file)
@@ -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\]]]  \
index a32c8439657584b4caca43baa67ecd3b545eec65..fe69198b2f2232f62dff4a39b175c635a3562b84 100644 (file)
@@ -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);
 }