aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/tree-vect-stmts.c
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2014-09-03 15:53:59 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-09-03 15:54:00 +0000
commit54737a0f41ce0bf1e8f7f8d6d8e3170ef51e07c2 (patch)
treeafd56565c7170158a14ce5c2fa2a1c8752cf5cb2 /gcc-4.9/gcc/tree-vect-stmts.c
parentecf187208f8ec68c49823080179fa1b5f448a35d (diff)
parent55f9fbb03d0413cb8fe74e5ec5d6c2dd4280933e (diff)
downloadtoolchain_gcc-54737a0f41ce0bf1e8f7f8d6d8e3170ef51e07c2.tar.gz
toolchain_gcc-54737a0f41ce0bf1e8f7f8d6d8e3170ef51e07c2.tar.bz2
toolchain_gcc-54737a0f41ce0bf1e8f7f8d6d8e3170ef51e07c2.zip
Merge "[4.8, 4.9] Backport of additional SLM tuning."
Diffstat (limited to 'gcc-4.9/gcc/tree-vect-stmts.c')
-rw-r--r--gcc-4.9/gcc/tree-vect-stmts.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc-4.9/gcc/tree-vect-stmts.c b/gcc-4.9/gcc/tree-vect-stmts.c
index 1a51d6d7b..b87c14345 100644
--- a/gcc-4.9/gcc/tree-vect-stmts.c
+++ b/gcc-4.9/gcc/tree-vect-stmts.c
@@ -1091,10 +1091,11 @@ vect_model_load_cost (stmt_vec_info stmt_info, int ncopies,
include the cost of the permutes. */
if (!load_lanes_p && group_size > 1)
{
- /* Uses an even and odd extract operations for each needed permute. */
- int nstmts = ncopies * exact_log2 (group_size) * group_size;
- inside_cost += record_stmt_cost (body_cost_vec, nstmts, vec_perm,
- stmt_info, 0, vect_body);
+ /* Uses an even and odd extract operations or shuffle operations
+ for each needed permute. */
+ int nstmts = ncopies * ceil_log2 (group_size) * group_size;
+ inside_cost = record_stmt_cost (body_cost_vec, nstmts, vec_perm,
+ stmt_info, 0, vect_body);
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,