diff options
author | Richard Biener <rguenther@suse.de> | 2017-06-29 14:04:02 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2017-06-29 14:04:02 +0000 |
commit | 0630a4ecda602a90e978c3285cf1028e92ff5e8b (patch) | |
tree | cc5cefd595920573102156822f21d901451a76c1 /gcc/tree-vect-loop.c | |
parent | f76b422479df586a93a0a2eaac748b59923d6e97 (diff) | |
download | gcc-0630a4ecda602a90e978c3285cf1028e92ff5e8b.zip gcc-0630a4ecda602a90e978c3285cf1028e92ff5e8b.tar.gz gcc-0630a4ecda602a90e978c3285cf1028e92ff5e8b.tar.bz2 |
tree-vect-loop.c (vect_analyze_scalar_cycles_1): Do not add reduction chains to LOOP_VINFO_REDUCTIONS.
2017-06-29 Richard Biener <rguenther@suse.de>
* tree-vect-loop.c (vect_analyze_scalar_cycles_1): Do not add
reduction chains to LOOP_VINFO_REDUCTIONS.
* tree-vect-slp.c (vect_analyze_slp): Continue looking for
SLP reductions after processing reduction chains.
* gcc.dg/vect/slp-reduc-8.c: New testcase.
From-SVN: r249785
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r-- | gcc/tree-vect-loop.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index a055836..32a5caa 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -890,8 +890,10 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop) STMT_VINFO_DEF_TYPE (vinfo_for_stmt (reduc_stmt)) = vect_reduction_def; /* Store the reduction cycles for possible vectorization in - loop-aware SLP. */ - LOOP_VINFO_REDUCTIONS (loop_vinfo).safe_push (reduc_stmt); + loop-aware SLP if it was not detected as reduction + chain. */ + if (! GROUP_FIRST_ELEMENT (vinfo_for_stmt (reduc_stmt))) + LOOP_VINFO_REDUCTIONS (loop_vinfo).safe_push (reduc_stmt); } } } |