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

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

Issue 2428583002: [wasm] Break effect cycles in the Int64Lowering. (Closed)
Patch Set: Created 4 years, 2 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/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 06ac524111aea85251f7f68505e26fa719bee4a5..fb6c76b1ea1814e3949bb79a8fd92757ba2b6c1a 100644
--- a/test/unittests/compiler/int64-lowering-unittest.cc
+++ b/test/unittests/compiler/int64-lowering-unittest.cc
@@ -849,6 +849,30 @@ TEST_F(Int64LoweringTest, I64ReverseBytes) {
IsWord32ReverseBytes(IsInt32Constant(low_word_value(0))),
start(), start()));
}
+
+TEST_F(Int64LoweringTest, EffectPhiLoop) {
+ // Construct a cycle consisting of an EffectPhi, a Store, and a Load.
+ Node* eff_phi = graph()->NewNode(common()->EffectPhi(1), graph()->start(),
+ graph()->start());
+
+ StoreRepresentation store_rep(MachineRepresentation::kWord64,
+ WriteBarrierKind::kNoWriteBarrier);
+ LoadRepresentation load_rep(MachineType::Int64());
+
+ Node* load =
+ graph()->NewNode(machine()->Load(load_rep), Int64Constant(value(0)),
+ Int64Constant(value(1)), eff_phi, graph()->start());
+
+ Node* store =
+ graph()->NewNode(machine()->Store(store_rep), Int64Constant(value(0)),
+ Int64Constant(value(1)), load, load, graph()->start());
+
+ eff_phi->InsertInput(zone(), 1, store);
+ NodeProperties::ChangeOp(eff_phi,
+ common()->ResizeMergeOrPhi(eff_phi->op(), 2));
+
+ 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