Thank you for your comments. I also think that the description of cost may need further improvement. For example, I noticed that when the destination address of SET is a register, riscv_rtx_costs will always return true, but we haven't covered all scenarios.
On Tue, Aug 27, 2024 at 05:42:36PM +0800, Kito Cheng wrote: > LGTM, good catch, and I am a little suppressed that we don't handle > "case REG" in riscv_rtx_costs...but adding that might disturb too much > at once, so this fix is fine for now, and ...and I guess we should > improve that in future. > >