diff options
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r-- | gcc/tree-vect-stmts.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 198d4698928..e80ac95a7fe 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -1720,7 +1720,7 @@ vect_finish_stmt_generation (gimple stmt, gimple vec_stmt, of the function, or NULL_TREE if the function cannot be vectorized. */ tree -vectorizable_function (gimple call, tree vectype_out, tree vectype_in) +vectorizable_function (gcall *call, tree vectype_out, tree vectype_in) { tree fndecl = gimple_call_fndecl (call); @@ -2186,20 +2186,21 @@ vectorizable_mask_load_store (gimple stmt, gimple_stmt_iterator *gsi, /* Function vectorizable_call. - Check if STMT performs a function call that can be vectorized. + Check if GS performs a function call that can be vectorized. If VEC_STMT is also passed, vectorize the STMT: create a vectorized stmt to replace it, put it in VEC_STMT, and insert it at BSI. Return FALSE if not a vectorizable STMT, TRUE otherwise. */ static bool -vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, +vectorizable_call (gimple gs, gimple_stmt_iterator *gsi, gimple *vec_stmt, slp_tree slp_node) { + gcall *stmt; tree vec_dest; tree scalar_dest; tree op, type; tree vec_oprnd0 = NULL_TREE, vec_oprnd1 = NULL_TREE; - stmt_vec_info stmt_info = vinfo_for_stmt (stmt), prev_stmt_info; + stmt_vec_info stmt_info = vinfo_for_stmt (gs), prev_stmt_info; tree vectype_out, vectype_in; int nunits_in; int nunits_out; @@ -2222,8 +2223,9 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_internal_def) return false; - /* Is STMT a vectorizable call? */ - if (!is_gimple_call (stmt)) + /* Is GS a vectorizable call? */ + stmt = dyn_cast <gcall *> (gs); + if (!stmt) return false; if (gimple_call_internal_p (stmt) @@ -2991,7 +2993,7 @@ vectorizable_simd_clone_call (gimple stmt, gimple_stmt_iterator *gsi, gcc_assert (!new_bb); } tree phi_res = copy_ssa_name (op, NULL); - gimple new_phi = create_phi_node (phi_res, loop->header); + gphi *new_phi = create_phi_node (phi_res, loop->header); set_vinfo_for_stmt (new_phi, new_stmt_vec_info (new_phi, loop_vinfo, NULL)); @@ -5619,7 +5621,7 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, tree offset = NULL_TREE; tree byte_offset = NULL_TREE; tree realignment_token = NULL_TREE; - gimple phi = NULL; + gphi *phi = NULL; vec<tree> dr_chain = vNULL; bool grouped_load = false; bool load_lanes_p = false; @@ -6274,7 +6276,7 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, &at_loop); if (alignment_support_scheme == dr_explicit_realign_optimized) { - phi = SSA_NAME_DEF_STMT (msq); + phi = as_a <gphi *> (SSA_NAME_DEF_STMT (msq)); byte_offset = size_binop (MINUS_EXPR, TYPE_SIZE_UNIT (vectype), size_one_node); } @@ -6805,7 +6807,7 @@ vectorizable_condition (gimple stmt, gimple_stmt_iterator *gsi, /* Handle cond expr. */ for (j = 0; j < ncopies; j++) { - gimple new_stmt = NULL; + gassign *new_stmt = NULL; if (j == 0) { if (slp_node) |