diff options
author | Richard Guenther <rguenther@suse.de> | 2012-07-18 10:46:05 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-07-18 10:46:05 +0000 |
commit | 4c9bcf893467201acbdc6944c8c2d0cbe67972dc (patch) | |
tree | a29a811549836915e77e5838f455d345d6548dd7 /gcc/expr.c | |
parent | b0f4a35f73d421cac856149de1756a51d833adb3 (diff) | |
download | gcc-4c9bcf893467201acbdc6944c8c2d0cbe67972dc.zip gcc-4c9bcf893467201acbdc6944c8c2d0cbe67972dc.tar.gz gcc-4c9bcf893467201acbdc6944c8c2d0cbe67972dc.tar.bz2 |
re PR tree-optimization/53970 (-ftree-vectorization does not handle well unaligned data)
2012-07-18 Richard Guenther <rguenther@suse.de>
PR tree-optimization/53970
* tree.h (contains_packed_reference): Remove.
* expr.c (contains_packed_reference): Likewise.
* tree-vect-data-refs.c (not_size_aligned): New function.
(vector_alignment_reachable_p): Use it.
(vect_supportable_dr_alignment): Likewise.
* g++.dg/torture/pr53970.C: New testcase.
From-SVN: r189609
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 41 |
1 files changed, 0 insertions, 41 deletions
@@ -6709,47 +6709,6 @@ get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize, return exp; } -/* Given an expression EXP that may be a COMPONENT_REF, an ARRAY_REF or an - ARRAY_RANGE_REF, look for whether EXP or any nested component-refs within - EXP is marked as PACKED. */ - -bool -contains_packed_reference (const_tree exp) -{ - bool packed_p = false; - - while (1) - { - switch (TREE_CODE (exp)) - { - case COMPONENT_REF: - { - tree field = TREE_OPERAND (exp, 1); - packed_p = DECL_PACKED (field) - || TYPE_PACKED (TREE_TYPE (field)) - || TYPE_PACKED (TREE_TYPE (exp)); - if (packed_p) - goto done; - } - break; - - case BIT_FIELD_REF: - case ARRAY_REF: - case ARRAY_RANGE_REF: - case REALPART_EXPR: - case IMAGPART_EXPR: - case VIEW_CONVERT_EXPR: - break; - - default: - goto done; - } - exp = TREE_OPERAND (exp, 0); - } - done: - return packed_p; -} - /* Return a tree of sizetype representing the size, in bytes, of the element of EXP, an ARRAY_REF or an ARRAY_RANGE_REF. */ |