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

Unified Diff: test/unittests/compiler/int64-lowering-unittest.cc

Issue 2511503002: [wasm] Break a cycle with a loop node in the int64-lowering. (Closed)
Patch Set: Add a test Created 4 years, 1 month 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/int64-lowering.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/int64-lowering-unittest.cc
diff --git a/test/unittests/compiler/int64-lowering-unittest.cc b/test/unittests/compiler/int64-lowering-unittest.cc
index 400eafb4dc69c24ac33754c9c78f2c4b7b419b13..acbb23fa82bff138c9aac0fcbf22dcdca4a2f1ae 100644
--- a/test/unittests/compiler/int64-lowering-unittest.cc
+++ b/test/unittests/compiler/int64-lowering-unittest.cc
@@ -875,6 +875,25 @@ TEST_F(Int64LoweringTest, EffectPhiLoop) {
LowerGraph(load, MachineRepresentation::kWord64);
}
+
+TEST_F(Int64LoweringTest, LoopCycle) {
+ // New node with two placeholders.
+ Node* compare = graph()->NewNode(machine()->Word64Equal(), Int64Constant(0),
+ Int64Constant(value(0)));
+
+ Node* load = graph()->NewNode(
+ machine()->Load(MachineType::Int64()), Int64Constant(value(1)),
+ Int64Constant(value(2)), graph()->start(),
+ graph()->NewNode(
+ common()->Loop(2), graph()->start(),
+ graph()->NewNode(common()->IfFalse(),
+ graph()->NewNode(common()->Branch(), compare,
+ graph()->start()))));
+
+ NodeProperties::ReplaceValueInput(compare, load, 0);
+
+ LowerGraph(load, MachineRepresentation::kWord64);
+}
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « src/compiler/int64-lowering.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698