RFR: 8341893: AArch64: Micro-optimize compressed ptr decoding

Aleksey Shipilev shade at openjdk.org
Thu Oct 10 13:22:12 UTC 2024


On Thu, 10 Oct 2024 09:52:44 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 5017:
>> 
>>> 5015:       lsl(d, s, CompressedOops::shift());
>>> 5016:     } else if (d != s) {
>>> 5017:       mov(d, s);
>> 
>> I think `MacroAssembler::mov` already does the `d != s` optimization, but perhaps it's clearer to do it here as well.
>
> Yes, `mov` does the `d != s` optimization. I have no preference whether we do check here or rely on downstream check. Just peeling the `d != s` test from the original if-expression seems marginally easier when thinking about the patch impact.

It is not very clear if you fine with this patch, @aph, or you want me to skip `d != s` check here. :)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21443#discussion_r1795417461


More information about the hotspot-dev mailing list