https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100981
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:374f93da97fb0378453d503f3cfea4d7a923a89c commit r12-1330-g374f93da97fb0378453d503f3cfea4d7a923a89c Author: Richard Biener <rguent...@suse.de> Date: Wed Jun 9 14:48:35 2021 +0200 tree-optimization/100981 - fix SLP patterns involving reductions The following fixes the SLP FMA patterns to preserve reduction info and the reduction vectorization to consider internal function call defs for the reduction stmt. 2021-06-09 Richard Biener <rguent...@suse.de> PR tree-optimization/100981 gcc/ * tree-vect-loop.c (vect_create_epilog_for_reduction): Use gimple_get_lhs to also handle calls. * tree-vect-slp-patterns.c (complex_pattern::build): Transfer reduction info. gcc/testsuite/ * gfortran.dg/vect/pr100981-1.f90: New testcase. libgomp/ * testsuite/libgomp.fortran/pr100981-2.f90: New testcase.