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

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: Forgot to save a file. 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
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 a1bb341cadbc8e1777ca61b28fbcb0696d0853fa..eb605b91da0f0e03c6b71519b71132532c84e1e8 100644
--- a/test/unittests/compiler/int64-lowering-unittest.cc
+++ b/test/unittests/compiler/int64-lowering-unittest.cc
@@ -374,7 +374,41 @@ TEST_F(Int64LoweringTest, Int64Shl) {
start(), start()));
}
// kExprI64ShrU:
+TEST_F(Int64LoweringTest, Int64ShrU) {
+ if (4 != kPointerSize) return;
titzer 2016/03/07 19:25:35 Sorry I didn't notice this before. You shouldn't c
ahaas 2016/03/08 07:58:42 I created a separate CL(https://codereview.chromiu
+
+ 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) {
+ if (4 != kPointerSize) return;
+
+ 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) {
if (4 != kPointerSize) return;

Powered by Google App Engine
This is Rietveld 408576698