]> gcc.gnu.org Git - gcc.git/commit
tree-optimization/105053 - fix reduction chain epilogue generation
authorRichard Biener <rguenther@suse.de>
Fri, 25 Mar 2022 13:31:25 +0000 (14:31 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 25 Mar 2022 14:26:29 +0000 (15:26 +0100)
commitfe705dce2e1e3e4e5e0c69d7f9adaf7f2777cdc8
treeab50e8c9b7f804a24763220dd91f3e68dfc899de
parentd0b938a7612fb7acf1f181da9577235c83ede59e
tree-optimization/105053 - fix reduction chain epilogue generation

When we optimize permutations in a reduction chain we have to
be careful to select the correct live-out stmt, otherwise the
reduction result will be unused and the retained scalar code will
execute only the number of vector iterations.

2022-03-25  Richard Biener  <rguenther@suse.de>

PR tree-optimization/105053
* tree-vect-loop.cc (vect_create_epilog_for_reduction): Pick
the correct live-out stmt for a reduction chain.

* g++.dg/vect/pr105053.cc: New testcase.
gcc/testsuite/g++.dg/vect/pr105053.cc [new file with mode: 0644]
gcc/tree-vect-loop.cc
This page took 0.057752 seconds and 5 git commands to generate.