diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp index 16473b09fff42..9835fb5aca159 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;