tree-optimization/92645 - improve SLP with existing vectors
authorRichard Biener <rguenther@suse.de>
Wed, 13 Jan 2021 11:40:01 +0000 (12:40 +0100)
committerRichard Biener <rguenther@suse.de>
Wed, 13 Jan 2021 12:38:41 +0000 (13:38 +0100)
commit3ddc18251a821fe69d6229abbf83d77284d2340a
tree09a0019b71cc011fab596504d87c09afa2cb6276
parent5ab67cdee6144cfca0705612a898f1940d4f3994
tree-optimization/92645 - improve SLP with existing vectors

This improves SLP discovery in the face of existing vectors allowing
punning of the vector shape (or even punning from an integer type).
For punning from integer types this does not yet handle lane zero
extraction being represented as conversion rather than BIT_FIELD_REF.

2021-01-13  Richard Biener  <rguenther@suse.de>

PR tree-optimization/92645
* tree-vect-slp.c (vect_build_slp_tree_1): Relax supported
BIT_FIELD_REF argument.
(vect_build_slp_tree_2): Record the desired vector type
on the external vector def.
(vectorizable_slp_permutation): Handle required punning
of existing vector defs.

* gcc.target/i386/pr92645-6.c: New testcase.
gcc/testsuite/gcc.target/i386/pr92645-6.c [new file with mode: 0644]
gcc/tree-vect-slp.c