diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2016-05-24 14:05:20 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2016-05-24 14:05:20 +0000 |
commit | fce57248c89d5b990d1f82a2f8eba5a9741c9ad9 (patch) | |
tree | fea3d6343aca03af342d9d4ea601fc7a7abb9a42 /gcc/tree-vect-loop.c | |
parent | d1fb69400edb679142810fb86cc4c80254c60787 (diff) | |
download | gcc-fce57248c89d5b990d1f82a2f8eba5a9741c9ad9.zip gcc-fce57248c89d5b990d1f82a2f8eba5a9741c9ad9.tar.gz gcc-fce57248c89d5b990d1f82a2f8eba5a9741c9ad9.tar.bz2 |
Clean up PURE_SLP_STMT handling
The vectorizable_* routines had many instances of:
slp_node || PURE_SLP_STMT (stmt_info)
which gives the misleading impression that we can have
!slp_node && PURE_SLP_STMT (stmt_info). In this context
it's really enough to test slp_node on its own.
There are three cases:
loop vectorisation only:
vectorizable_foo called only with !slp_node
pure SLP:
vectorizable_foo called only with slp_node
hybrid SLP:
(e.g. a vector that's used in SLP statements and also in a reduction)
- vectorizable_foo called once with slp_node for the SLP uses.
- vectorizable_foo called once with !slp_node for the non-SLP uses.
Hybrid SLP isn't possible for stores, so I added an explicit assert
for that.
I also made vectorizable_comparison static, to make it obvious that
no other callers outside tree-vect-stmts.c could use it with the
!slp && PURE_SLP_STMT combination.
Tested on aarch64-linux-gnu and x86_64-linux-gnu.
gcc/
* tree-vectorizer.h (vectorizable_comparison): Delete.
* tree-vect-loop.c (vectorizable_reduction): Remove redundant
PURE_SLP_STMT check.
* tree-vect-stmts.c (vectorizable_call): Likewise.
(vectorizable_simd_clone_call): Likewise.
(vectorizable_conversion): Likewise.
(vectorizable_assignment): Likewise.
(vectorizable_shift): Likewise.
(vectorizable_operation): Likewise.
(vectorizable_load): Likewise.
(vectorizable_condition): Likewise.
(vectorizable_store): Likewise. Assert that we don't have
hybrid SLP.
(vectorizable_comparison): Make static. Remove redundant
PURE_SLP_STMT check.
(vect_transform_stmt): Assert that we always have an slp_node
if PURE_SLP_STMT.
From-SVN: r236642
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r-- | gcc/tree-vect-loop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 153372b..1471658 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -5596,7 +5596,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi, if (STMT_VINFO_LIVE_P (vinfo_for_stmt (reduc_def_stmt))) return false; - if (slp_node || PURE_SLP_STMT (stmt_info)) + if (slp_node) ncopies = 1; else ncopies = (LOOP_VINFO_VECT_FACTOR (loop_vinfo) |