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

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

Issue 1807273002: [wasm] Int64Lowering of Int64Mul on ia32 and arm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-phi
Patch Set: Rebase Created 4 years, 8 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/int64-lowering.h" 5 #include "src/compiler/int64-lowering.h"
6 #include "src/compiler/common-operator.h" 6 #include "src/compiler/common-operator.h"
7 #include "src/compiler/linkage.h" 7 #include "src/compiler/linkage.h"
8 #include "src/compiler/machine-operator.h" 8 #include "src/compiler/machine-operator.h"
9 #include "src/compiler/node.h" 9 #include "src/compiler/node.h"
10 10
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 IsInt32Constant(low_word_value(0)), IsInt32Constant(high_word_value(0)), 330 IsInt32Constant(low_word_value(0)), IsInt32Constant(high_word_value(0)),
331 IsInt32Constant(low_word_value(1)), IsInt32Constant(high_word_value(1))); 331 IsInt32Constant(low_word_value(1)), IsInt32Constant(high_word_value(1)));
332 332
333 EXPECT_THAT(graph()->end()->InputAt(1), 333 EXPECT_THAT(graph()->end()->InputAt(1),
334 IsReturn2(IsProjection(0, AllOf(CaptureEq(&sub), sub_matcher)), 334 IsReturn2(IsProjection(0, AllOf(CaptureEq(&sub), sub_matcher)),
335 IsProjection(1, AllOf(CaptureEq(&sub), sub_matcher)), 335 IsProjection(1, AllOf(CaptureEq(&sub), sub_matcher)),
336 start(), start())); 336 start(), start()));
337 } 337 }
338 338
339 // kExprI64Mul: 339 // kExprI64Mul:
340 TEST_F(Int64LoweringTest, Int64Mul) {
341 LowerGraph(graph()->NewNode(machine()->Int64Mul(), Int64Constant(value(0)),
342 Int64Constant(value(1))),
343 MachineRepresentation::kWord64);
344
345 Capture<Node*> mul_capture;
346 Matcher<Node*> mul_matcher = IsInt32PairMul(
347 IsInt32Constant(low_word_value(0)), IsInt32Constant(high_word_value(0)),
348 IsInt32Constant(low_word_value(1)), IsInt32Constant(high_word_value(1)));
349
350 EXPECT_THAT(
351 graph()->end()->InputAt(1),
352 IsReturn2(IsProjection(0, AllOf(CaptureEq(&mul_capture), mul_matcher)),
353 IsProjection(1, AllOf(CaptureEq(&mul_capture), mul_matcher)),
354 start(), start()));
355 }
356
340 // kExprI64DivS: 357 // kExprI64DivS:
341 // kExprI64DivU: 358 // kExprI64DivU:
342 // kExprI64RemS: 359 // kExprI64RemS:
343 // kExprI64RemU: 360 // kExprI64RemU:
344 // kExprI64Ior: 361 // kExprI64Ior:
345 TEST_F(Int64LoweringTest, Int64Ior) { 362 TEST_F(Int64LoweringTest, Int64Ior) {
346 LowerGraph(graph()->NewNode(machine()->Word64Or(), Int64Constant(value(0)), 363 LowerGraph(graph()->NewNode(machine()->Word64Or(), Int64Constant(value(0)),
347 Int64Constant(value(1))), 364 Int64Constant(value(1))),
348 MachineRepresentation::kWord64); 365 MachineRepresentation::kWord64);
349 EXPECT_THAT(graph()->end()->InputAt(1), 366 EXPECT_THAT(graph()->end()->InputAt(1),
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 Float32Constant(2.5)); 697 Float32Constant(2.5));
681 } 698 }
682 699
683 TEST_F(Int64LoweringTest, I64PhiWord32) { 700 TEST_F(Int64LoweringTest, I64PhiWord32) {
684 TestPhi(this, MachineRepresentation::kWord32, Float32Constant(1), 701 TestPhi(this, MachineRepresentation::kWord32, Float32Constant(1),
685 Float32Constant(2)); 702 Float32Constant(2));
686 } 703 }
687 } // namespace compiler 704 } // namespace compiler
688 } // namespace internal 705 } // namespace internal
689 } // namespace v8 706 } // namespace v8
OLDNEW
« 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