diff options
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index dbf99d62dac..ccf7619df84 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -3874,9 +3874,6 @@ reload_as_needed (live_known) spill_reg_order); } - if (num_eliminable && chain->need_elim) - update_eliminable_offsets (); - if (n_reloads > 0) { rtx next = NEXT_INSN (insn); @@ -3923,6 +3920,10 @@ reload_as_needed (live_known) NOTE_LINE_NUMBER (p) = NOTE_INSN_DELETED; } } + + if (num_eliminable && chain->need_elim) + update_eliminable_offsets (); + /* Any previously reloaded spilled pseudo reg, stored in this insn, is no longer validly lying around to save a future reload. Note that this does not detect pseudos that were reloaded @@ -7599,7 +7600,9 @@ delete_output_reload (insn, j, last_reload_reg) } n_occurrences = count_occurrences (PATTERN (insn), reg, 0); if (substed) - n_occurrences += count_occurrences (PATTERN (insn), substed, 0); + n_occurrences += count_occurrences (PATTERN (insn), + eliminate_regs (substed, 0, + NULL_RTX), 0); if (n_occurrences > n_inherited) return; |