PR tree-optimization/39529
authorirar <irar@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 Mar 2009 12:18:19 +0000 (12:18 +0000)
committerirar <irar@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 Mar 2009 12:18:19 +0000 (12:18 +0000)
* tree-vect-transform.c (vect_create_data_ref_ptr): Call
mark_sym_for_renaming for the tag copied to the new vector
pointer.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145029 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr39529.c [new file with mode: 0644]
gcc/tree-vect-transform.c

index 6974b1f..c7aeb48 100644 (file)
@@ -1,3 +1,10 @@
+2009-03-24  Ira Rosen  <irar@il.ibm.com>
+
+       PR tree-optimization/39529
+       * tree-vect-transform.c (vect_create_data_ref_ptr): Call
+       mark_sym_for_renaming for the tag copied to the new vector
+       pointer.
+
 2009-03-24  Arthur Loiret  <aloiret@debian.org>
 
        * config.host (alpha*-*-linux*): Use driver-alpha.o and
index 4f869a0..196a040 100644 (file)
@@ -1,3 +1,8 @@
+2009-03-24  Ira Rosen  <irar@il.ibm.com>
+
+       PR tree-optimization/39529
+       * gcc.dg/vect/pr39529.c: New test.
+
 2009-03-24  Dodji Seketeli  <dodji@redhat.com>
            Jakub Jelinek  <jakub@redhat.com>
 
diff --git a/gcc/testsuite/gcc.dg/vect/pr39529.c b/gcc/testsuite/gcc.dg/vect/pr39529.c
new file mode 100644 (file)
index 0000000..4853c13
--- /dev/null
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+
+void
+foo (void)
+{
+  char a[1024];
+  char *p = &a[0];
+  char *p2;
+
+  p2 = p + 1024;
+  do
+    {
+      p += 2;
+      *(p-2) = 1;
+      *(p-1) = 1;
+    } while (p < p2);
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
+
index 2afd4e0..a048342 100644 (file)
@@ -1099,7 +1099,10 @@ vect_create_data_ref_ptr (gimple stmt, struct loop *at_loop,
   if (!MTAG_P (tag))
     new_type_alias (vect_ptr, tag, DR_REF (dr));
   else
-    set_symbol_mem_tag (vect_ptr, tag);
+    {
+      set_symbol_mem_tag (vect_ptr, tag);
+      mark_sym_for_renaming (tag);
+    }
 
   /** Note: If the dataref is in an inner-loop nested in LOOP, and we are
       vectorizing LOOP (i.e. outer-loop vectorization), we need to create two