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

Side by Side Diff: test/unittests/compiler/control-equivalence-unittest.cc

Issue 1368913002: [turbofan] Check node input/use consistency for changed operators and new nodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Test tweak Created 5 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 unified diff | Download patch
« no previous file with comments | « test/cctest/compiler/test-osr.cc ('k') | test/unittests/compiler/diamond-unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/bit-vector.h" 5 #include "src/bit-vector.h"
6 #include "src/compiler/control-equivalence.h" 6 #include "src/compiler/control-equivalence.h"
7 #include "src/compiler/graph-visualizer.h" 7 #include "src/compiler/graph-visualizer.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 #include "src/zone-containers.h" 9 #include "src/zone-containers.h"
10 #include "test/unittests/compiler/graph-unittest.h" 10 #include "test/unittests/compiler/graph-unittest.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 99
100 TEST_F(ControlEquivalenceTest, Empty1) { 100 TEST_F(ControlEquivalenceTest, Empty1) {
101 Node* start = graph()->start(); 101 Node* start = graph()->start();
102 ComputeEquivalence(start); 102 ComputeEquivalence(start);
103 103
104 ASSERT_EQUIVALENCE(start); 104 ASSERT_EQUIVALENCE(start);
105 } 105 }
106 106
107 107
108 TEST_F(ControlEquivalenceTest, Empty2) {
109 Node* start = graph()->start();
110 Node* end = End(start);
Michael Starzinger 2015/09/25 08:06:49 Removing this is fine with me. If you want to pres
Jarin 2015/09/25 08:13:33 Done.
111 ComputeEquivalence(end);
112
113 ASSERT_EQUIVALENCE(start, end);
114 }
115
116
117 TEST_F(ControlEquivalenceTest, Diamond1) { 108 TEST_F(ControlEquivalenceTest, Diamond1) {
118 Node* start = graph()->start(); 109 Node* start = graph()->start();
119 Node* b = Branch(start); 110 Node* b = Branch(start);
120 Node* t = IfTrue(b); 111 Node* t = IfTrue(b);
121 Node* f = IfFalse(b); 112 Node* f = IfFalse(b);
122 Node* m = Merge2(t, f); 113 Node* m = Merge2(t, f);
123 ComputeEquivalence(m); 114 ComputeEquivalence(m);
124 115
125 ASSERT_EQUIVALENCE(b, m, start); 116 ASSERT_EQUIVALENCE(b, m, start);
126 ASSERT_EQUIVALENCE(f); 117 ASSERT_EQUIVALENCE(f);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 ASSERT_EQUIVALENCE(t2); 237 ASSERT_EQUIVALENCE(t2);
247 ASSERT_EQUIVALENCE(f2); 238 ASSERT_EQUIVALENCE(f2);
248 ASSERT_EQUIVALENCE(f3); 239 ASSERT_EQUIVALENCE(f3);
249 ASSERT_EQUIVALENCE(lp); 240 ASSERT_EQUIVALENCE(lp);
250 } 241 }
251 242
252 243
253 } // namespace compiler 244 } // namespace compiler
254 } // namespace internal 245 } // namespace internal
255 } // namespace v8 246 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-osr.cc ('k') | test/unittests/compiler/diamond-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698