summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-20 08:23:03 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-20 08:23:03 +0000
commit63fd99dbecc129a9a3f39a6c026d2083c6cc402c (patch)
tree201a53d6d89c1c0dfaa08f2124484735059dcf88
parentfb049fbac341de8b83c1e9aef4855ab69697430a (diff)
downloadgcc-63fd99dbecc129a9a3f39a6c026d2083c6cc402c.tar.gz
gcc/
* tree-vect-stmts.c (vectorizable_store): Only chain one related statement per copy. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172759 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-vect-stmts.c15
2 files changed, 14 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e9b126bbd63..3474847c9d1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2011-04-20 Richard Sandiford <richard.sandiford@linaro.org>
+ * tree-vect-stmts.c (vectorizable_store): Only chain one related
+ statement per copy.
+
+2011-04-20 Richard Sandiford <richard.sandiford@linaro.org>
+
* Makefile.in (INTERNAL_FN_DEF, INTERNAL_FN_H): Define.
(GIMPLE_H): Include $(INTERNAL_FN_H).
(OBJS-common): Add internal-fn.o.
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 0c7ab5ada88..879153d8031 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -3632,6 +3632,7 @@ vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt, NULL_TREE);
}
+ new_stmt = NULL;
if (strided_store)
{
result_chain = VEC_alloc (tree, heap, group_size);
@@ -3688,16 +3689,18 @@ vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
if (slp)
continue;
- if (j == 0)
- STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt = new_stmt;
- else
- STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
-
- prev_stmt_info = vinfo_for_stmt (new_stmt);
next_stmt = DR_GROUP_NEXT_DR (vinfo_for_stmt (next_stmt));
if (!next_stmt)
break;
}
+ if (!slp)
+ {
+ if (j == 0)
+ STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt = new_stmt;
+ else
+ STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
+ prev_stmt_info = vinfo_for_stmt (new_stmt);
+ }
}
VEC_free (tree, heap, dr_chain);