2013-03-01 Jakub Jelinek <jakub@redhat.com>
PR middle-end/56461
+ * tree-vect-data-refs.c (vect_permute_store_chain): Avoid using copy
+ method on dr_chain and result_chain.
+ * tree-vect-stmts.c (vectorizable_store): Only call
+ result_chain.create if j == 0.
+
+ PR middle-end/56461
* tree-vect-stmts.c (vect_create_vectorized_promotion_stmts): Call
vec_oprnds0->release (); rather than vec_oprnds0->truncate (0)
before overwriting it.
unsigned int j, nelt = TYPE_VECTOR_SUBPARTS (vectype);
unsigned char *sel = XALLOCAVEC (unsigned char, nelt);
- *result_chain = dr_chain.copy ();
+ result_chain->quick_grow (length);
+ memcpy (result_chain->address (), dr_chain.address (),
+ length * sizeof (tree));
for (i = 0, n = nelt / 2; i < n; i++)
{
vect_finish_stmt_generation (stmt, perm_stmt, gsi);
(*result_chain)[2*j+1] = low;
}
- dr_chain = result_chain->copy ();
+ memcpy (dr_chain.address (), result_chain->address (),
+ length * sizeof (tree));
}
}
new_stmt = NULL;
if (grouped_store)
{
- result_chain.create (group_size);
+ if (j == 0)
+ result_chain.create (group_size);
/* Permute. */
vect_permute_store_chain (dr_chain, group_size, stmt, gsi,
&result_chain);