From fdabf26955aeaf884a8824d376b56e00effa7485 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Wed, 4 May 2011 13:09:26 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/tree-vect-loop.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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; } -- 2.30.2