aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-07-18 10:46:05 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-07-18 10:46:05 +0000
commit4c9bcf893467201acbdc6944c8c2d0cbe67972dc (patch)
treea29a811549836915e77e5838f455d345d6548dd7 /gcc/expr.c
parentb0f4a35f73d421cac856149de1756a51d833adb3 (diff)
downloadgcc-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.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 880e1bc..3ba5743 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -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. */