Commit 1da0876c by Richard Sandiford Committed by Richard Sandiford

tree-vect-stmts.c (vectorizable_store): Only chain one related statement per copy.

gcc/
	* tree-vect-stmts.c (vectorizable_store): Only chain one related
	statement per copy.

From-SVN: r172759
parent 25583c4f
2011-04-20 Richard Sandiford <richard.sandiford@linaro.org> 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. * Makefile.in (INTERNAL_FN_DEF, INTERNAL_FN_H): Define.
(GIMPLE_H): Include $(INTERNAL_FN_H). (GIMPLE_H): Include $(INTERNAL_FN_H).
(OBJS-common): Add internal-fn.o. (OBJS-common): Add internal-fn.o.
......
...@@ -3632,6 +3632,7 @@ vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, ...@@ -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); bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt, NULL_TREE);
} }
new_stmt = NULL;
if (strided_store) if (strided_store)
{ {
result_chain = VEC_alloc (tree, heap, group_size); result_chain = VEC_alloc (tree, heap, group_size);
...@@ -3688,16 +3689,18 @@ vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, ...@@ -3688,16 +3689,18 @@ vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
if (slp) if (slp)
continue; 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)); next_stmt = DR_GROUP_NEXT_DR (vinfo_for_stmt (next_stmt));
if (!next_stmt) if (!next_stmt)
break; 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); VEC_free (tree, heap, dr_chain);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment