From: Kewen Lin Date: Thu, 25 Mar 2021 12:53:06 +0000 (-0500) Subject: vect: Init inside_cost in vect_model_reduction_cost X-Git-Tag: basepoints/gcc-12~430 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=068d02e896d3df17b59b013a82ca0bf9faf058f3;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 3e973e774af8..38d96fc16346 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -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;