summaryrefslogtreecommitdiff
path: root/gcc/tree-vect-data-refs.c
diff options
context:
space:
mode:
authoruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-10 13:21:31 +0000
committeruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-10 13:21:31 +0000
commit02a91dd89aa99876330db9a63e24b7f285abf469 (patch)
tree1dbd3024b6b2df28ab05fd3e0e5120e701087792 /gcc/tree-vect-data-refs.c
parentf487ab533a4f420d3b0a99931d0cd8e9eccbdc42 (diff)
downloadgcc-02a91dd89aa99876330db9a63e24b7f285abf469.tar.gz
ChangeLog:
Backport from mainline 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org> Richard Earnshaw <rearnsha@arm.com> * target.def (vector_alignment): New target hook. * doc/tm.texi.in (TARGET_VECTOR_ALIGNMENT): Document new hook. * doc/tm.texi: Regenerate. * targhooks.c (default_vector_alignment): New function. * targhooks.h (default_vector_alignment): Add prototype. * stor-layout.c (layout_type): Use targetm.vector_alignment. * config/arm/arm.c (arm_vector_alignment): New function. (TARGET_VECTOR_ALIGNMENT): Define. * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Use vector type alignment instead of size. * tree-vect-loop-manip.c (vect_do_peeling_for_loop_bound): Use element type size directly instead of computing it from alignment. Fix variable naming and comment. testsuite/ChangeLog: Backport from mainline 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org> * lib/target-supports.exp (check_effective_target_vect_natural_alignment): New function. * gcc.dg/align-2.c: Only run on targets with natural alignment of vector types. * gcc.dg/vect/slp-25.c: Adjust tests for targets without natural alignment of vector types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@190295 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r--gcc/tree-vect-data-refs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 2d8142e8460..79c0f1dab7b 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -1023,7 +1023,7 @@ vect_update_misalignment_for_peel (struct data_reference *dr,
int misal = DR_MISALIGNMENT (dr);
tree vectype = STMT_VINFO_VECTYPE (stmt_info);
misal += negative ? -npeel * dr_size : npeel * dr_size;
- misal &= GET_MODE_SIZE (TYPE_MODE (vectype)) - 1;
+ misal &= (TYPE_ALIGN (vectype) / BITS_PER_UNIT) - 1;
SET_DR_MISALIGNMENT (dr, misal);
return;
}