tree-optimization/104322 - remove dead code in vectorizable_reduction
authorRichard Biener <rguenther@suse.de>
Tue, 1 Feb 2022 10:32:11 +0000 (11:32 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 29 Apr 2022 08:14:48 +0000 (10:14 +0200)
The PR points out dead code after previous refactoring.

2022-02-01  Richard Biener  <rguenther@suse.de>

PR tree-optimization/104322
* tree-vect-loop.cc (vectorizable_reduction): Remove dead code.

gcc/tree-vect-loop.cc

index f53a634..ab7dade 100644 (file)
@@ -6634,19 +6634,14 @@ vectorizable_reduction (loop_vec_info loop_vinfo,
         need it to get at the number of vector stmts which wasn't
         yet initialized for the instance root.  */
     }
-  if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def)
-    stmt_info = vect_stmt_to_vectorize (STMT_VINFO_REDUC_DEF (stmt_info));
-  else
+  if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_double_reduction_def)
     {
-      gcc_assert (STMT_VINFO_DEF_TYPE (stmt_info)
-                 == vect_double_reduction_def);
       use_operand_p use_p;
       gimple *use_stmt;
       bool res = single_imm_use (gimple_phi_result (stmt_info->stmt),
                                 &use_p, &use_stmt);
       gcc_assert (res);
       phi_info = loop_vinfo->lookup_stmt (use_stmt);
-      stmt_info = vect_stmt_to_vectorize (STMT_VINFO_REDUC_DEF (phi_info));
     }
 
   /* PHIs should not participate in patterns.  */