]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Avoid premature alignment setting in vect_duplicate_ssa_name_ptr_info
authorRichard Biener <rguenther@suse.de>
Mon, 20 Sep 2021 09:20:19 +0000 (11:20 +0200)
committerRichard Biener <rguenther@suse.de>
Mon, 20 Sep 2021 09:25:18 +0000 (11:25 +0200)
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.

2021-09-20  Richard Biener  <rguenther@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

index 1a7abe3ff29a27452f011e28b9d2e99377d30732..a57700f2c1b4df94e0a49bfc42568036f14c7c77 100644 (file)
@@ -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.