]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Fix register move cost for SIBCALL_REGS/JALR_REGS
authorZhijin Zeng <zengzhijin@linux.spacemit.com>
Mon, 28 Apr 2025 01:24:16 +0000 (09:24 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Tue, 29 Apr 2025 13:24:56 +0000 (21:24 +0800)
commit102eccaf8e2f914d3afbf7acfcee19bc5b240eca
tree3b24c36e101e49c53d05aae1894d2255ae424895
parentaa93272cfd2233858da0792761387cc27f4d5ff3
RISC-V: Fix register move cost for SIBCALL_REGS/JALR_REGS

SIBCALL_REGS/JALR_REGS are also subset of GR_REGS and need to
be taken into acount in riscv_register_move_cost, otherwise it
will get a incorrect cost.

gcc/ChangeLog:

* config/riscv/riscv.cc (riscv_register_move_cost): Use
reg_class_subset_p to check the reg class.
gcc/config/riscv/riscv.cc