aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-slp.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2018-11-26 15:37:35 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2018-11-26 15:37:35 +0000
commitef6e6914c8245ca24dae952bc054ae2328e751ab (patch)
tree99a95accf31970bfb7c5ca83ed8d9a15a5e4db6f /gcc/tree-vect-slp.c
parentc393c7482fa7c6953f256724e8c6bd282d404e7c (diff)
downloadgcc-ef6e6914c8245ca24dae952bc054ae2328e751ab.zip
gcc-ef6e6914c8245ca24dae952bc054ae2328e751ab.tar.gz
gcc-ef6e6914c8245ca24dae952bc054ae2328e751ab.tar.bz2
re PR tree-optimization/88182 (ICE in vectorizable_reduction, at tree-vect-loop.c:6465)
2018-11-26 Richard Biener <rguenther@suse.de> PR tree-optimization/88182 * tree-vect-loop.c (vectorizable_reduction): Pick up single correct reduc_def_info. * tree-vect-slp.c (vect_analyze_slp_instance): Set STMT_VINFO_REDUC_DEF of the first stmt. libgomp/ * testsuite/libgomp.c++/pr88182.C: New testcase. From-SVN: r266467
Diffstat (limited to 'gcc/tree-vect-slp.c')
-rw-r--r--gcc/tree-vect-slp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index 9e805d0..4267cc9 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -1952,6 +1952,8 @@ vect_analyze_slp_instance (vec_info *vinfo,
transform the node. In the reduction analysis phase only the last
element of the chain is marked as reduction. */
STMT_VINFO_DEF_TYPE (stmt_info) = vect_reduction_def;
+ STMT_VINFO_REDUC_DEF (vect_orig_stmt (stmt_info))
+ = STMT_VINFO_REDUC_DEF (vect_orig_stmt (scalar_stmts.last ()));
}
else
{