if (length == 3)
{
/* vect_grouped_store_supported ensures that this is constant. */
- unsigned int nelt = TYPE_VECTOR_SUBPARTS (vectype);
+ unsigned int nelt = TYPE_VECTOR_SUBPARTS (vectype).to_constant ();
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);
+ poly_uint64 nelt = TYPE_VECTOR_SUBPARTS (vectype);
vec_perm_builder sel (nelt, 2, 3);
sel.quick_grow (6);
for (i = 0; i < 3; i++)
perm_mask_high = vect_gen_perm_mask_checked (vectype, indices);
for (i = 0; i < 6; i++)
- sel[i] += nelt / 2;
+ sel[i] += exact_div (nelt, 2);
indices.new_vector (sel, 2, nelt);
perm_mask_low = vect_gen_perm_mask_checked (vectype, indices);
that leaves unused vector loads around punt - we at least create
very sub-optimal code in that case (and blow up memory,
see PR65518). */
- if (single_element_p && count > TYPE_VECTOR_SUBPARTS (vectype))
+ if (single_element_p && maybe_gt (count, TYPE_VECTOR_SUBPARTS (vectype)))
{
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
if (length == 3)
{
/* vect_grouped_load_supported ensures that this is constant. */
- unsigned nelt = TYPE_VECTOR_SUBPARTS (vectype);
+ unsigned nelt = TYPE_VECTOR_SUBPARTS (vectype).to_constant ();
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);
+ poly_uint64 nelt = TYPE_VECTOR_SUBPARTS (vectype);
vec_perm_builder sel (nelt, 1, 3);
sel.quick_grow (3);
for (i = 0; i < 3; ++i)
tree vectype = STMT_VINFO_VECTYPE (vinfo_for_stmt (stmt));
unsigned int i;
- unsigned nelt = TYPE_VECTOR_SUBPARTS (vectype);
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- unsigned HOST_WIDE_INT vf;
- if (!LOOP_VINFO_VECT_FACTOR (loop_vinfo).is_constant (&vf))
+ unsigned HOST_WIDE_INT nelt, vf;
+ if (!TYPE_VECTOR_SUBPARTS (vectype).is_constant (&nelt)
+ || !LOOP_VINFO_VECT_FACTOR (loop_vinfo).is_constant (&vf))
/* Not supported for variable-length vectors. */
return false;