Commit d2db7f79 by Andre Vieira Committed by Andre Vieira

[vect] Only change base alignment if more restrictive

This patch makes sure ensure_base_align only changes alignment if the new
alignment is more restrictive.  It already did this if we were dealing with
symbols, but it now does it for all types of declarations.

gcc/ChangeLog:
2019-10-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>

	* tree-vect-stmts (ensure_base_align): Only change alignment if new
	alignment is more restrictive.

From-SVN: r277238
parent 3669c308
2019-10-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
* tree-vect-stmts (ensure_base_align): Only change alignment if new
alignment is more restrictive.
2019-10-21 Richard Sandiford <richard.sandiford@arm.com> 2019-10-21 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vec_info::vector_size): New member variable. * tree-vectorizer.h (vec_info::vector_size): New member variable.
...@@ -6293,7 +6293,7 @@ ensure_base_align (dr_vec_info *dr_info) ...@@ -6293,7 +6293,7 @@ ensure_base_align (dr_vec_info *dr_info)
if (decl_in_symtab_p (base_decl)) if (decl_in_symtab_p (base_decl))
symtab_node::get (base_decl)->increase_alignment (align_base_to); symtab_node::get (base_decl)->increase_alignment (align_base_to);
else else if (DECL_ALIGN (base_decl) < align_base_to)
{ {
SET_DECL_ALIGN (base_decl, align_base_to); SET_DECL_ALIGN (base_decl, align_base_to);
DECL_USER_ALIGN (base_decl) = 1; DECL_USER_ALIGN (base_decl) = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment