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

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

Issue 1778893005: [wasm] Int64Lowering of Int64Sub on ia32 and arm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-add
Patch Set: 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 unified diff | Download patch
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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 Matcher<Node*> add_matcher = IsInt32PairAdd( 311 Matcher<Node*> add_matcher = IsInt32PairAdd(
312 IsInt32Constant(low_word_value(0)), IsInt32Constant(high_word_value(0)), 312 IsInt32Constant(low_word_value(0)), IsInt32Constant(high_word_value(0)),
313 IsInt32Constant(low_word_value(1)), IsInt32Constant(high_word_value(1))); 313 IsInt32Constant(low_word_value(1)), IsInt32Constant(high_word_value(1)));
314 314
315 EXPECT_THAT(graph()->end()->InputAt(1), 315 EXPECT_THAT(graph()->end()->InputAt(1),
316 IsReturn2(IsProjection(0, AllOf(CaptureEq(&add), add_matcher)), 316 IsReturn2(IsProjection(0, AllOf(CaptureEq(&add), add_matcher)),
317 IsProjection(1, AllOf(CaptureEq(&add), add_matcher)), 317 IsProjection(1, AllOf(CaptureEq(&add), add_matcher)),
318 start(), start())); 318 start(), start()));
319 } 319 }
320 // kExprI64Sub: 320 // kExprI64Sub:
321 TEST_F(Int64LoweringTest, Int64Sub) {
322 LowerGraph(graph()->NewNode(machine()->Int64Sub(), Int64Constant(value(0)),
323 Int64Constant(value(1))),
324 MachineRepresentation::kWord64);
325
326 Capture<Node*> sub;
327 Matcher<Node*> sub_matcher = IsInt32PairSub(
328 IsInt32Constant(low_word_value(0)), IsInt32Constant(high_word_value(0)),
329 IsInt32Constant(low_word_value(1)), IsInt32Constant(high_word_value(1)));
330
331 EXPECT_THAT(graph()->end()->InputAt(1),
332 IsReturn2(IsProjection(0, AllOf(CaptureEq(&sub), sub_matcher)),
333 IsProjection(1, AllOf(CaptureEq(&sub), sub_matcher)),
334 start(), start()));
335 }
336
321 // kExprI64Mul: 337 // kExprI64Mul:
322 // kExprI64DivS: 338 // kExprI64DivS:
323 // kExprI64DivU: 339 // kExprI64DivU:
324 // kExprI64RemS: 340 // kExprI64RemS:
325 // kExprI64RemU: 341 // kExprI64RemU:
326 // kExprI64Ior: 342 // kExprI64Ior:
327 TEST_F(Int64LoweringTest, Int64Ior) { 343 TEST_F(Int64LoweringTest, Int64Ior) {
328 LowerGraph(graph()->NewNode(machine()->Word64Or(), Int64Constant(value(0)), 344 LowerGraph(graph()->NewNode(machine()->Word64Or(), Int64Constant(value(0)),
329 Int64Constant(value(1))), 345 Int64Constant(value(1))),
330 MachineRepresentation::kWord64); 346 MachineRepresentation::kWord64);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 } 506 }
491 // kExprF64ReinterpretI64: 507 // kExprF64ReinterpretI64:
492 // kExprI64ReinterpretF64: 508 // kExprI64ReinterpretF64:
493 509
494 // kExprI64Clz: 510 // kExprI64Clz:
495 // kExprI64Ctz: 511 // kExprI64Ctz:
496 // kExprI64Popcnt: 512 // kExprI64Popcnt:
497 } // namespace compiler 513 } // namespace compiler
498 } // namespace internal 514 } // namespace internal
499 } // namespace v8 515 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698