From 6ed55b3f5091d755aea45979370bdeb4067912e1 Mon Sep 17 00:00:00 2001 From: Ashley Nelson Date: Fri, 31 Jan 2025 17:14:06 -0800 Subject: [PATCH] Revert "[Interpreter] i32.mul (#7260)" This reverts commit 381559404dc5c409c4a060843e27ff41f25c3e16. --- src/interpreter/interpreter.cpp | 3 --- test/gtest/interpreter.cpp | 17 ----------------- 2 files changed, 20 deletions(-) diff --git a/src/interpreter/interpreter.cpp b/src/interpreter/interpreter.cpp index 07f69509b3f..42a83f73786 100644 --- a/src/interpreter/interpreter.cpp +++ b/src/interpreter/interpreter.cpp @@ -97,9 +97,6 @@ struct ExpressionInterpreter : OverriddenVisitor { } else if (curr->op == SubInt32) { push(lhs.sub(rhs)); return {}; - } else if (curr->op == MulInt32) { - push(lhs.mul(rhs)); - return {}; } WASM_UNREACHABLE("TODO"); } diff --git a/test/gtest/interpreter.cpp b/test/gtest/interpreter.cpp index 418d61530a7..399d46912e9 100644 --- a/test/gtest/interpreter.cpp +++ b/test/gtest/interpreter.cpp @@ -58,20 +58,3 @@ TEST(InterpreterTest, SubI32) { EXPECT_EQ(results, expected); } - -TEST(InterpreterTest, MulI32) { - Module wasm; - IRBuilder builder(wasm); - - ASSERT_FALSE(builder.makeConst(Literal(uint32_t(1))).getErr()); - ASSERT_FALSE(builder.makeConst(Literal(uint32_t(2))).getErr()); - ASSERT_FALSE(builder.makeBinary(MulInt32).getErr()); - - auto expr = builder.build(); - ASSERT_FALSE(expr.getErr()); - - auto results = Interpreter{}.run(*expr); - std::vector expected{Literal(uint32_t(2))}; - - EXPECT_EQ(results, expected); -}