diff --git a/erts/emulator/beam/jit/arm/beam_asm.hpp b/erts/emulator/beam/jit/arm/beam_asm.hpp index f4dff0cb7b9e..91294e6d058f 100644 --- a/erts/emulator/beam/jit/arm/beam_asm.hpp +++ b/erts/emulator/beam/jit/arm/beam_asm.hpp @@ -1102,14 +1102,13 @@ class BeamModuleAssembler : public BeamAssembler, if (cached_reg.isValid()) { /* This memory location is cached. */ - if (cached_reg != dst) { + if (cached_reg == dst) { + comment("skipped fetching of BEAM register"); + } else { comment("simplified fetching of BEAM register"); a.mov(dst, cached_reg); preserve__cache(dst); cache[slot].reg2 = dst; - } else { - comment("skipped fetching of BEAM register"); - invalidate_cache(dst); } } else { int slot;