Invoke vectorizable_live_operation in a consistent way
authorRichard Sandiford <richard.sandiford@linaro.org>
Mon, 18 Sep 2017 15:03:29 +0000 (15:03 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 18 Sep 2017 15:03:29 +0000 (15:03 +0000)
commit68a0f2ffff4fdb05cfe110b3828124bcbe6d611f
treedc340ca7b00feb67a6b05f07d6c960fb3af00019
parentf64b12bd152735aacb948424766b33303bbeb5f8
Invoke vectorizable_live_operation in a consistent way

vect_transform_stmt calls vectorizable_live_operation for
each live statement in an SLP node, but vect_analyze_stmt
only called it the once.  This patch makes vect_analyze_stmt
consistent with vect_transform_stmt, which should be a bit
more robust, and also means that a later patch can use
slp_index when deciding validity.

2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* tree-vect-stmts.c (can_vectorize_live_stmts): New function,
split out from...
(vect_transform_stmt): ...here.
(vect_analyze_stmt): Use it instead of calling
vectorizable_live_operation directly.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r252929
gcc/ChangeLog
gcc/tree-vect-stmts.c