2017-06-06 Richard Biener <rguenther@suse.de>
commit5cc7beaa807a96451cc778107bb3d68ecbdf794a
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Jun 2017 07:37:14 +0000 (6 07:37 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Jun 2017 07:37:14 +0000 (6 07:37 +0000)
treebcb9603549d0ee4ff166d61a0be4175d7142c721
parent232603693c139d66c1b463ef1df7bb95ed4af574
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@248909 138bc75d-0d04-0410-961f-82ee72b054a4
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