From: Richard Biener Date: Tue, 20 Nov 2018 12:20:40 +0000 (+0000) Subject: tree-vect-stmts.c (vectorizable_condition): Do not get at else_clause vect def for... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8c944c97a2e5a264779ad1d448f97319f471275a;p=gcc.git tree-vect-stmts.c (vectorizable_condition): Do not get at else_clause vect def for EXTRACT_LAST_REDUCTION. 2018-11-20 Richard Biener * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 45c7b750b75..5a18ba9d543 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-11-20 Richard Biener + + * 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 PR tree-optimization/88074 diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index e41602dd11c..80f6d2b8f7d 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -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