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);
/* 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;
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)
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));
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;
&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);
}
/* Handle cond expr. */
for (j = 0; j < ncopies; j++)
{
- gimple new_stmt = NULL;
+ gassign *new_stmt = NULL;
if (j == 0)
{
if (slp_node)