From d2db7f790194ac690beae00f2f7956e3fe865cac Mon Sep 17 00:00:00 2001 From: Andre Vieira Date: Mon, 21 Oct 2019 10:12:18 +0000 Subject: [PATCH] [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 * tree-vect-stmts (ensure_base_align): Only change alignment if new alignment is more restrictive. From-SVN: r277238 --- gcc/ChangeLog | 5 +++++ gcc/tree-vect-stmts.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fbde37cf4ad..799072510e4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-10-21 Andre Vieira + + * tree-vect-stmts (ensure_base_align): Only change alignment if new + alignment is more restrictive. + 2019-10-21 Richard Sandiford * tree-vectorizer.h (vec_info::vector_size): New member variable. diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index d744a84fb2a..6c7b9fe9e66 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -6293,7 +6293,7 @@ ensure_base_align (dr_vec_info *dr_info) if (decl_in_symtab_p (base_decl)) 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); DECL_USER_ALIGN (base_decl) = 1; -- 2.30.2