diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2010-10-31 02:20:22 +0000 |
---|---|---|
committer | Nathan Froyd <froydnj@gcc.gnu.org> | 2010-10-31 02:20:22 +0000 |
commit | b9acc9f1de4ef8a1cff7c495a3b26fcd3e2448c4 (patch) | |
tree | 1690b9c80ac2985f27e7ba09fccad0152877304c /gcc/tree-vect-stmts.c | |
parent | 76369a821b895c4d4bf1412d108716c4bb0a90de (diff) | |
download | gcc-b9acc9f1de4ef8a1cff7c495a3b26fcd3e2448c4.tar.gz |
fold-const.c (build_zero_vector): Use build_vector_from_val.
* fold-const.c (build_zero_vector): Use build_vector_from_val.
* tree-vect-loop.c (get_initial_def_for_induction): Likewise.
(get_initial_def_for_reduction): Likewise.
* tree-vect-slp.c (vect_get_constant_vectors): Likewise.
* tree-vect-stmts.c (vect_get_vec_def_for_operand): Likewise.
* tree.c (build_one_cst): Likewise.
(build_vector_from_val): Use types_compatible_p for assert.
From-SVN: r166102
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r-- | gcc/tree-vect-stmts.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 01fd5cfd14a..6f4f56861d0 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -987,9 +987,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; @@ -1033,11 +1031,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_cst. nunits = %d", nunits); - for (i = nunits - 1; i >= 0; --i) - { - t = tree_cons (NULL_TREE, op, t); - } - vec_cst = build_vector (vector_type, t); + vec_cst = build_vector_from_val (vector_type, op); return vect_init_vector (stmt, vec_cst, vector_type, NULL); } @@ -1055,13 +1049,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); } |