diff --git a/src/wasm-stack.h b/src/wasm-stack.h index 8662e783598..e00fde5eb58 100644 --- a/src/wasm-stack.h +++ b/src/wasm-stack.h @@ -809,8 +809,10 @@ void BinaryenIRWriter::visitTupleMake(TupleMake* curr) { for (auto* operand : curr->operands) { visit(operand); } - // No need to handle unreachable since we don't actually emit an instruction emit(curr); + if (curr->type == Type::unreachable) { + emitUnreachable(); + } } template