https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66444
vries at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |vries at gcc dot gnu.org --- Comment #1 from vries at gcc dot gnu.org --- Tentative patch: ... diff --git a/gcc/postreload.c b/gcc/postreload.c index 7ecca15..1cc7b14 100644 --- a/gcc/postreload.c +++ b/gcc/postreload.c @@ -1352,9 +1352,12 @@ reload_combine (void) if (CALL_P (insn)) { rtx link; + HARD_REG_SET used_regs; + + get_call_reg_set_usage (insn, &used_regs, call_used_reg_set); for (r = 0; r < FIRST_PSEUDO_REGISTER; r++) - if (call_used_regs[r]) + if (TEST_HARD_REG_BIT (used_regs, r)) { reg_state[r].use_index = RELOAD_COMBINE_MAX_USES; reg_state[r].store_ruid = reload_combine_ruid; ... Output with patch: ... movabsq $962072674304, %r8 salq $5, %rax addq %rax, %r8 movq %r8, %rdi call fn1 movq %r8, %rdi call fn2 ...