aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-data-refs.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-02-10 11:48:47 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-02-10 11:48:47 +0000
commit696814edb80cfae8840213cf3e3100d0265944bd (patch)
tree23cfbb89274e498a827a4e773622710dfa8b4ded /gcc/tree-vect-data-refs.c
parent644a47612e7b5919bb36df5d6c0b28992d99ce5f (diff)
downloadgcc-696814edb80cfae8840213cf3e3100d0265944bd.zip
gcc-696814edb80cfae8840213cf3e3100d0265944bd.tar.gz
gcc-696814edb80cfae8840213cf3e3100d0265944bd.tar.bz2
re PR tree-optimization/64909 (Missed vectorization with bdver1)
2015-02-10 Richard Biener <rguenther@suse.de> PR tree-optimization/64909 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Properly pass a scalar-stmt count estimate to the cost model. * tree-vect-data-refs.c (vect_peeling_hash_get_lowest_cost): Likewise. * gcc.dg/vect/costmodel/x86_64/costmodel-pr64909.c: New testcase. From-SVN: r220580
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r--gcc/tree-vect-data-refs.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 302f2df..2c74060 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -1184,10 +1184,13 @@ vect_peeling_hash_get_lowest_cost (_vect_peel_info **slot,
}
single_iter_cost = vect_get_single_scalar_iteration_cost (loop_vinfo);
- outside_cost += vect_get_known_peeling_cost (loop_vinfo, elem->npeel,
- &dummy, single_iter_cost,
- &prologue_cost_vec,
- &epilogue_cost_vec);
+ outside_cost += vect_get_known_peeling_cost
+ (loop_vinfo, elem->npeel, &dummy,
+ /* ??? We use this cost as number of stmts with scalar_stmt cost,
+ thus divide by that. This introduces rounding errors, thus better
+ introduce a new cost kind (raw_cost? scalar_iter_cost?). */
+ single_iter_cost / vect_get_stmt_cost (scalar_stmt),
+ &prologue_cost_vec, &epilogue_cost_vec);
/* Prologue and epilogue costs are added to the target model later.
These costs depend only on the scalar iteration cost, the