This removes the non-SLP paths from vectorizable_shift. * tree-vect-stmts.cc (vectorizable_shift): Remove non-SLP paths. --- gcc/tree-vect-stmts.cc | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index e98b02c3d39..ca941aa5bc9 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -6009,7 +6009,6 @@ vectorizable_shift (vec_info *vinfo, poly_uint64 nunits_out; tree vectype_out; tree op1_vectype; - int ncopies; int i; vec<tree> vec_oprnds0 = vNULL; vec<tree> vec_oprnds1 = vNULL; @@ -6042,7 +6041,7 @@ vectorizable_shift (vec_info *vinfo, return false; scalar_dest = gimple_assign_lhs (stmt); - vectype_out = STMT_VINFO_VECTYPE (stmt_info); + vectype_out = SLP_TREE_VECTYPE (slp_node); if (!type_has_mode_precision_p (TREE_TYPE (scalar_dest))) { if (dump_enabled_p ()) @@ -6090,13 +6089,6 @@ vectorizable_shift (vec_info *vinfo, return false; } - /* Multiple types in SLP are handled by creating the appropriate number of - vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in - case of SLP. */ - ncopies = 1; - - gcc_assert (ncopies >= 1); - /* Determine whether the shift amount is a vector, or scalar. If the shift/rotate amount is a vector, use the vector/vector shift optabs. */ @@ -6275,7 +6267,7 @@ vectorizable_shift (vec_info *vinfo, } STMT_VINFO_TYPE (stmt_info) = shift_vec_info_type; DUMP_VECT_SCOPE ("vectorizable_shift"); - vect_model_simple_cost (vinfo, ncopies, dt, + vect_model_simple_cost (vinfo, 1, dt, scalar_shift_arg ? 1 : ndts, slp_node, cost_vec); return true; } @@ -6342,7 +6334,7 @@ vectorizable_shift (vec_info *vinfo, /* vec_oprnd1 is available if operand 1 should be of a scalar-type (a special case for certain kind of vector shifts); otherwise, operand 1 should be of a vector type (the usual case). */ - vect_get_vec_defs (vinfo, stmt_info, slp_node, ncopies, + vect_get_vec_defs (vinfo, stmt_info, slp_node, 1, op0, &vec_oprnds0, vec_oprnd1 ? NULL_TREE : op1, &vec_oprnds1); -- 2.43.0