Reduce the number of aligned_access_p calls

This uses the computed alignment scheme in vectorizable_store
much like vectorizable_load does instead of re-querying
it via aligned_access_p.

2021-10-18  Richard Biener  <rguenther@suse.de>

	* tree-vect-stmts.c (vectorizable_store): Use the
	computed alignment scheme instead of querying
	aligned_access_p.
This commit is contained in:
Richard Biener 2021-10-18 13:54:34 +02:00
parent b0ea7a8409
commit c9ff458184

View File

@ -8213,8 +8213,11 @@ vectorizable_store (vec_info *vinfo,
vec_oprnd = result_chain[i];
align = known_alignment (DR_TARGET_ALIGNMENT (first_dr_info));
if (aligned_access_p (first_dr_info, vectype))
misalign = 0;
if (alignment_support_scheme == dr_aligned)
{
gcc_assert (aligned_access_p (first_dr_info, vectype));
misalign = 0;
}
else if (dr_misalignment (first_dr_info, vectype)
== DR_MISALIGNMENT_UNKNOWN)
{
@ -8299,8 +8302,8 @@ vectorizable_store (vec_info *vinfo,
dataref_offset
? dataref_offset
: build_int_cst (ref_type, 0));
if (aligned_access_p (first_dr_info, vectype))
;
if (alignment_support_scheme == dr_aligned)
gcc_assert (aligned_access_p (first_dr_info, vectype));
else
TREE_TYPE (data_ref)
= build_aligned_type (TREE_TYPE (data_ref),