tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use get_pointer_alignment...
authorJakub Jelinek <jakub@redhat.com>
Thu, 23 Jun 2011 18:52:58 +0000 (20:52 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 23 Jun 2011 18:52:58 +0000 (20:52 +0200)
* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
get_pointer_alignment to see if base isn't sufficiently aligned.

From-SVN: r175348

gcc/ChangeLog
gcc/tree-vect-data-refs.c

index 1d1dbd1d9581a3cc62423aea26232de15f7739cf..fad096696688c80be5ddbb5d434a518f4174c083 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-23  Jakub Jelinek  <jakub@redhat.com>
+
+       * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
+       get_pointer_alignment to see if base isn't sufficiently aligned.
+
 2011-06-23  Jan Hubicka  <jh@suse.cz>
 
        PR tree-optimize/49373
index c98eb13b225c5b0714696eb8be1fde0e3c01ceb6..9a2c5b627e5923e22277c81fcf918bd2cae0cf25 100644 (file)
@@ -859,7 +859,9 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
       || (TREE_CODE (base_addr) == SSA_NAME
          && tree_int_cst_compare (ssize_int (TYPE_ALIGN_UNIT (TREE_TYPE (
                                                      TREE_TYPE (base_addr)))),
-                                  alignment) >= 0))
+                                  alignment) >= 0)
+      || (get_pointer_alignment (base_addr, TYPE_ALIGN (vectype))
+         >= TYPE_ALIGN (vectype)))
     base_aligned = true;
   else
     base_aligned = false;