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

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

Issue 1756863002: [wasm] Int64Lowering of I64Shl on ia32. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: I forgot to remove some debug code. Created 4 years, 10 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
Index: test/unittests/compiler/int64-lowering-unittest.cc
diff --git a/test/unittests/compiler/int64-lowering-unittest.cc b/test/unittests/compiler/int64-lowering-unittest.cc
index 9b43fe3f305c0e963ad2639ed0160c2402e22a08..d19157f8ded2a75e56f5067823c8e36474804310 100644
--- a/test/unittests/compiler/int64-lowering-unittest.cc
+++ b/test/unittests/compiler/int64-lowering-unittest.cc
@@ -356,6 +356,23 @@ TEST_F(Int64LoweringTest, Int64Xor) {
start(), start()));
}
// kExprI64Shl:
+TEST_F(Int64LoweringTest, Int64Shl) {
+ if (4 != kPointerSize) return;
+
+ LowerGraph(graph()->NewNode(machine()->Word64Shl(), Int64Constant(value(0)),
+ Int64Constant(value(1))),
+ MachineRepresentation::kWord64);
+
+ Capture<Node*> shl;
+ Matcher<Node*> shl_matcher = IsWasmWord64Shl(
+ IsInt32Constant(low_word_value(0)), IsInt32Constant(high_word_value(0)),
+ IsInt32Constant(low_word_value(1)));
+
+ EXPECT_THAT(graph()->end()->InputAt(1),
+ IsReturn2(IsProjection(0, AllOf(CaptureEq(&shl), shl_matcher)),
+ IsProjection(1, AllOf(CaptureEq(&shl), shl_matcher)),
+ start(), start()));
+}
// kExprI64ShrU:
// kExprI64ShrS:
// kExprI64Eq:

Powered by Google App Engine
This is Rietveld 408576698