diff --git a/vyper/venom/venom_to_assembly.py b/vyper/venom/venom_to_assembly.py index d024cd8475..5bd6366bf6 100644 --- a/vyper/venom/venom_to_assembly.py +++ b/vyper/venom/venom_to_assembly.py @@ -228,6 +228,7 @@ def _stack_reorder( to_swap = stack.peek(final_stack_depth) if self.equivalence.equivalent(op, to_swap): + # perform a "virtual" swap stack.poke(final_stack_depth, op) stack.poke(depth, to_swap) continue