From: Richard Biener Date: Wed, 9 Nov 2016 08:08:58 +0000 (+0000) Subject: tree-vect-data-refs.c (vect_compute_data_ref_alignment): Look at the DR_BASE_ADDRESS... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5b3fa6a166eb8027b6e77343a347929767da329d;p=gcc.git tree-vect-data-refs.c (vect_compute_data_ref_alignment): Look at the DR_BASE_ADDRESS object for forcing alignment. 2016-11-09 Richard Biener * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Look at the DR_BASE_ADDRESS object for forcing alignment. From-SVN: r241991 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a76e3e82b54..a96c955bf07 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-11-09 Richard Biener + + * tree-vect-data-refs.c (vect_compute_data_ref_alignment): + Look at the DR_BASE_ADDRESS object for forcing alignment. + 2016-11-09 Kugan Vivekanandarajah * ipa-cp.c (ipa_get_jf_pass_through_result): Handle unary expressions. diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index f014d688036..220dc302627 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -813,12 +813,9 @@ vect_compute_data_ref_alignment (struct data_reference *dr) if (base_alignment < TYPE_ALIGN (vectype)) { - /* Strip an inner MEM_REF to a bare decl if possible. */ - if (TREE_CODE (base) == MEM_REF - && integer_zerop (TREE_OPERAND (base, 1)) - && TREE_CODE (TREE_OPERAND (base, 0)) == ADDR_EXPR) - base = TREE_OPERAND (TREE_OPERAND (base, 0), 0); - + base = base_addr; + if (TREE_CODE (base) == ADDR_EXPR) + base = TREE_OPERAND (base, 0); if (!vect_can_force_dr_alignment_p (base, TYPE_ALIGN (vectype))) { if (dump_enabled_p ())