re PR tree-optimization/65310 (vectorizer uses wrong alignment)
authorRichard Biener <rguenther@suse.de>
Wed, 11 Mar 2015 15:09:51 +0000 (15:09 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 11 Mar 2015 15:09:51 +0000 (15:09 +0000)
2015-03-11  Richard Biener  <rguenther@suse.de>

PR tree-optimization/65310
* tree-sra.c (build_ref_for_offset): Also preserve larger
alignment.

From-SVN: r221348

gcc/ChangeLog
gcc/tree-sra.c

index 4a7f788147278a11fd440bfa89fba52b703cc564..3e91636b16db00c5f42cc15d5535a2d786812f99 100644 (file)
@@ -1,3 +1,9 @@
+2015-03-11  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/65310
+       * tree-sra.c (build_ref_for_offset): Also preserve larger
+       alignment.
+
 2015-03-11  Marat Zakirov  <m.zakirov@samsung.com>
 
        * asan.c (instrument_derefs): Disable instrumentation on asan-globals=0.
index 3527a47256cadb1ae4a185277f4330a25942cf26..a49e9504e125df6e7c23894ea35b0b0f00981386 100644 (file)
@@ -1597,7 +1597,7 @@ build_ref_for_offset (location_t loc, tree base, HOST_WIDE_INT offset,
   misalign = (misalign + offset) & (align - 1);
   if (misalign != 0)
     align = (misalign & -misalign);
-  if (align < TYPE_ALIGN (exp_type))
+  if (align != TYPE_ALIGN (exp_type))
     exp_type = build_aligned_type (exp_type, align);
 
   mem_ref = fold_build2_loc (loc, MEM_REF, exp_type, base, off);