https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109610
--- Comment #4 from Hongtao.liu <crazylht at gmail dot com> --- > 1 unit cost is aligned with what's did in recog_reg_class > > /* If the alternative actually allows memory, make > things a bit cheaper since we won't need an extra > insn to load it. */ > pp->mem_cost > = ((out_p ? ira_memory_move_cost[mode][op_class][0] : 0) > + (in_p ? ira_memory_move_cost[mode][op_class][1] : 0) > - allows_mem[i]) * frequency; But it regressed other cases, .i.e gcc/testsuite/gcc.target/i386/pr18041-1.c