From 068d02e896d3df17b59b013a82ca0bf9faf058f3 Mon Sep 17 00:00:00 2001 From: Kewen Lin Date: Thu, 25 Mar 2021 07:53:06 -0500 Subject: [PATCH] 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. --- gcc/tree-vect-loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 3e973e7..38d96fc 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; -- 2.7.4