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 |