Hi Victor,
> - if (*memory_access_type == VMAT_ELEMENTWISE
> - || *memory_access_type == VMAT_GATHER_SCATTER_LEGACY
> + if (*memory_access_type == VMAT_ELEMENTWISE)
> + {
> + if (dr_safe_speculative_read_required (stmt_info)
> + && !STMT_VINFO_GATHER_SCATTER_P (stmt_info)
> + && !DR_SCALAR_KNOWN_BOUNDS (STMT_VINFO_DR_INFO (stmt_info)))
> + *alignment_support_scheme = dr_aligned;
> + else
> + *alignment_support_scheme = dr_unaligned_supported;
> + *misalignment = DR_MISALIGNMENT_UNKNOWN;
> + }
> +
> + else if (*memory_access_type == VMAT_GATHER_SCATTER_LEGACY
> || *memory_access_type == VMAT_STRIDED_SLP
> || *memory_access_type == VMAT_INVARIANT)
> {
I'm still a bit confused here :)
misalignment looks ok to me but is the
> + && !STMT_VINFO_GATHER_SCATTER_P (stmt_info)
condition important? Shouldn't we have set one of the mat_gather_scatter_p
VMAT types in that case already?
Or going even further, don't we always need dr_aligned if
dr_safe_speculative_read_required, mostly independent of the access type?
Then let the rest of the code deal with/decline other VMATs?
One war or another, would you mind adding a comment similar to
"Even though VMAT_ELEMENTWISE's individual accesses do not cause alignment
problems, loading the whole vector in a speculative early-break context might
cross a page boundary. Set the alignment scheme to dr_aligned here in order to
force in-depth checking below"
--
Regards
Robin