summaryrefslogtreecommitdiff
path: root/gcc/tree-vect-stmts.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-16 09:54:36 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-16 09:54:36 +0000
commit3e299f5d579987370d4824ff79b0b33868d7cdf4 (patch)
tree222248ef75fc9b6a3c7c0bfe3657c6acaef2e6b2 /gcc/tree-vect-stmts.c
parent1e84c1e0ecaff35acdc7bab1fa5dd61244678e9b (diff)
downloadgcc-3e299f5d579987370d4824ff79b0b33868d7cdf4.tar.gz
2012-03-16 Richard Guenther <rguenther@suse.de>
* tree-vect-loop.c (get_initial_def_for_induction): Use build_constructor directly. * tree-vect-stmts.c (vect_get_vec_def_for_operand): Use build_vector_from_val. * tree.c (build_vector_from_val): Avoid creating a constructor first when we want a constant vector. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185461 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r--gcc/tree-vect-stmts.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 13859aff0b2..8a1c6788e50 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -1227,9 +1227,7 @@ vect_get_vec_def_for_operand (tree op, gimple stmt, tree *scalar_def)
loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo);
tree vec_inv;
tree vec_cst;
- tree t = NULL_TREE;
tree def;
- int i;
enum vect_def_type dt;
bool is_simple_use;
tree vector_type;
@@ -1284,7 +1282,6 @@ vect_get_vec_def_for_operand (tree op, gimple stmt, tree *scalar_def)
{
vector_type = get_vectype_for_scalar_type (TREE_TYPE (def));
gcc_assert (vector_type);
- nunits = TYPE_VECTOR_SUBPARTS (vector_type);
if (scalar_def)
*scalar_def = def;
@@ -1293,13 +1290,7 @@ vect_get_vec_def_for_operand (tree op, gimple stmt, tree *scalar_def)
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "Create vector_inv.");
- for (i = nunits - 1; i >= 0; --i)
- {
- t = tree_cons (NULL_TREE, def, t);
- }
-
- /* FIXME: use build_constructor directly. */
- vec_inv = build_constructor_from_list (vector_type, t);
+ vec_inv = build_vector_from_val (vector_type, def);
return vect_init_vector (stmt, vec_inv, vector_type, NULL);
}