diff options
author | Michaël Zasso <targos@protonmail.com> | 2017-03-21 10:16:54 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2017-03-25 09:44:10 +0100 |
commit | c459d8ea5d402c702948c860d9497b2230ff7e8a (patch) | |
tree | 56c282fc4d40e5cb613b47cf7be3ea0526ed5b6f /deps/v8/test/unittests/compiler/common-operator-reducer-unittest.cc | |
parent | e0bc5a7361b1d29c3ed034155fd779ce6f44fb13 (diff) | |
download | node-new-c459d8ea5d402c702948c860d9497b2230ff7e8a.tar.gz |
deps: update V8 to 5.7.492.69
PR-URL: https://github.com/nodejs/node/pull/11752
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Diffstat (limited to 'deps/v8/test/unittests/compiler/common-operator-reducer-unittest.cc')
-rw-r--r-- | deps/v8/test/unittests/compiler/common-operator-reducer-unittest.cc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/deps/v8/test/unittests/compiler/common-operator-reducer-unittest.cc b/deps/v8/test/unittests/compiler/common-operator-reducer-unittest.cc index f294a30596..ecc3070785 100644 --- a/deps/v8/test/unittests/compiler/common-operator-reducer-unittest.cc +++ b/deps/v8/test/unittests/compiler/common-operator-reducer-unittest.cc @@ -374,6 +374,33 @@ TEST_F(CommonOperatorReducerTest, ReturnWithPhiAndEffectPhiAndMerge) { IsReturn(vfalse, efalse, if_false))); } +TEST_F(CommonOperatorReducerTest, MultiReturnWithPhiAndEffectPhiAndMerge) { + Node* cond = Parameter(2); + Node* branch = graph()->NewNode(common()->Branch(), cond, graph()->start()); + Node* if_true = graph()->NewNode(common()->IfTrue(), branch); + Node* etrue = graph()->start(); + Node* vtrue1 = Parameter(0); + Node* vtrue2 = Parameter(1); + Node* if_false = graph()->NewNode(common()->IfFalse(), branch); + Node* efalse = graph()->start(); + Node* vfalse1 = Parameter(1); + Node* vfalse2 = Parameter(0); + Node* merge = graph()->NewNode(common()->Merge(2), if_true, if_false); + Node* ephi = graph()->NewNode(common()->EffectPhi(2), etrue, efalse, merge); + Node* phi1 = graph()->NewNode( + common()->Phi(MachineRepresentation::kTagged, 2), vtrue1, vfalse1, merge); + Node* phi2 = graph()->NewNode( + common()->Phi(MachineRepresentation::kTagged, 2), vtrue2, vfalse2, merge); + + Node* zero = graph()->NewNode(common()->Int32Constant(0)); + Node* ret = + graph()->NewNode(common()->Return(2), zero, phi1, phi2, ephi, merge); + graph()->SetEnd(graph()->NewNode(common()->End(1), ret)); + StrictMock<MockAdvancedReducerEditor> editor; + Reduction const r = Reduce(&editor, ret); + // For now a return with multiple return values should not be reduced. + ASSERT_TRUE(!r.Changed()); +} // ----------------------------------------------------------------------------- // Select |