On 3/25/2021 12:04 AM, Kewen.Lin via Gcc-patches wrote:
Hi, I happened to find this possible use of uninitialized inside_cost during checking the cost for reduction. Before r11-6587, all the if/else if/else arms will assign values to inside_cost, so it was fine. But from r11-6587 the else path won't assign any more, it leads the inside_cost possibly uninitialized for later use. Note that it won't have any functionality issues, just could show one unreasonable cost in dump file. This is a trivial fix and I guess it can be counted as obvious, but I'm not sure if it's ok in stage 4. So is it ok for trunk? BR, Kewen ----- gcc/ChangeLog: * tree-vect-loop.c (vect_model_reduction_cost): Init inside_cost.
OK jeff