From 603cca934439bff931f1902e93416ec34922a80a Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 14 Dec 2015 15:26:24 +0000 Subject: re PR middle-end/68852 (ICE in vect_is_simple_use (tree-vect-stmts.c:8750) using -O3) 2015-12-14 Richard Biener PR tree-optimization/68852 * tree-vectorizer.h (struct _slp_tree): Add def_type member. (SLP_TREE_DEF_TYPE): New accessor. * tree-vect-stmts.c (vect_is_simple_use): Remove BB vectorization hack. * tree-vect-slp.c (vect_create_new_slp_node): Initialize SLP_TREE_DEF_TYPE. (vect_build_slp_tree): When a node is to be built up from scalars do not push a NULL as child but instead set its def_type to vect_external_def. (vect_analyze_slp_cost_1): Check for child def-type instead of NULL. (vect_detect_hybrid_slp_stmts): Likewise. (vect_bb_slp_scalar_cost): Likewise. (vect_get_slp_defs): Likewise. (vect_slp_analyze_node_operations): Likewise. Before processing node push the children def-types to the underlying stmts vinfo and restore it afterwards. (vect_schedule_slp_instance): Likewise. (vect_slp_analyze_bb_1): Do not mark stmts not in SLP instances as not vectorizable. * g++.dg/torture/pr68852.C: New testcase. From-SVN: r231619 --- gcc/tree-vect-stmts.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'gcc/tree-vect-stmts.c') diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index abcd9a4..b1342fb 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -8649,10 +8649,7 @@ vect_is_simple_use (tree operand, vec_info *vinfo, else { stmt_vec_info stmt_vinfo = vinfo_for_stmt (*def_stmt); - if (is_a (vinfo) && !STMT_VINFO_VECTORIZABLE (stmt_vinfo)) - *dt = vect_external_def; - else - *dt = STMT_VINFO_DEF_TYPE (stmt_vinfo); + *dt = STMT_VINFO_DEF_TYPE (stmt_vinfo); } if (dump_enabled_p ()) -- cgit v1.1