summaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index d4444fdad90..cd607a0d48d 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -1640,7 +1640,9 @@ calculate_elim_costs_all_insns (void)
{
rtx t = eliminate_regs_1 (SET_SRC (set), VOIDmode, insn,
false, true);
- int cost = set_src_cost (t, optimize_bb_for_speed_p (bb));
+ machine_mode mode = GET_MODE (SET_DEST (set));
+ int cost = set_src_cost (t, mode,
+ optimize_bb_for_speed_p (bb));
int freq = REG_FREQ_FROM_BB (bb);
reg_equiv_init_cost[regno] = cost * freq;
@@ -2512,7 +2514,8 @@ note_reg_elim_costly (const_rtx x, rtx insn)
{
rtx t = reg_equiv_invariant (REGNO (x));
rtx new_rtx = eliminate_regs_1 (t, Pmode, insn, true, true);
- int cost = set_src_cost (new_rtx, optimize_bb_for_speed_p (elim_bb));
+ int cost = set_src_cost (new_rtx, Pmode,
+ optimize_bb_for_speed_p (elim_bb));
int freq = REG_FREQ_FROM_BB (elim_bb);
if (cost != 0)