https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102046
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:967219bb3ef1869f6bd1c5efffea65544a310836 commit r10-10208-g967219bb3ef1869f6bd1c5efffea65544a310836 Author: Richard Biener <rguent...@suse.de> Date: Wed Aug 25 10:06:01 2021 +0200 tree-optimization/102046 - fix SLP build from scalars with patterns When we swap operands for SLP builds we lose track where exactly pattern defs are - but we fail to update the any_pattern member of the operands info. Do so conservatively. 2021-08-25 Richard Biener <rguent...@suse.de> PR tree-optimization/102046 * tree-vect-slp.c (vect_build_slp_tree_2): Conservatively update ->any_pattern when swapping operands. * gcc.dg/vect/pr102046.c: New testcase. (cherry picked from commit 29c77454e5ab33ce06a741eacdfbd5348fbccc95)