This removes adjusting alignment based on the vectorized accesses and instead keeps what was set on the original access. The code generating the actual accesses make sure to properly align the vectorized accesses based on the generated pointer already and the vectorizers alignment is always based of the desired alignment of a vector type and thus will reset alignment to unknown this way for example when doing strided accesses.
Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-09-20 Richard Biener <rguent...@suse.de> * tree-vect-data-refs.c (vect_duplicate_ssa_name_ptr_info): Do not compute alignment of the vectorized access here. --- gcc/tree-vect-data-refs.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 1a7abe3ff29..a57700f2c1b 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -4635,13 +4635,6 @@ static void vect_duplicate_ssa_name_ptr_info (tree name, dr_vec_info *dr_info) { duplicate_ssa_name_ptr_info (name, DR_PTR_INFO (dr_info->dr)); - int misalign = DR_MISALIGNMENT (dr_info); - if (misalign == DR_MISALIGNMENT_UNKNOWN) - mark_ptr_info_alignment_unknown (SSA_NAME_PTR_INFO (name)); - else - set_ptr_info_alignment (SSA_NAME_PTR_INFO (name), - known_alignment (DR_TARGET_ALIGNMENT (dr_info)), - misalign); } /* Function vect_create_addr_base_for_vector_ref. -- 2.31.1