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

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, 8 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/scheduler.cc ('k') | test/unittests/compiler/scheduler-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b8e27d942d87569518b954cf897deb706282574b..70d461b62785391181c5b25a7d847ea75d70ac2e 100644
--- a/test/cctest/wasm/test-run-wasm.cc
+++ b/test/cctest/wasm/test-run-wasm.cc
@@ -2818,3 +2818,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));
+}
« no previous file with comments | « src/compiler/scheduler.cc ('k') | test/unittests/compiler/scheduler-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698