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

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

Issue 1870763003: [turbofan] Remove some clever-but-wrong bits from select lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update (= remove) the test Created 4 years, 8 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 | « test/mjsunit/compiler/regress-600593.js ('k') | test/unittests/unittests.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/select-lowering-unittest.cc
diff --git a/test/unittests/compiler/select-lowering-unittest.cc b/test/unittests/compiler/select-lowering-unittest.cc
deleted file mode 100644
index 43cfd8484a712e0ad84c721e746c71cd46a99989..0000000000000000000000000000000000000000
--- a/test/unittests/compiler/select-lowering-unittest.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "src/compiler/select-lowering.h"
-#include "test/unittests/compiler/graph-unittest.h"
-#include "test/unittests/compiler/node-test-utils.h"
-#include "testing/gmock-support.h"
-
-using testing::AllOf;
-using testing::Capture;
-using testing::CaptureEq;
-using testing::Not;
-
-namespace v8 {
-namespace internal {
-namespace compiler {
-
-class SelectLoweringTest : public GraphTest {
- public:
- SelectLoweringTest() : GraphTest(5), lowering_(graph(), common()) {}
-
- protected:
- Reduction Reduce(Node* node) { return lowering_.Reduce(node); }
-
- private:
- SelectLowering lowering_;
-};
-
-
-TEST_F(SelectLoweringTest, SelectWithSameConditions) {
- Node* const p0 = Parameter(0);
- Node* const p1 = Parameter(1);
- Node* const p2 = Parameter(2);
- Node* const p3 = Parameter(3);
- Node* const p4 = Parameter(4);
- Node* const s0 = graph()->NewNode(
- common()->Select(MachineRepresentation::kWord32), p0, p1, p2);
-
- Capture<Node*> branch;
- Capture<Node*> merge;
- {
- Reduction const r = Reduce(s0);
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(
- r.replacement(),
- IsPhi(
- MachineRepresentation::kWord32, p1, p2,
- AllOf(CaptureEq(&merge),
- IsMerge(IsIfTrue(CaptureEq(&branch)),
- IsIfFalse(AllOf(CaptureEq(&branch),
- IsBranch(p0, graph()->start())))))));
- }
- {
- Reduction const r = Reduce(graph()->NewNode(
- common()->Select(MachineRepresentation::kWord32), p0, p3, p4));
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(), IsPhi(MachineRepresentation::kWord32, p3, p4,
- CaptureEq(&merge)));
- }
- {
- // We must not reuse the diamond if it is reachable from either else/then
- // values of the Select, because the resulting graph can not be scheduled.
- Reduction const r = Reduce(graph()->NewNode(
- common()->Select(MachineRepresentation::kWord32), p0, s0, p0));
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(), IsPhi(MachineRepresentation::kWord32, s0, p0,
- Not(CaptureEq(&merge))));
- }
-}
-
-} // namespace compiler
-} // namespace internal
-} // namespace v8
« no previous file with comments | « test/mjsunit/compiler/regress-600593.js ('k') | test/unittests/unittests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698