[05/11] Add a vect_stmt_to_vectorize helper function
commit0b7ea3a9e2c68584d17887c68f534b6f7f43884a
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Aug 2018 15:14:42 +0000 (1 15:14 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Aug 2018 15:14:42 +0000 (1 15:14 +0000)
tree9c60cd9b0f1770a384516c649066da81a765c012
parent11822fb29f3114363a7366761eef66efadbcc830
[05/11] Add a vect_stmt_to_vectorize helper function

This patch adds a helper that does the opposite of vect_orig_stmt:
go from the original scalar statement to the statement that should
actually be vectorised.

The use in the last two hunks of vectorizable_reduction are because
reduc_stmt_info (first hunk) and stmt_info (second hunk) are already
pattern statements if appropriate.

2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vectorizer.h (vect_stmt_to_vectorize): New function.
* tree-vect-loop.c (vect_update_vf_for_slp): Use it.
(vectorizable_reduction): Likewise.
* tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
(vect_detect_hybrid_slp_stmts): Likewise.
* tree-vect-stmts.c (vect_is_simple_use): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263219 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/tree-vect-loop.c
gcc/tree-vect-slp.c
gcc/tree-vect-stmts.c
gcc/tree-vectorizer.h