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

Unified Diff: test/unittests/compiler/js-builtin-reducer-unittest.cc

Issue 704463004: [turbofan] Turn various diamonds into selects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix cctest. Created 6 years, 1 month 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
Index: test/unittests/compiler/js-builtin-reducer-unittest.cc
diff --git a/test/unittests/compiler/js-builtin-reducer-unittest.cc b/test/unittests/compiler/js-builtin-reducer-unittest.cc
index 6cfcc26dd1c35ae7f2630014445a2a2f1c121699..0a0d8d66ad94653bf727299b7f1c069a4c8b364d 100644
--- a/test/unittests/compiler/js-builtin-reducer-unittest.cc
+++ b/test/unittests/compiler/js-builtin-reducer-unittest.cc
@@ -88,14 +88,9 @@ TEST_F(JSBuiltinReducerTest, MathAbs) {
} else {
Capture<Node*> branch;
ASSERT_TRUE(r.Changed());
- EXPECT_THAT(
- r.replacement(),
- IsPhi(kMachNone, p0, IsNumberSubtract(IsNumberConstant(0), p0),
- IsMerge(IsIfTrue(CaptureEq(&branch)),
- IsIfFalse(AllOf(
- CaptureEq(&branch),
- IsBranch(IsNumberLessThan(IsNumberConstant(0), p0),
- graph()->start()))))));
+ EXPECT_THAT(r.replacement(),
+ IsSelect(kMachNone, IsNumberLessThan(IsNumberConstant(0), p0),
+ p0, IsNumberSubtract(IsNumberConstant(0), p0)));
}
}
}
@@ -171,15 +166,9 @@ TEST_F(JSBuiltinReducerTest, MathMax2) {
Reduction r = Reduce(call);
if (t0->Is(Type::Integral32()) && t1->Is(Type::Integral32())) {
- Capture<Node*> branch;
ASSERT_TRUE(r.Changed());
- EXPECT_THAT(
- r.replacement(),
- IsPhi(kMachNone, p1, p0,
- IsMerge(IsIfTrue(CaptureEq(&branch)),
- IsIfFalse(AllOf(CaptureEq(&branch),
- IsBranch(IsNumberLessThan(p0, p1),
- graph()->start()))))));
+ EXPECT_THAT(r.replacement(),
+ IsSelect(kMachNone, IsNumberLessThan(p1, p0), p1, p0));
} else {
ASSERT_FALSE(r.Changed());
EXPECT_EQ(IrOpcode::kJSCallFunction, call->opcode());
« no previous file with comments | « test/unittests/compiler/change-lowering-unittest.cc ('k') | test/unittests/compiler/machine-operator-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698