This fixes a missed early-out in SLP live stmt marking when
all scalar stmts were already visited (oops).
2020-09-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/97098
* tree-vect-slp.c (vect_bb_slp_mark_live_stmts): Do not
recurse to children when all stmts were already visited.
unsigned i;
stmt_vec_info stmt_info;
stmt_vec_info last_stmt = vect_find_last_scalar_stmt_in_slp (node);
+ bool all_visited = true;
FOR_EACH_VEC_ELT (SLP_TREE_SCALAR_STMTS (node), i, stmt_info)
{
stmt_vec_info orig_stmt_info = vect_orig_stmt (stmt_info);
if (svisited.contains (orig_stmt_info))
continue;
+ all_visited = false;
bool mark_visited = true;
gimple *orig_stmt = orig_stmt_info->stmt;
ssa_op_iter op_iter;
if (mark_visited)
svisited.add (orig_stmt_info);
}
+ if (all_visited)
+ return;
slp_tree child;
FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (node), i, child)