Prunes code from the trivial true/false conditions.

        * tree-vect-stmts.cc (vectorizable_conversion):
---
 gcc/tree-vect-stmts.cc | 63 +++++++++---------------------------------
 1 file changed, 13 insertions(+), 50 deletions(-)

diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index cf986d030a1..21832d3e460 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -5706,12 +5706,7 @@ vectorizable_conversion (vec_info *vinfo,
   /* 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.  */
-  if (1)
-    ncopies = 1;
-  else if (modifier == NARROW_DST)
-    ncopies = vect_get_num_copies (loop_vinfo, vectype_out);
-  else
-    ncopies = vect_get_num_copies (loop_vinfo, vectype_in);
+  ncopies = 1;
 
   /* Sanity check: make sure that at least one copy of the vectorized stmt
      needs to be generated.  */
@@ -5871,16 +5866,11 @@ vectorizable_conversion (vec_info *vinfo,
       else if (code == FLOAT_EXPR)
        {
          wide_int op_min_value, op_max_value;
-         if (1)
-           {
-             tree def;
-             /* ???  Merge ranges in case of more than one lane.  */
-             if (SLP_TREE_LANES (slp_op0) != 1
-                 || !(def = vect_get_slp_scalar_def (slp_op0, 0))
-                 || !vect_get_range_info (def, &op_min_value, &op_max_value))
-               goto unsupported;
-           }
-         else if (!vect_get_range_info (op0, &op_min_value, &op_max_value))
+         tree def;
+         /* ???  Merge ranges in case of more than one lane.  */
+         if (SLP_TREE_LANES (slp_op0) != 1
+             || !(def = vect_get_slp_scalar_def (slp_op0, 0))
+             || !vect_get_range_info (def, &op_min_value, &op_max_value))
            goto unsupported;
 
          cvt_type
@@ -5916,9 +5906,8 @@ vectorizable_conversion (vec_info *vinfo,
 
   if (!vec_stmt)               /* transformation not required.  */
     {
-      if (1
-         && (!vect_maybe_update_slp_op_vectype (slp_op0, vectype_in)
-             || !vect_maybe_update_slp_op_vectype (slp_op1, vectype_in)))
+      if (!vect_maybe_update_slp_op_vectype (slp_op0, vectype_in)
+         || !vect_maybe_update_slp_op_vectype (slp_op1, vectype_in))
        {
          if (dump_enabled_p ())
            dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
@@ -5937,8 +5926,7 @@ vectorizable_conversion (vec_info *vinfo,
        {
          STMT_VINFO_TYPE (stmt_info) = type_demotion_vec_info_type;
          /* The final packing step produces one vector result per copy.  */
-         unsigned int nvectors
-           = (1 ? SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node) : ncopies);
+         unsigned int nvectors = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
          vect_model_promotion_demotion_cost (stmt_info, dt, nvectors,
                                              multi_step_cvt, cost_vec,
                                              widen_arith);
@@ -5950,9 +5938,7 @@ vectorizable_conversion (vec_info *vinfo,
             per copy.  MULTI_STEP_CVT is 0 for a single conversion,
             so >> MULTI_STEP_CVT divides by 2^(number of steps - 1).  */
          unsigned int nvectors
-           = (1
-              ? SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node) >> multi_step_cvt
-              : ncopies * 2);
+           = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node) >> multi_step_cvt;
          vect_model_promotion_demotion_cost (stmt_info, dt, nvectors,
                                              multi_step_cvt, cost_vec,
                                              widen_arith);
@@ -6004,18 +5990,6 @@ vectorizable_conversion (vec_info *vinfo,
                                            ? vectype_out : cvt_type);
 
   int ninputs = 1;
-  if (0)
-    {
-      if (modifier == WIDEN)
-       ;
-      else if (modifier == NARROW_SRC || modifier == NARROW_DST)
-       {
-         if (multi_step_cvt)
-           ninputs = vect_pow2 (multi_step_cvt);
-         ninputs *= 2;
-       }
-    }
-
   switch (modifier)
     {
     case NONE:
@@ -6046,10 +6020,7 @@ vectorizable_conversion (vec_info *vinfo,
          gimple_set_lhs (new_stmt, new_temp);
          vect_finish_stmt_generation (vinfo, stmt_info, new_stmt, gsi);
 
-         if (1)
-           slp_node->push_vec_def (new_stmt);
-         else
-           STMT_VINFO_VEC_STMTS (stmt_info).safe_push (new_stmt);
+         slp_node->push_vec_def (new_stmt);
        }
       break;
 
@@ -6102,10 +6073,7 @@ vectorizable_conversion (vec_info *vinfo,
          else
            new_stmt = SSA_NAME_DEF_STMT (vop0);
 
-         if (1)
-           slp_node->push_vec_def (new_stmt);
-         else
-           STMT_VINFO_VEC_STMTS (stmt_info).safe_push (new_stmt);
+         slp_node->push_vec_def (new_stmt);
        }
       break;
 
@@ -6148,16 +6116,11 @@ vectorizable_conversion (vec_info *vinfo,
              /* This is the last step of the conversion sequence. Store the
                 vectors in SLP_NODE or in vector info of the scalar statement
                 (or in STMT_VINFO_RELATED_STMT chain).  */
-             if (1)
-               slp_node->push_vec_def (new_stmt);
-             else
-               STMT_VINFO_VEC_STMTS (stmt_info).safe_push (new_stmt);
+             slp_node->push_vec_def (new_stmt);
            }
        }
       break;
     }
-  if (0)
-    *vec_stmt = STMT_VINFO_VEC_STMTS (stmt_info)[0];
 
   vec_oprnds0.release ();
   vec_oprnds1.release ();
-- 
2.43.0

Reply via email to