]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/102046 - fix SLP build from scalars with patterns
authorRichard Biener <rguenther@suse.de>
Wed, 25 Aug 2021 08:06:01 +0000 (10:06 +0200)
committerRichard Biener <rguenther@suse.de>
Mon, 6 Sep 2021 08:09:10 +0000 (10:09 +0200)
commit57f6800aefdd102cd43f0df53ca8bcbcc7202b41
treee07e93dde3b451cfc09d38a8f0a911368db38fe7
parent7f584a309092896bdbe83655fb5f425ac8adc019
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  <rguenther@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)
gcc/testsuite/gcc.dg/vect/pr102046.c [new file with mode: 0644]
gcc/tree-vect-slp.c