RFR: 8352607: RISC-V: use cmove in min/max when Zicond is supported
Robbin Ehn
rehn at openjdk.org
Mon Mar 24 09:36:05 UTC 2025
On Mon, 24 Mar 2025 09:27:45 GMT, Hamlin Li <mli at openjdk.org> wrote:
>> For performance consideration please check existing `CMoveI`, which calls `enc_cmove` which calls `cmov_xx`. So if `CMoveI` brings benefit when `UseZicond == true` over `UseZicond != true`, this refactoring should also works expected, as they use the same code.
>>
>> As for the question, whether a hardware will support `zicond` but not `zbb`, I have no answer.
>>
>> But, anyway in fact you can just consider this as a code cleanup, in this sense seems it should be good?
>
>> better to have seperate match rules.
>
> We could also do the similar thing to `CMoveX`, for this part I can do it in a separate PR together if this one is accecpted.
Yes, good point, I think we need to update the cost for some others as well.
We can do that separately.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24153#discussion_r2009799536
More information about the hotspot-compiler-dev
mailing list