RFR: 8349764: RISC-V: C1: Improve Class.isInstance intrinsic [v2]
Hamlin Li
mli at openjdk.org
Thu Feb 13 09:09:15 UTC 2025
On Thu, 13 Feb 2025 04:20:40 GMT, Gui Cao <gcao at openjdk.org> wrote:
>> src/hotspot/cpu/riscv/c1_Runtime1_riscv.cpp line 953:
>>
>>> 951: __ ld(x17, Address(x17));
>>> 952: __ beq(klass, x17, success);
>>> 953: __ j(fail);
>>
>> Hmm, I think this jump could be saved if we put a direct return here instead. Like:
>>
>> __ beq(klass, x17, success);
>> __ mv(result, 0);
>> __ ret();
>>
>> What do you think? @Hamlin-Li @zifeihan
>
> Yes, I think we can put a direct return here.
Yes, seems better.
I was thinking to move bind(fail) here, but seems current lookup_secondary_supers_table_var only accept a success label.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23551#discussion_r1954102465
More information about the hotspot-compiler-dev
mailing list