]> 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>
Thu, 7 Apr 2022 09:11:10 +0000 (11:11 +0200)
commit825151e16373760527678df8ad524bd725e36c7b
treefad46935d54bd6fa8cb0e56f98a4a5a6a83f8d4a
parentb8a6fb4b5919140de74fbc6ad6df1a9caba1c9ec
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.c (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.c
This page took 0.058759 seconds and 5 git commands to generate.