tree-optimization/114192 - scalar reduction kept live with early break vect
commit324d2907c86f05e40dc52d226940308f53a956c2
authorRichard Biener <rguenther@suse.de>
Mon, 4 Mar 2024 08:46:13 +0000 (4 09:46 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 4 Mar 2024 10:44:53 +0000 (4 11:44 +0100)
tree1ac7be69bacd1da91d3a1e373d7070d3278c51c1
parentc27148f2f40654a638bcf429633be1c0561529d5
tree-optimization/114192 - scalar reduction kept live with early break vect

The following fixes a missing replacement of the reduction value
used in the epilog, causing the scalar reduction to be kept live
across the early break exit path.

PR tree-optimization/114192
* tree-vect-loop.cc (vect_create_epilog_for_reduction): Use the
appropriate def for the live out stmt in case of an alternate
exit.
gcc/tree-vect-loop.cc