diff options
author | Richard Biener <rguenther@suse.de> | 2013-02-05 15:33:35 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2013-02-05 15:33:35 +0000 |
commit | 14ac6aa24e155affd1829600a5294a8f3cc115cd (patch) | |
tree | 651820d2417bf642f8855ccf72e2ad4c334762ca /gcc/tree-vect-data-refs.c | |
parent | 3654d3cf859b8db78662c0c29fb1ec49e214c420 (diff) | |
download | gcc-14ac6aa24e155affd1829600a5294a8f3cc115cd.zip gcc-14ac6aa24e155affd1829600a5294a8f3cc115cd.tar.gz gcc-14ac6aa24e155affd1829600a5294a8f3cc115cd.tar.bz2 |
re PR tree-optimization/53342 (rnflow.f90 is ~5% slower after revision 187340)
2013-02-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/53342
PR tree-optimization/53185
* tree-vectorizer.h (vect_check_strided_load): Remove.
* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Do
not disallow peeling for vectorized strided loads.
(vect_check_strided_load): Make static and simplify.
(vect_analyze_data_refs): Adjust.
* tree-vect-stmts.c (vectorizable_load): Handle peeled loops
correctly when vectorizing strided loads.
* gcc.dg/vect/pr53185-2.c: New testcase.
From-SVN: r195759
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r-- | gcc/tree-vect-data-refs.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 8a77275..74d8c3a 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -1615,18 +1615,6 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo) && GROUP_FIRST_ELEMENT (stmt_info) != stmt) continue; - /* FORNOW: Any strided load prevents peeling. The induction - variable analysis will fail when the prologue loop is generated, - and so we can't generate the new base for the pointer. */ - if (STMT_VINFO_STRIDE_LOAD_P (stmt_info)) - { - if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "strided load prevents peeling"); - do_peeling = false; - break; - } - /* For invariant accesses there is nothing to enhance. */ if (integer_zerop (DR_STEP (dr))) continue; @@ -2890,9 +2878,8 @@ vect_check_gather (gimple stmt, loop_vec_info loop_vinfo, tree *basep, This handles ARRAY_REFs (with variant index) and MEM_REFs (with variant base pointer) only. */ -bool -vect_check_strided_load (gimple stmt, loop_vec_info loop_vinfo, tree *basep, - tree *stepp) +static bool +vect_check_strided_load (gimple stmt, loop_vec_info loop_vinfo) { struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo); stmt_vec_info stmt_info = vinfo_for_stmt (stmt); @@ -2925,10 +2912,6 @@ vect_check_strided_load (gimple stmt, loop_vec_info loop_vinfo, tree *basep, || !simple_iv (loop, loop_containing_stmt (stmt), off, &iv, true)) return false; - if (basep) - *basep = iv.base; - if (stepp) - *stepp = iv.step; return true; } @@ -3473,8 +3456,7 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo, { bool strided_load = false; if (!nested_in_vect_loop_p (loop, stmt)) - strided_load - = vect_check_strided_load (stmt, loop_vinfo, NULL, NULL); + strided_load = vect_check_strided_load (stmt, loop_vinfo); if (!strided_load) { if (dump_enabled_p ()) |