re PR tree-optimization/80928 (SLP vectorization does not handle induction in outer...
authorRichard Biener <rguenther@suse.de>
Tue, 6 Jun 2017 07:37:14 +0000 (07:37 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 6 Jun 2017 07:37:14 +0000 (07:37 +0000)
commite7baeb396d313ef141f972cdedc19b12ef1b9cfe
treebcb9603549d0ee4ff166d61a0be4175d7142c721
parent09a04a5e5e254b283b2ac765f75414ad5064e787
re PR tree-optimization/80928 (SLP vectorization does not handle induction in outer loop vectorization)

2017-06-06  Richard Biener  <rguenther@suse.de>

PR tree-optimization/80928
* tree-vect-loop.c (vect_update_vf_for_slp): Amend dumps.
(vect_analyze_loop_operations): Properly guard analysis for
pure SLP case.
(vect_transform_loop): Likewise.
(vect_analyze_loop_2): Also reset SLP type on PHIs.
(vect_model_induction_cost): Do not cost for pure SLP.
(vectorizable_induction): Pass in SLP node, implement SLP vectorization
of induction in inner loop vectorization.
* tree-vect-slp.c (vect_create_new_slp_node): Handle PHIs.
(vect_get_and_check_slp_defs): Handle vect_induction_def.
(vect_build_slp_tree): Likewise.  Handle PHIs as terminating the
recursion.
(vect_analyze_slp_cost_1): Cost induction.
(vect_detect_hybrid_slp_stmts): Handle PHIs.
(vect_get_slp_vect_defs): Likewise.
* tree-vect-stmts.c (vect_analyze_stmt): Handle induction.
(vect_transform_stmt): Handle SLP reductions.
* tree-vectorizer.h (vectorizable_induction): Adjust.

* gcc.dg/vect/pr80928.c: New testcase.
* gcc.dg/vect/slp-13-big-array.c: Remove XFAILs.
* gcc.dg/vect/slp-13.c: Likewise.
* gcc.dg/vect/slp-perm-9.c: Prevent vectorization of check loop.

From-SVN: r248909
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr80928.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/slp-13-big-array.c
gcc/testsuite/gcc.dg/vect/slp-13.c
gcc/testsuite/gcc.dg/vect/slp-perm-9.c
gcc/tree-vect-loop.c
gcc/tree-vect-slp.c
gcc/tree-vect-stmts.c
gcc/tree-vectorizer.h