+2011-04-14 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * tree-vect-stmts.c (vectorizable_load): Allocate and free dr_chain
+ within the per-copy loop.
+
2011-04-14 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vect-stmts.c (vectorizable_load): Print the number of copies
}
else
vec_num = group_size;
-
- dr_chain = VEC_alloc (tree, heap, vec_num);
}
else
{
dataref_ptr =
bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt, NULL_TREE);
+ if (strided_load || slp_perm)
+ dr_chain = VEC_alloc (tree, heap, vec_num);
+
for (i = 0; i < vec_num; i++)
{
if (i > 0)
return false;
*vec_stmt = STMT_VINFO_VEC_STMT (stmt_info);
- VEC_free (tree, heap, dr_chain);
- dr_chain = VEC_alloc (tree, heap, group_size);
}
else
{
prev_stmt_info = vinfo_for_stmt (new_stmt);
}
}
+ if (dr_chain)
+ VEC_free (tree, heap, dr_chain);
}
- if (dr_chain)
- VEC_free (tree, heap, dr_chain);
-
return true;
}