tree-vectorizer.c (vect_can_force_dr_alignment_p): Return false for decls that are...
authorDorit Naishlos <dorit@il.ibm.com>
Tue, 30 Nov 2004 13:19:54 +0000 (13:19 +0000)
committerDorit Nuzman <dorit@gcc.gnu.org>
Tue, 30 Nov 2004 13:19:54 +0000 (13:19 +0000)
* tree-vectorizer.c (vect_can_force_dr_alignment_p): Return false for
decls that are assembled before vectorization takes place.
(vect_compute_data_ref_alignment): Set DECL_USER_ALIGN to 1.

From-SVN: r91517

gcc/ChangeLog
gcc/tree-vectorizer.c

index ff6a404d837ea39ad514a413a3142921b0ccb275..bade2ffd7173d4649335fb81386bef3d3ab9fd3b 100644 (file)
@@ -1,3 +1,10 @@
+2004-11-30  Dorit Naishlos  <dorit@il.ibm.com>
+
+       PR tree-opt/18173
+       * tree-vectorizer.c (vect_can_force_dr_alignment_p): Return false for
+       decls that are assembled before vectorization takes place.
+       (vect_compute_data_ref_alignment): Set DECL_USER_ALIGN to 1.    
+
 2004-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * passes.c (rest_of_handle_old_regalloc): Delete unreachable blocks
index 57739931bebeb98d2cda5e6eb1445d0066a4e7ae..d476d813ff2789c21ca59bc618d89602a6a4643a 100644 (file)
@@ -1509,6 +1509,9 @@ vect_can_force_dr_alignment_p (tree decl, unsigned int alignment)
   if (DECL_EXTERNAL (decl))
     return false;
 
+  if (TREE_ASM_WRITTEN (decl))
+    return false;
+
   if (TREE_STATIC (decl))
     return (alignment <= MAX_OFILE_ALIGNMENT);
   else
@@ -4130,7 +4133,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr,
       if (vect_debug_details (NULL))
        fprintf (dump_file, "force alignment");
       DECL_ALIGN (base) = TYPE_ALIGN (vectype);
-      DECL_USER_ALIGN (base) = TYPE_ALIGN (vectype);
+      DECL_USER_ALIGN (base) = 1;
     }
 
   /* At this point we assume that the base is aligned, and the offset from it