{
/* Or if we do not have 1:1 matching scalar stmts emit after the
children vectorized defs. */
- gimple *last_in_child;
gimple *last_stmt = NULL;
FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (node), i, child)
/* ??? With only external defs the following breaks. Note
if (SLP_TREE_DEF_TYPE (child) == vect_internal_def)
{
/* We are emitting all vectorized stmts in the same place and
- the last one is the last. */
- last_in_child = SLP_TREE_VEC_STMTS (child).last ();
- if (!last_stmt
- || vect_stmt_dominates_stmt_p (last_stmt, last_in_child))
- last_stmt = last_in_child;
+ the last one is the last.
+ ??? Unless we have a load permutation applied and that
+ figures to re-use an earlier generated load. */
+ unsigned j;
+ gimple *vstmt;
+ FOR_EACH_VEC_ELT (SLP_TREE_VEC_STMTS (child), j, vstmt)
+ if (!last_stmt
+ || vect_stmt_dominates_stmt_p (last_stmt, vstmt))
+ last_stmt = vstmt;
}
if (is_a <gphi *> (last_stmt))
si = gsi_after_labels (gimple_bb (last_stmt));