FOR_EACH_VEC_ELT (datarefs, i, dr)
{
dr_vec_info *dr_info = loop_vinfo->lookup_dr (dr);
- stmt_vec_info stmt_info = dr_info->stmt;
-
- if (!STMT_VINFO_RELEVANT_P (stmt_info))
- continue;
-
- /* For interleaving, only the alignment of the first access
- matters. */
- if (STMT_VINFO_GROUPED_ACCESS (stmt_info)
- && DR_GROUP_FIRST_ELEMENT (stmt_info) != stmt_info)
- continue;
-
- /* For scatter-gather or invariant accesses there is nothing
- to enhance. */
- if (STMT_VINFO_GATHER_SCATTER_P (stmt_info)
- || integer_zerop (DR_STEP (dr)))
- continue;
-
- /* Strided accesses perform only component accesses, alignment is
- irrelevant for them. */
- if (STMT_VINFO_STRIDED_P (stmt_info)
- && !STMT_VINFO_GROUPED_ACCESS (stmt_info))
+ if (!vect_relevant_for_alignment_p (dr_info))
continue;
+ stmt_vec_info stmt_info = dr_info->stmt;
supportable_dr_alignment
= vect_supportable_dr_alignment (loop_vinfo, dr_info, true);
do_peeling = vector_alignment_reachable_p (dr_info);
FOR_EACH_VEC_ELT (datarefs, i, dr)
if (dr != dr0_info->dr)
{
- /* Strided accesses perform only component accesses, alignment
- is irrelevant for them. */
dr_vec_info *dr_info = loop_vinfo->lookup_dr (dr);
- stmt_info = dr_info->stmt;
- if (STMT_VINFO_STRIDED_P (stmt_info)
- && !STMT_VINFO_GROUPED_ACCESS (stmt_info))
+ if (!vect_relevant_for_alignment_p (dr_info))
continue;
vect_update_misalignment_for_peel (dr_info, dr0_info, npeel);