[SLP] SLP vectorization: vectorize vector constructors
authorJoel Hutton <Joel.Hutton@arm.com>
Mon, 4 Nov 2019 16:39:32 +0000 (16:39 +0000)
committerAndre Vieira <avieira@gcc.gnu.org>
Mon, 4 Nov 2019 16:39:32 +0000 (16:39 +0000)
commit818b3293f4545d899148810f4f7d676b81e989dd
tree2702ccd3ba1baf99c6cb15f51052689b1b0cb9e2
parenta6ba623777513e31721030092e4d786f461a0f06
[SLP] SLP vectorization: vectorize vector constructors

gcc/ChangeLog:
2019-11-04  Joel Hutton  <Joel.Hutton@arm.com>

* expr.c (store_constructor): Modify to handle single element vectors.
* tree-vect-slp.c (vect_analyze_slp_instance): Add case for vector
constructors.
(vect_slp_check_for_constructors): New function.
(vect_slp_analyze_bb_1): Call new function to check for vector
constructors.
(vectorize_slp_instance_root_stmt): New function.
(vect_schedule_slp): Call new function to vectorize root stmt of vector
constructors.
* tree-vectorizer.h (SLP_INSTANCE_ROOT_STMT): New field.

gcc/testsuite/ChangeLog:
2019-11-04  Joel Hutton  <Joel.Hutton@arm.com>

* gcc.dg/vect/bb-slp-40.c: New test.
* gcc.dg/vect/bb-slp-41.c: New test.

From-SVN: r277784
gcc/ChangeLog
gcc/expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/bb-slp-40.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/bb-slp-41.c [new file with mode: 0644]
gcc/tree-vect-slp.c
gcc/tree-vectorizer.h