This adds the missing scalar load cost in the prologue.
2021-10-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/102847
* tree-vect-stmts.c (vect_model_load_cost): Add the scalar
load cost in the prologue for VMAT_INVARIANT.
else if (memory_access_type == VMAT_INVARIANT)
{
/* Invariant loads will ideally be hoisted and splat to a vector. */
+ prologue_cost += record_stmt_cost (cost_vec, 1,
+ scalar_load, stmt_info, 0,
+ vect_prologue);
prologue_cost += record_stmt_cost (cost_vec, 1,
scalar_to_vec, stmt_info, 0,
vect_prologue);