From e3f650393744790e24820b2d6d99dd1da1a44de6 Mon Sep 17 00:00:00 2001 From: Aleksey Shipilev Date: Mon, 14 Oct 2024 07:55:38 +0000 Subject: [PATCH] 8341893: AArch64: Micro-optimize compressed ptr decoding Reviewed-by: aph, fyang --- src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp index 16473b09fff..9835fb5aca1 100644 --- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp @@ -5011,8 +5011,10 @@ void MacroAssembler::decode_heap_oop(Register d, Register s) { verify_heapbase("MacroAssembler::decode_heap_oop: heap base corrupted?"); #endif if (CompressedOops::base() == nullptr) { - if (CompressedOops::shift() != 0 || d != s) { + if (CompressedOops::shift() != 0) { lsl(d, s, CompressedOops::shift()); + } else if (d != s) { + mov(d, s); } } else { Label done;