---
 gcc/tree-vect-stmts.cc | 25 ++++++-------------------
 1 file changed, 6 insertions(+), 19 deletions(-)

diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index 482026d8d99..7a89bc0e5d4 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -3368,7 +3368,7 @@ vectorizable_call (vec_info *vinfo,
   tree vec_dest;
   tree scalar_dest;
   tree op;
-  tree vec_oprnd0 = NULL_TREE, vec_oprnd1 = NULL_TREE;
+  tree vec_oprnd0 = NULL_TREE;
   tree vectype_out, vectype_in;
   poly_uint64 nunits_in;
   poly_uint64 nunits_out;
@@ -3381,11 +3381,10 @@ vectorizable_call (vec_info *vinfo,
   tree vectypes[ARRAY_SIZE (dt)] = {};
   slp_tree slp_op[ARRAY_SIZE (dt)] = {};
   int ndts = ARRAY_SIZE (dt);
-  int ncopies, j;
+  int j;
   auto_vec<tree, 8> vargs;
   enum { NARROW, NONE, WIDEN } modifier;
   size_t i, nargs;
-  tree lhs;
   tree clz_ctz_arg1 = NULL_TREE;
 
   if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
@@ -3412,7 +3411,7 @@ vectorizable_call (vec_info *vinfo,
 
   gcc_checking_assert (!stmt_can_throw_internal (cfun, stmt));
 
-  vectype_out = STMT_VINFO_VECTYPE (stmt_info);
+  vectype_out = SLP_TREE_VECTYPE (slp_node);
 
   /* Process function arguments.  */
   rhs_type = NULL_TREE;
@@ -3599,12 +3598,6 @@ vectorizable_call (vec_info *vinfo,
        }
     }
 
-  ncopies = 1;
-
-  /* Sanity check: make sure that at least one copy of the vectorized stmt
-     needs to be generated.  */
-  gcc_assert (ncopies >= 1);
-
   int reduc_idx = STMT_VINFO_REDUC_IDX (stmt_info);
   internal_fn cond_fn = get_conditional_internal_fn (ifn);
   internal_fn cond_len_fn = get_len_internal_fn (ifn);
@@ -3625,7 +3618,7 @@ vectorizable_call (vec_info *vinfo,
          }
       STMT_VINFO_TYPE (stmt_info) = call_vec_info_type;
       DUMP_VECT_SCOPE ("vectorizable_call");
-      vect_model_simple_cost (vinfo, ncopies, dt, ndts, slp_node, cost_vec);
+      vect_model_simple_cost (vinfo, 1, dt, ndts, slp_node, cost_vec);
 
       if (loop_vinfo
          && LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo)
@@ -3700,7 +3693,7 @@ vectorizable_call (vec_info *vinfo,
       tree prev_res = NULL_TREE;
       vargs.safe_grow (vect_nargs, true);
       auto_vec<vec<tree> > vec_defs (nargs);
-      for (j = 0; j < ncopies; ++j)
+      for (j = 0; j < 1; ++j)
        {
          /* Build argument list for the vectorized call.  */
          if (cfn == CFN_GOMP_SIMD_LANE)
@@ -3737,8 +3730,6 @@ vectorizable_call (vec_info *vinfo,
              if (masked_loop_p && reduc_idx >= 0)
                {
                  unsigned int vec_num = vec_oprnds0.length ();
-                 /* Always true for SLP.  */
-                 gcc_assert (ncopies == 1);
                  vargs[varg++] = vect_get_loop_mask (loop_vinfo,
                                                      gsi, masks, vec_num,
                                                      vectype_out, i);
@@ -3780,8 +3771,6 @@ vectorizable_call (vec_info *vinfo,
                  if (len_opno >= 0 && len_loop_p)
                    {
                      unsigned int vec_num = vec_oprnds0.length ();
-                     /* Always true for SLP.  */
-                     gcc_assert (ncopies == 1);
                      tree len = vect_get_loop_len (loop_vinfo, gsi, lens,
                                                    vec_num, vectype_out, i, 1);
                      signed char biasval
@@ -3793,8 +3782,6 @@ vectorizable_call (vec_info *vinfo,
                  else if (mask_opno >= 0 && masked_loop_p)
                    {
                      unsigned int vec_num = vec_oprnds0.length ();
-                     /* Always true for SLP.  */
-                     gcc_assert (ncopies == 1);
                      tree mask = vect_get_loop_mask (loop_vinfo,
                                                      gsi, masks, vec_num,
                                                      vectype_out, i);
@@ -3828,7 +3815,7 @@ vectorizable_call (vec_info *vinfo,
       auto_vec<vec<tree> > vec_defs (nargs);
       /* We don't define any narrowing conditional functions at present.  */
       gcc_assert (mask_opno < 0);
-      for (j = 0; j < ncopies; ++j)
+      for (j = 0; j < 1; ++j)
        {
          /* Build argument list for the vectorized call.  */
          if (j == 0)
-- 
2.43.0

Reply via email to