tree-vect-stmts.c (vectorizable_condition): Do not get at else_clause vect def for...
authorRichard Biener <rguenther@suse.de>
Tue, 20 Nov 2018 12:20:40 +0000 (12:20 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 20 Nov 2018 12:20:40 +0000 (12:20 +0000)
2018-11-20  Richard Biener  <rguenther@suse.de>

* tree-vect-stmts.c (vectorizable_condition): Do not get
at else_clause vect def for EXTRACT_LAST_REDUCTION.  Remove
pointless vect_is_simple_use calls.

From-SVN: r266314

gcc/ChangeLog
gcc/tree-vect-stmts.c

index 45c7b750b757f95981572b49b9238787b5362553..5a18ba9d54342779c3b9864e2d251750a4506d70 100644 (file)
@@ -1,3 +1,9 @@
+2018-11-20  Richard Biener  <rguenther@suse.de>
+
+       * tree-vect-stmts.c (vectorizable_condition): Do not get
+       at else_clause vect def for EXTRACT_LAST_REDUCTION.  Remove
+       pointless vect_is_simple_use calls.
+
 2018-11-20  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/88074
index e41602dd11c3972c1aa2233357768276c9b63c29..80f6d2b8f7d3d7bd05b799be6c919ce7a00265d0 100644 (file)
@@ -8911,26 +8911,21 @@ vectorizable_condition (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi,
                  vec_cond_lhs
                    = vect_get_vec_def_for_operand (cond_expr, stmt_info,
                                                    comp_vectype);
-                 vect_is_simple_use (cond_expr, stmt_info->vinfo, &dts[0]);
                }
              else
                {
                  vec_cond_lhs
                    = vect_get_vec_def_for_operand (cond_expr0,
                                                    stmt_info, comp_vectype);
-                 vect_is_simple_use (cond_expr0, loop_vinfo, &dts[0]);
-
                  vec_cond_rhs
                    = vect_get_vec_def_for_operand (cond_expr1,
                                                    stmt_info, comp_vectype);
-                 vect_is_simple_use (cond_expr1, loop_vinfo, &dts[1]);
                }
              vec_then_clause = vect_get_vec_def_for_operand (then_clause,
                                                              stmt_info);
-             vect_is_simple_use (then_clause, loop_vinfo, &dts[2]);
-             vec_else_clause = vect_get_vec_def_for_operand (else_clause,
-                                                             stmt_info);
-             vect_is_simple_use (else_clause, loop_vinfo, &dts[3]);
+             if (reduction_type != EXTRACT_LAST_REDUCTION)
+               vec_else_clause = vect_get_vec_def_for_operand (else_clause,
+                                                               stmt_info);
            }
        }
       else