From: Richard Sandiford Date: Wed, 4 May 2011 13:09:26 +0000 (+0000) Subject: tree-vect-loop.c (vectorizable_reduction): Check reduction cost before setting STMT_V... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fdabf26955aeaf884a8824d376b56e00effa7485;p=gcc.git tree-vect-loop.c (vectorizable_reduction): Check reduction cost before setting STMT_VINFO_TYPE. gcc/ * tree-vect-loop.c (vectorizable_reduction): Check reduction cost before setting STMT_VINFO_TYPE. From-SVN: r173373 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 523dd67836d..eb6d38c6ade 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-05-04 Richard Sandiford + + * tree-vect-loop.c (vectorizable_reduction): Check reduction cost + before setting STMT_VINFO_TYPE. + 2011-05-04 Ulrich Weigand * config/spu/spu.c (spu_gimplify_va_arg_expr): Call pass_by_reference diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index e05c324d0b9..8f3b8e61c64 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -4317,9 +4317,9 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi, if (!vec_stmt) /* transformation not required. */ { - STMT_VINFO_TYPE (stmt_info) = reduc_vec_info_type; if (!vect_model_reduction_cost (stmt_info, epilog_reduc_code, ncopies)) return false; + STMT_VINFO_TYPE (stmt_info) = reduc_vec_info_type; return true; }