| 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 00bde077135c0ef9ce118e4178c4cf5d66c6e5fe..eddadb3a6fb447276f36e3648d9935507f20a533 100644
|
| --- a/test/unittests/compiler/int64-lowering-unittest.cc
|
| +++ b/test/unittests/compiler/int64-lowering-unittest.cc
|
| @@ -16,6 +16,11 @@
|
|
|
| #include "test/unittests/compiler/graph-unittest.h"
|
| #include "test/unittests/compiler/node-test-utils.h"
|
| +#include "testing/gmock-support.h"
|
| +
|
| +using testing::AllOf;
|
| +using testing::Capture;
|
| +using testing::CaptureEq;
|
|
|
| namespace v8 {
|
| namespace internal {
|
| @@ -106,6 +111,7 @@ TEST_F(Int64LoweringTest, Int64Load) {
|
| start(), start()),
|
| MachineRepresentation::kWord64);
|
|
|
| + Capture<Node*> high_word_load;
|
| Matcher<Node*> high_word_load_matcher =
|
| IsLoad(MachineType::Int32(), IsInt32Constant(base),
|
| IsInt32Add(IsInt32Constant(index), IsInt32Constant(0x4)), start(),
|
| @@ -114,8 +120,11 @@ TEST_F(Int64LoweringTest, Int64Load) {
|
| EXPECT_THAT(
|
| graph()->end()->InputAt(1),
|
| IsReturn2(IsLoad(MachineType::Int32(), IsInt32Constant(base),
|
| - IsInt32Constant(index), high_word_load_matcher, start()),
|
| - high_word_load_matcher, start(), start()));
|
| + IsInt32Constant(index), AllOf(CaptureEq(&high_word_load),
|
| + high_word_load_matcher),
|
| + start()),
|
| + AllOf(CaptureEq(&high_word_load), high_word_load_matcher),
|
| + start(), start()));
|
| }
|
|
|
| TEST_F(Int64LoweringTest, Int64Store) {
|
| @@ -234,12 +243,14 @@ TEST_F(Int64LoweringTest, CallI64Return) {
|
| start(), start()),
|
| MachineRepresentation::kWord64);
|
|
|
| + Capture<Node*> call;
|
| Matcher<Node*> call_matcher =
|
| IsCall(testing::_, IsInt32Constant(function), start(), start());
|
|
|
| EXPECT_THAT(graph()->end()->InputAt(1),
|
| - IsReturn2(IsProjection(0, call_matcher),
|
| - IsProjection(1, call_matcher), start(), start()));
|
| + IsReturn2(IsProjection(0, AllOf(CaptureEq(&call), call_matcher)),
|
| + IsProjection(1, AllOf(CaptureEq(&call), call_matcher)),
|
| + start(), start()));
|
|
|
| CompareCallDescriptors(
|
| OpParameter<const CallDescriptor*>(
|
| @@ -326,6 +337,23 @@ TEST_F(Int64LoweringTest, Int64Xor) {
|
| // kExprI64ShrU:
|
| // kExprI64ShrS:
|
| // kExprI64Eq:
|
| +TEST_F(Int64LoweringTest, Int64Eq) {
|
| + if (4 != kPointerSize) return;
|
| +
|
| + LowerGraph(graph()->NewNode(machine()->Word64Equal(), Int64Constant(value(0)),
|
| + Int64Constant(value(1))),
|
| + MachineRepresentation::kWord32);
|
| + EXPECT_THAT(
|
| + graph()->end()->InputAt(1),
|
| + IsReturn(IsWord32Equal(
|
| + IsWord32Or(IsWord32Xor(IsInt32Constant(low_word_value(0)),
|
| + IsInt32Constant(low_word_value(1))),
|
| + IsWord32Xor(IsInt32Constant(high_word_value(0)),
|
| + IsInt32Constant(high_word_value(1)))),
|
| + IsInt32Constant(0)),
|
| + start(), start()));
|
| +}
|
| +
|
| // kExprI64Ne:
|
| // kExprI64LtS:
|
| // kExprI64LeS:
|
|
|