RISC-V: costs: handle BSWAP
authorPhilipp Tomsich <philipp.tomsich@vrull.eu>
Fri, 18 Dec 2020 09:00:34 +0000 (10:00 +0100)
committerPhilipp Tomsich <philipp.tomsich@vrull.eu>
Wed, 9 Nov 2022 09:31:48 +0000 (10:31 +0100)
commite7c8f5005bf87e4bd95b25fb31430eef7e58097e
treeca69810256667d14f6c2ab2e55975667730a42b7
parentd699d32f47833cfab959a810dad48774c021c677
RISC-V: costs: handle BSWAP

The BSWAP operation is not handled in rtx_costs. Add it.

With Zbb, BSWAP for XLEN is a single instruction; for smaller modes,
it will expand into two.

gcc/ChangeLog:

* config/riscv/riscv.cc (riscv_rtx_costs): Add BSWAP.
gcc/config/riscv/riscv.cc