RFR: 8334396: RISC-V: verify perf of ReverseBytesI/L

Hamlin Li mli at openjdk.org
Wed Jun 19 14:27:12 UTC 2024


On Wed, 19 Jun 2024 12:35:09 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

> Hi, a Q.
> 
> The cost in AD file is: `ins_cost(ALU_COST * 2);`
> 
> Without ZBB it looks like it should be 17x. As we don't know if the alternative is alwasy cheaper, so why not set the cost correctly and the compiler would do the right thing ? Meaning we can still have instrinsic but with correct cost?

Seems the compiler will not decide whether to pick an intrinsic or just JIT it based on the cost of the supplied instrinsic. And I think the test result confirm this point.
So, if one intrinsic is poorer than JIT version in performance, what we can do is to remove it.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/19750#issuecomment-2178848838


More information about the hotspot-compiler-dev mailing list