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

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

Issue 1846933002: [turbofan] Handle dead diamonds in scheduling and add a test. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
Index: test/cctest/wasm/test-run-wasm.cc
diff --git a/test/cctest/wasm/test-run-wasm.cc b/test/cctest/wasm/test-run-wasm.cc
index b5a77fcdaecf8737779d9f7befed863d84a2316f..30c619c8cb2b1f43af37f03f59151b6ab11af69c 100644
--- a/test/cctest/wasm/test-run-wasm.cc
+++ b/test/cctest/wasm/test-run-wasm.cc
@@ -2821,3 +2821,15 @@ TEST(Compile_Wasm_CallIndirect_Many_f32) { CompileCallIndirectMany(kAstF32); }
TEST(Compile_Wasm_CallIndirect_Many_f64) { CompileCallIndirectMany(kAstF64); }
+
+TEST(Run_WASM_Int32RemS_dead) {
+ WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
+ BUILD(r, WASM_I32_REMS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)), WASM_ZERO);
+ const int32_t kMin = std::numeric_limits<int32_t>::min();
+ CHECK_EQ(0, r.Call(133, 100));
+ CHECK_EQ(0, r.Call(kMin, -1));
+ CHECK_EQ(0, r.Call(0, 1));
+ CHECK_TRAP(r.Call(100, 0));
+ CHECK_TRAP(r.Call(-1001, 0));
+ CHECK_TRAP(r.Call(kMin, 0));
+}

Powered by Google App Engine
This is Rietveld 408576698