diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-07-03 13:36:45 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-07-03 13:36:45 +0000 |
commit | 832b4117d4068670cc9ed496a7ab06104a12dc00 (patch) | |
tree | 212a6cb0ef5981580051a51ecd93ab60de8b92c8 /gcc/tree-vect-stmts.c | |
parent | e054a1852bf903139a80f34c726453d34338e008 (diff) | |
download | gcc-832b4117d4068670cc9ed496a7ab06104a12dc00.zip gcc-832b4117d4068670cc9ed496a7ab06104a12dc00.tar.gz gcc-832b4117d4068670cc9ed496a7ab06104a12dc00.tar.bz2 |
Add DR_STEP_ALIGNMENT
A later patch adds base alignment information to innermost_loop_behavior.
After that, the only remaining piece of alignment information that wasn't
immediately obvious was the step alignment. Adding that allows a minor
simplification to vect_compute_data_ref_alignment, and also potentially
improves the handling of variable strides for outer loop vectorisation.
A later patch will also use it to give the alignment of the DR as a whole.
2017-07-03 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
* tree-data-ref.h (innermost_loop_behavior): Add a step_alignment
field.
(DR_STEP_ALIGNMENT): New macro.
* tree-vectorizer.h (STMT_VINFO_DR_STEP_ALIGNMENT): Likewise.
* tree-data-ref.c (dr_analyze_innermost): Initalize step_alignment.
(create_data_ref): Print it.
* tree-vect-stmts.c (vectorizable_load): Use the step alignment
to tell whether the step preserves vector (mis)alignment.
* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
Move the check for an integer step and generalise to all INTEGER_CST.
(vect_analyze_data_refs): Set DR_STEP_ALIGNMENT when setting DR_STEP.
Print the outer step alignment.
From-SVN: r249915
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r-- | gcc/tree-vect-stmts.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 1067421..f01f297 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -7288,8 +7288,7 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt, nested within an outer-loop that is being vectorized. */ if (nested_in_vect_loop - && (TREE_INT_CST_LOW (DR_STEP (dr)) - % GET_MODE_SIZE (TYPE_MODE (vectype)) != 0)) + && (DR_STEP_ALIGNMENT (dr) % GET_MODE_SIZE (TYPE_MODE (vectype))) != 0) { gcc_assert (alignment_support_scheme != dr_explicit_realign_optimized); compute_in_loop = true; |