else
kind = scalar_stmt;
+ /* We are using vect_prologue here to avoid scaling twice
+ by the inner loop factor. */
record_stmt_cost (&LOOP_VINFO_SCALAR_ITERATION_COST (loop_vinfo),
factor, kind, stmt_info, 0, vect_prologue);
}
j, si)
(void) add_stmt_cost (loop_vinfo, target_cost_data, si->count,
si->kind, si->stmt_info, si->vectype,
- si->misalign, vect_body);
- unsigned dummy, body_cost = 0;
- finish_cost (target_cost_data, &dummy, &body_cost, &dummy);
+ si->misalign, si->where);
+ unsigned prologue_cost = 0, body_cost = 0, epilogue_cost = 0;
+ finish_cost (target_cost_data, &prologue_cost, &body_cost,
+ &epilogue_cost);
destroy_cost_data (target_cost_data);
- LOOP_VINFO_SINGLE_SCALAR_ITERATION_COST (loop_vinfo) = body_cost;
+ LOOP_VINFO_SINGLE_SCALAR_ITERATION_COST (loop_vinfo)
+ = prologue_cost + body_cost + epilogue_cost;
}