aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-data-refs.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-01-29 12:53:39 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-01-29 12:53:39 +0000
commit62c004451aaecf4d5cfdd0db776165410e017f75 (patch)
treebbeea17fac83e1a3b225fee52272427e10e97163 /gcc/tree-vect-data-refs.c
parent85d44192f61187b585b88c26016a4407cfe90ed3 (diff)
downloadgcc-62c004451aaecf4d5cfdd0db776165410e017f75.zip
gcc-62c004451aaecf4d5cfdd0db776165410e017f75.tar.gz
gcc-62c004451aaecf4d5cfdd0db776165410e017f75.tar.bz2
re PR target/64844 (Vectorization inhibited in gcc5 when loop starts with elem[1], aarch64 perf regression from 4.9.1)
2015-01-29 Richard Biener <rguenther@suse.de> PR tree-optimization/64844 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Always dump cost model analysis. * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Do not register adjusted load/store costs here. * gcc.dg/vect/pr64844.c: New testcase. From-SVN: r220244
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r--gcc/tree-vect-data-refs.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 52d6a86..302f2df 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -1763,9 +1763,6 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
if (do_peeling)
{
- stmt_info_for_cost *si;
- void *data = LOOP_VINFO_TARGET_COST_DATA (loop_vinfo);
-
/* (1.2) Update the DR_MISALIGNMENT of each data reference DR_i.
If the misalignment of DR_i is identical to that of dr0 then set
DR_MISALIGNMENT (DR_i) to zero. If the misalignment of DR_i and
@@ -1791,20 +1788,10 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
dump_printf_loc (MSG_NOTE, vect_location,
"Peeling for alignment will be applied.\n");
}
- /* We've delayed passing the inside-loop peeling costs to the
- target cost model until we were sure peeling would happen.
- Do so now. */
- if (body_cost_vec.exists ())
- {
- FOR_EACH_VEC_ELT (body_cost_vec, i, si)
- {
- struct _stmt_vec_info *stmt_info
- = si->stmt ? vinfo_for_stmt (si->stmt) : NULL;
- (void) add_stmt_cost (data, si->count, si->kind, stmt_info,
- si->misalign, vect_body);
- }
- body_cost_vec.release ();
- }
+ /* The inside-loop cost will be accounted for in vectorizable_load
+ and vectorizable_store correctly with adjusted alignments.
+ Drop the body_cst_vec on the floor here. */
+ body_cost_vec.release ();
stat = vect_verify_datarefs_alignment (loop_vinfo, NULL);
gcc_assert (stat);