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

Unified Diff: test/unittests/compiler/machine-operator-reducer-unittest.cc

Issue 2528033002: [wasm] Add a flag --wasm-opt to test optimizations in the WASM pipeline. (Closed)
Patch Set: [wasm] Add a flag --wasm-opt to test optimizations in the WASM pipeline. Created 4 years 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/cctest/wasm/wasm-run-utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/machine-operator-reducer-unittest.cc
diff --git a/test/unittests/compiler/machine-operator-reducer-unittest.cc b/test/unittests/compiler/machine-operator-reducer-unittest.cc
index 1d29d9733f9248797fb6e5558face23a2016073f..474a27038a749bae3e5eb0eae4a4d01c4c852450 100644
--- a/test/unittests/compiler/machine-operator-reducer-unittest.cc
+++ b/test/unittests/compiler/machine-operator-reducer-unittest.cc
@@ -1183,12 +1183,16 @@ TEST_F(MachineOperatorReducerTest, Int32ModWithConstant) {
ASSERT_TRUE(r.Changed());
EXPECT_THAT(
r.replacement(),
- IsSelect(MachineRepresentation::kWord32,
- IsInt32LessThan(p0, IsInt32Constant(0)),
- IsInt32Sub(IsInt32Constant(0),
- IsWord32And(IsInt32Sub(IsInt32Constant(0), p0),
- IsInt32Constant(mask))),
- IsWord32And(p0, IsInt32Constant(mask))));
+ IsPhi(
+ MachineRepresentation::kWord32,
+ IsInt32Sub(IsInt32Constant(0),
+ IsWord32And(IsInt32Sub(IsInt32Constant(0), p0),
+ IsInt32Constant(mask))),
+ IsWord32And(p0, IsInt32Constant(mask)),
+ IsMerge(IsIfTrue(IsBranch(IsInt32LessThan(p0, IsInt32Constant(0)),
+ graph()->start())),
+ IsIfFalse(IsBranch(IsInt32LessThan(p0, IsInt32Constant(0)),
+ graph()->start())))));
}
TRACED_FORRANGE(int32_t, shift, 1, 31) {
Reduction const r = Reduce(graph()->NewNode(
@@ -1199,12 +1203,16 @@ TEST_F(MachineOperatorReducerTest, Int32ModWithConstant) {
ASSERT_TRUE(r.Changed());
EXPECT_THAT(
r.replacement(),
- IsSelect(MachineRepresentation::kWord32,
- IsInt32LessThan(p0, IsInt32Constant(0)),
- IsInt32Sub(IsInt32Constant(0),
- IsWord32And(IsInt32Sub(IsInt32Constant(0), p0),
- IsInt32Constant(mask))),
- IsWord32And(p0, IsInt32Constant(mask))));
+ IsPhi(
+ MachineRepresentation::kWord32,
+ IsInt32Sub(IsInt32Constant(0),
+ IsWord32And(IsInt32Sub(IsInt32Constant(0), p0),
+ IsInt32Constant(mask))),
+ IsWord32And(p0, IsInt32Constant(mask)),
+ IsMerge(IsIfTrue(IsBranch(IsInt32LessThan(p0, IsInt32Constant(0)),
+ graph()->start())),
+ IsIfFalse(IsBranch(IsInt32LessThan(p0, IsInt32Constant(0)),
+ graph()->start())))));
}
TRACED_FOREACH(int32_t, divisor, kInt32Values) {
if (divisor == 0 || base::bits::IsPowerOfTwo32(Abs(divisor))) continue;
« no previous file with comments | « test/cctest/wasm/wasm-run-utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698