summaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.c
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2009-07-21 12:35:38 +0000
committerPaul Brook <pbrook@gcc.gnu.org>2009-07-21 12:35:38 +0000
commitcba146eb32a3ba66e1fbe1c9da7fb68788ca5b06 (patch)
treeb8eeb7763d8791aff99b58f9aee0b245a8fc13d0 /gcc/tree-vectorizer.c
parent309e9930efb67cd497365b487ff3f66b4d178e8f (diff)
downloadgcc-cba146eb32a3ba66e1fbe1c9da7fb68788ca5b06.tar.gz
tree-vectorizer.c (increase_alignment): Handle nested arrays.
2009-07-21 Paul Brook <paul@codesourcery.com> gcc/ * tree-vectorizer.c (increase_alignment): Handle nested arrays. Terminate debug dump with newline. gcc/testsuite/ * gcc.dg/vect/section-anchors-nest-1.c: New test. * lib/target-supports.exp (check_effective_target_section_anchors): Add arm*-*-*. From-SVN: r149853
Diffstat (limited to 'gcc/tree-vectorizer.c')
-rw-r--r--gcc/tree-vectorizer.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index 2c2103eda0a..90abbd76665 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -337,11 +337,13 @@ increase_alignment (void)
vnode = vnode->next_needed)
{
tree vectype, decl = vnode->decl;
+ tree t;
unsigned int alignment;
- if (TREE_CODE (TREE_TYPE (decl)) != ARRAY_TYPE)
+ t = TREE_TYPE(decl);
+ if (TREE_CODE (t) != ARRAY_TYPE)
continue;
- vectype = get_vectype_for_scalar_type (TREE_TYPE (TREE_TYPE (decl)));
+ vectype = get_vectype_for_scalar_type (strip_array_types (t));
if (!vectype)
continue;
alignment = TYPE_ALIGN (vectype);
@@ -356,6 +358,7 @@ increase_alignment (void)
{
fprintf (dump_file, "Increasing alignment of decl: ");
print_generic_expr (dump_file, decl, TDF_SLIM);
+ fprintf (dump_file, "\n");
}
}
}