vect: Init inside_cost in vect_model_reduction_cost

This patch is to initialize the inside_cost as zero, can avoid
to use its uninitialized value when some path doesn't assign it.

gcc/ChangeLog:

	* tree-vect-loop.c (vect_model_reduction_cost): Init inside_cost.
This commit is contained in:
Kewen Lin 2021-03-25 07:53:06 -05:00
parent 660eb7e9de
commit 068d02e896

View File

@ -4465,7 +4465,7 @@ vect_model_reduction_cost (loop_vec_info loop_vinfo,
vect_reduction_type reduction_type,
int ncopies, stmt_vector_for_cost *cost_vec)
{
int prologue_cost = 0, epilogue_cost = 0, inside_cost;
int prologue_cost = 0, epilogue_cost = 0, inside_cost = 0;
enum tree_code code;
optab optab;
tree vectype;