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
This commit is contained in:
Richard Sandiford 2011-05-04 13:09:26 +00:00 committed by Richard Sandiford
parent a207915ac3
commit fdabf26955
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2011-05-04 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vect-loop.c (vectorizable_reduction): Check reduction cost
before setting STMT_VINFO_TYPE.
2011-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
* config/spu/spu.c (spu_gimplify_va_arg_expr): Call pass_by_reference

View File

@ -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;
}