diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-04-08 13:38:19 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-04-08 13:38:19 +0200 |
commit | 554f1948b9c4fdbf3920666dc5b2814fe821b627 (patch) | |
tree | bf2fe054bea423fc3d65be0e7b74f00fc932add1 /gcc/tree-vect-data-refs.c | |
parent | ddf723888e5a2cd7714832efb90ada82713a66e0 (diff) | |
download | gcc-554f1948b9c4fdbf3920666dc5b2814fe821b627.zip gcc-554f1948b9c4fdbf3920666dc5b2814fe821b627.tar.gz gcc-554f1948b9c4fdbf3920666dc5b2814fe821b627.tar.bz2 |
re PR tree-optimization/48377 (miscompilation at -O3)
PR tree-optimization/48377
* tree-vect-data-refs.c (vector_alignment_reachable_p): Set
is_packed to true even for types with smaller TYPE_ALIGN than
TYPE_SIZE.
* gcc.dg/vect/pr48377.c: New test.
From-SVN: r172172
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r-- | gcc/tree-vect-data-refs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 8f41114..760bc41 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -1,5 +1,5 @@ /* Data References Analysis and Manipulation Utilities for Vectorization. - Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Dorit Naishlos <dorit@il.ibm.com> and Ira Rosen <irar@il.ibm.com> @@ -1110,6 +1110,9 @@ vector_alignment_reachable_p (struct data_reference *dr) if (ba) is_packed = contains_packed_reference (ba); + if (compare_tree_int (TYPE_SIZE (type), TYPE_ALIGN (type)) > 0) + is_packed = true; + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "Unknown misalignment, is_packed = %d",is_packed); if (targetm.vectorize.vector_alignment_reachable (type, is_packed)) |