Since last patch introduced get_fr2vr_cost () to get the correct cost to move
data from a floating-point to a vector register, this patch replaces existing
uses of the constant FR2VR.
gcc/ChangeLog:
* config/riscv/riscv-vector-costs.cc (costs::adjust_stmt_cost): Replace
FR2VR with get_fr2vr_cost ().
* config/riscv/riscv.cc (riscv_register_move_cost): Likewise.
(riscv_builtin_vectorization_cost): Likewise.
switch (kind)
{
case scalar_to_vec:
- stmt_cost += (FLOAT_TYPE_P (vectype) ? costs->regmove->FR2VR
- : get_gr2vr_cost ());
+ stmt_cost
+ += (FLOAT_TYPE_P (vectype) ? get_fr2vr_cost () : get_gr2vr_cost ());
break;
case vec_to_scalar:
stmt_cost += (FLOAT_TYPE_P (vectype) ? costs->regmove->VR2FR
if (from_is_gpr)
return get_gr2vr_cost ();
else if (from_is_fpr)
- return get_vector_costs ()->regmove->FR2VR;
+ return get_fr2vr_cost ();
}
return riscv_secondary_memory_needed (mode, from, to) ? 8 : 2;
case vec_construct:
{
/* TODO: This is too pessimistic in case we can splat. */
- int regmove_cost = fp ? costs->regmove->FR2VR
- : get_gr2vr_cost ();
+ int regmove_cost = fp ? get_fr2vr_cost () : get_gr2vr_cost ();
return (regmove_cost + common_costs->scalar_to_vec_cost)
* estimated_poly_value (TYPE_VECTOR_SUBPARTS (vectype));
}