diff options
author | Michael Matz <matz@gcc.gnu.org> | 2015-05-21 14:36:04 +0000 |
---|---|---|
committer | Michael Matz <matz@gcc.gnu.org> | 2015-05-21 14:36:04 +0000 |
commit | f2e2a985429ab708a31abf0bd3bc3df9dbbc3033 (patch) | |
tree | 0e30ba12cbe5abeb6eff428b7c9e77d9e6a0c97a /gcc/tree-vect-data-refs.c | |
parent | 1e43cc9461ba4f73939c94f07d2f5b305943eb29 (diff) | |
download | gcc-f2e2a985429ab708a31abf0bd3bc3df9dbbc3033.zip gcc-f2e2a985429ab708a31abf0bd3bc3df9dbbc3033.tar.gz gcc-f2e2a985429ab708a31abf0bd3bc3df9dbbc3033.tar.bz2 |
tree-vectorizer.h (struct _stmt_vec_info): Rename stride_load_p to strided_p.
* tree-vectorizer.h (struct _stmt_vec_info): Rename stride_load_p
to strided_p.
(STMT_VINFO_STRIDE_LOAD_P): Rename to ...
(STMT_VINFO_STRIDED_P): ... this.
* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Adjust.
(vect_verify_datarefs_alignment): Likewise.
(vect_enhance_data_refs_alignment): Likewise.
(vect_analyze_data_ref_access): Likewise.
(vect_analyze_data_refs): Accept strided stores.
* tree-vect-stmts.c (vect_model_store_cost): Count strided stores.
(vect_model_load_cost): Adjust for macro rename.
(vectorizable_mask_load_store): Likewise.
(vectorizable_load): Likewise.
(vectorizable_store): Open code strided stores.
testsuite/
* gcc.dg/vect/vect-strided-store.c: New test.
* gfortran.dg/vect/fast-math-pr37021.f90: Adjust.
* gfortran.dg/vect/fast-math-rnflow-trs2a2.f90: Adjust.
From-SVN: r223486
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r-- | gcc/tree-vect-data-refs.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 7e93899..3b8405f 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -663,9 +663,9 @@ vect_compute_data_ref_alignment (struct data_reference *dr) /* Initialize misalignment to unknown. */ SET_DR_MISALIGNMENT (dr, -1); - /* Strided loads perform only component accesses, misalignment information + /* Strided accesses perform only component accesses, misalignment information is irrelevant for them. */ - if (STMT_VINFO_STRIDE_LOAD_P (stmt_info) + if (STMT_VINFO_STRIDED_P (stmt_info) && !STMT_VINFO_GROUPED_ACCESS (stmt_info)) return true; @@ -942,9 +942,9 @@ vect_verify_datarefs_alignment (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo) || !STMT_VINFO_VECTORIZABLE (stmt_info)) continue; - /* Strided loads perform only component accesses, alignment is + /* Strided accesses perform only component accesses, alignment is irrelevant for them. */ - if (STMT_VINFO_STRIDE_LOAD_P (stmt_info) + if (STMT_VINFO_STRIDED_P (stmt_info) && !STMT_VINFO_GROUPED_ACCESS (stmt_info)) continue; @@ -1410,9 +1410,9 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo) if (integer_zerop (DR_STEP (dr))) continue; - /* Strided loads perform only component accesses, alignment is + /* Strided accesses perform only component accesses, alignment is irrelevant for them. */ - if (STMT_VINFO_STRIDE_LOAD_P (stmt_info) + if (STMT_VINFO_STRIDED_P (stmt_info) && !STMT_VINFO_GROUPED_ACCESS (stmt_info)) continue; @@ -1703,9 +1703,9 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo) && GROUP_FIRST_ELEMENT (stmt_info) != stmt) continue; - /* Strided loads perform only component accesses, alignment is + /* Strided accesses perform only component accesses, alignment is irrelevant for them. */ - if (STMT_VINFO_STRIDE_LOAD_P (stmt_info) + if (STMT_VINFO_STRIDED_P (stmt_info) && !STMT_VINFO_GROUPED_ACCESS (stmt_info)) continue; @@ -1824,7 +1824,7 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo) && GROUP_FIRST_ELEMENT (stmt_info) != stmt)) continue; - if (STMT_VINFO_STRIDE_LOAD_P (stmt_info)) + if (STMT_VINFO_STRIDED_P (stmt_info)) { /* Strided loads perform only component accesses, alignment is irrelevant for them. */ @@ -2346,7 +2346,7 @@ vect_analyze_data_ref_access (struct data_reference *dr) /* Assume this is a DR handled by non-constant strided load case. */ if (TREE_CODE (step) != INTEGER_CST) - return (STMT_VINFO_STRIDE_LOAD_P (stmt_info) + return (STMT_VINFO_STRIDED_P (stmt_info) && (!STMT_VINFO_GROUPED_ACCESS (stmt_info) || vect_analyze_group_access (dr))); @@ -3758,8 +3758,7 @@ again: else if (loop_vinfo && TREE_CODE (DR_STEP (dr)) != INTEGER_CST) { - if (nested_in_vect_loop_p (loop, stmt) - || !DR_IS_READ (dr)) + if (nested_in_vect_loop_p (loop, stmt)) { if (dump_enabled_p ()) { @@ -3771,7 +3770,7 @@ again: } return false; } - STMT_VINFO_STRIDE_LOAD_P (stmt_info) = true; + STMT_VINFO_STRIDED_P (stmt_info) = true; } } |