+2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
+ Alan Hayward <alan.hayward@arm.com>
+ David Sherwood <david.sherwood@arm.com>
+
+ * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
+ so that both the length == 3 and length != 3 cases set up their
+ own permute vectors. Add comments explaining why we know the
+ number of elements is constant.
+ (vect_permute_load_chain): Likewise.
+
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
tree perm_mask_low, perm_mask_high;
tree data_ref;
tree perm3_mask_low, perm3_mask_high;
- unsigned int i, n, log_length = exact_log2 (length);
- unsigned int j, nelt = TYPE_VECTOR_SUBPARTS (vectype);
+ unsigned int i, j, n, log_length = exact_log2 (length);
result_chain->quick_grow (length);
memcpy (result_chain->address (), dr_chain.address (),
if (length == 3)
{
+ /* vect_grouped_store_supported ensures that this is constant. */
+ unsigned int nelt = TYPE_VECTOR_SUBPARTS (vectype);
unsigned int j0 = 0, j1 = 0, j2 = 0;
vec_perm_builder sel (nelt, nelt, 1);
gcc_assert (pow2p_hwi (length));
/* The encoding has 2 interleaved stepped patterns. */
+ unsigned int nelt = TYPE_VECTOR_SUBPARTS (vectype);
vec_perm_builder sel (nelt, 2, 3);
sel.quick_grow (6);
for (i = 0; i < 3; i++)
gimple *perm_stmt;
tree vectype = STMT_VINFO_VECTYPE (vinfo_for_stmt (stmt));
unsigned int i, j, log_length = exact_log2 (length);
- unsigned nelt = TYPE_VECTOR_SUBPARTS (vectype);
result_chain->quick_grow (length);
memcpy (result_chain->address (), dr_chain.address (),
if (length == 3)
{
+ /* vect_grouped_load_supported ensures that this is constant. */
+ unsigned nelt = TYPE_VECTOR_SUBPARTS (vectype);
unsigned int k;
vec_perm_builder sel (nelt, nelt, 1);
gcc_assert (pow2p_hwi (length));
/* The encoding has a single stepped pattern. */
+ unsigned int nelt = TYPE_VECTOR_SUBPARTS (vectype);
vec_perm_builder sel (nelt, 1, 3);
sel.quick_grow (3);
for (i = 0; i < 3; ++i)