diff --git a/src/ir/ExpressionManipulator.cpp b/src/ir/ExpressionManipulator.cpp index 29f08de2ea1..817dce5612c 100644 --- a/src/ir/ExpressionManipulator.cpp +++ b/src/ir/ExpressionManipulator.cpp @@ -223,7 +223,9 @@ flexibleCopy(Expression* original, Module& wasm, CustomCopier custom) { Expression* visitUnreachable(Unreachable* curr) { return builder.makeUnreachable(); } - Expression* visitPush(Push* curr) { return builder.makePush(curr->value); } + Expression* visitPush(Push* curr) { + return builder.makePush(copy(curr->value)); + } Expression* visitPop(Pop* curr) { return builder.makePop(curr->type); } };