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

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

Issue 1768233002: [wasm] Int64Lowering of I64ShrU and I64ShrS on ia32. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 9 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/cctest/wasm/test-run-wasm-64.cc ('k') | test/unittests/compiler/node-test-utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 63c9a289f72bae487740f61cf2f93509262f8ba7..d8464537db5605711738773d3daf408ee49975af 100644
--- a/test/unittests/compiler/int64-lowering-unittest.cc
+++ b/test/unittests/compiler/int64-lowering-unittest.cc
@@ -350,7 +350,37 @@ TEST_F(Int64LoweringTest, Int64Shl) {
start(), start()));
}
// kExprI64ShrU:
+TEST_F(Int64LoweringTest, Int64ShrU) {
+ LowerGraph(graph()->NewNode(machine()->Word64Shr(), Int64Constant(value(0)),
+ Int64Constant(value(1))),
+ MachineRepresentation::kWord64);
+
+ Capture<Node*> shr;
+ Matcher<Node*> shr_matcher = IsWord32PairShr(
+ 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(&shr), shr_matcher)),
+ IsProjection(1, AllOf(CaptureEq(&shr), shr_matcher)),
+ start(), start()));
+}
// kExprI64ShrS:
+TEST_F(Int64LoweringTest, Int64ShrS) {
+ LowerGraph(graph()->NewNode(machine()->Word64Sar(), Int64Constant(value(0)),
+ Int64Constant(value(1))),
+ MachineRepresentation::kWord64);
+
+ Capture<Node*> sar;
+ Matcher<Node*> sar_matcher = IsWord32PairSar(
+ 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(&sar), sar_matcher)),
+ IsProjection(1, AllOf(CaptureEq(&sar), sar_matcher)),
+ start(), start()));
+}
// kExprI64Eq:
TEST_F(Int64LoweringTest, Int64Eq) {
LowerGraph(graph()->NewNode(machine()->Word64Equal(), Int64Constant(value(0)),
« no previous file with comments | « test/cctest/wasm/test-run-wasm-64.cc ('k') | test/unittests/compiler/node-test-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698