Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1774)

Unified Diff: test/cctest/wasm/test-run-wasm-simd.cc

Issue 2721223003: Revert of [wasm]implement simd lowering for simple F32x4 and I32x4 unops (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/test-run-wasm-simd.cc
diff --git a/test/cctest/wasm/test-run-wasm-simd.cc b/test/cctest/wasm/test-run-wasm-simd.cc
index c0a3cb54dc83e8f89e9c0cabbbc3d1217a84c0f0..53211ce340fbe8ca88a7f9f6448f3b264df629f5 100644
--- a/test/cctest/wasm/test-run-wasm-simd.cc
+++ b/test/cctest/wasm/test-run-wasm-simd.cc
@@ -210,11 +210,6 @@
template <typename T>
T Not(T a) {
return ~a;
-}
-
-template <typename T>
-T Sqrt(T a) {
- return std::sqrt(a);
}
} // namespace
@@ -384,7 +379,9 @@
CHECK_EQ(1, r.Call(3.14159f, -1.5f));
}
-
+#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
+
+#if V8_TARGET_ARCH_ARM
// Tests both signed and unsigned conversion.
WASM_EXEC_COMPILED_TEST(F32x4FromInt32x4) {
FLAG_wasm_simd_prototype = true;
@@ -420,18 +417,13 @@
FOR_FLOAT32_INPUTS(i) {
if (std::isnan(*i)) continue;
- if (std::isnan(expected_op(*i))) continue;
CHECK_EQ(1, r.Call(*i, expected_op(*i)));
}
}
WASM_EXEC_COMPILED_TEST(F32x4Abs) { RunF32x4UnOpTest(kExprF32x4Abs, std::abs); }
WASM_EXEC_COMPILED_TEST(F32x4Neg) { RunF32x4UnOpTest(kExprF32x4Neg, Negate); }
-#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
-
-#if SIMD_LOWERING_TARGET
-WASM_EXEC_COMPILED_TEST(F32x4Sqrt) { RunF32x4UnOpTest(kExprF32x4Sqrt, Sqrt); }
-#endif // SIMD_LOWERING_TARGET
+#endif // V8_TARGET_ARCH_ARM
#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
void RunF32x4BinOpTest(WasmOpcode simd_op, FloatBinOp expected_op,
@@ -816,9 +808,7 @@
CHECK_EQ(1, r.Call(*i, signed_value, unsigned_value));
}
}
-#endif // V8_TARGET_ARCH_ARM
-
-#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
+
void RunI32x4UnOpTest(WasmOpcode simd_op, Int32UnOp expected_op) {
FLAG_wasm_simd_prototype = true;
WasmRunner<int32_t, int32_t, int32_t> r(kExecuteCompiled);
@@ -835,7 +825,7 @@
WASM_EXEC_COMPILED_TEST(I32x4Neg) { RunI32x4UnOpTest(kExprI32x4Neg, Negate); }
WASM_EXEC_COMPILED_TEST(S128Not) { RunI32x4UnOpTest(kExprS128Not, Not); }
-#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
+#endif // V8_TARGET_ARCH_ARM
void RunI32x4BinOpTest(WasmOpcode simd_op, Int32BinOp expected_op) {
FLAG_wasm_simd_prototype = true;
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698