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

Side by Side 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 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 Matcher<Node*> shl_matcher = IsWord32PairShl( 343 Matcher<Node*> shl_matcher = IsWord32PairShl(
344 IsInt32Constant(low_word_value(0)), IsInt32Constant(high_word_value(0)), 344 IsInt32Constant(low_word_value(0)), IsInt32Constant(high_word_value(0)),
345 IsInt32Constant(low_word_value(1))); 345 IsInt32Constant(low_word_value(1)));
346 346
347 EXPECT_THAT(graph()->end()->InputAt(1), 347 EXPECT_THAT(graph()->end()->InputAt(1),
348 IsReturn2(IsProjection(0, AllOf(CaptureEq(&shl), shl_matcher)), 348 IsReturn2(IsProjection(0, AllOf(CaptureEq(&shl), shl_matcher)),
349 IsProjection(1, AllOf(CaptureEq(&shl), shl_matcher)), 349 IsProjection(1, AllOf(CaptureEq(&shl), shl_matcher)),
350 start(), start())); 350 start(), start()));
351 } 351 }
352 // kExprI64ShrU: 352 // kExprI64ShrU:
353 TEST_F(Int64LoweringTest, Int64ShrU) {
354 LowerGraph(graph()->NewNode(machine()->Word64Shr(), Int64Constant(value(0)),
355 Int64Constant(value(1))),
356 MachineRepresentation::kWord64);
357
358 Capture<Node*> shr;
359 Matcher<Node*> shr_matcher = IsWord32PairShr(
360 IsInt32Constant(low_word_value(0)), IsInt32Constant(high_word_value(0)),
361 IsInt32Constant(low_word_value(1)));
362
363 EXPECT_THAT(graph()->end()->InputAt(1),
364 IsReturn2(IsProjection(0, AllOf(CaptureEq(&shr), shr_matcher)),
365 IsProjection(1, AllOf(CaptureEq(&shr), shr_matcher)),
366 start(), start()));
367 }
353 // kExprI64ShrS: 368 // kExprI64ShrS:
369 TEST_F(Int64LoweringTest, Int64ShrS) {
370 LowerGraph(graph()->NewNode(machine()->Word64Sar(), Int64Constant(value(0)),
371 Int64Constant(value(1))),
372 MachineRepresentation::kWord64);
373
374 Capture<Node*> sar;
375 Matcher<Node*> sar_matcher = IsWord32PairSar(
376 IsInt32Constant(low_word_value(0)), IsInt32Constant(high_word_value(0)),
377 IsInt32Constant(low_word_value(1)));
378
379 EXPECT_THAT(graph()->end()->InputAt(1),
380 IsReturn2(IsProjection(0, AllOf(CaptureEq(&sar), sar_matcher)),
381 IsProjection(1, AllOf(CaptureEq(&sar), sar_matcher)),
382 start(), start()));
383 }
354 // kExprI64Eq: 384 // kExprI64Eq:
355 TEST_F(Int64LoweringTest, Int64Eq) { 385 TEST_F(Int64LoweringTest, Int64Eq) {
356 LowerGraph(graph()->NewNode(machine()->Word64Equal(), Int64Constant(value(0)), 386 LowerGraph(graph()->NewNode(machine()->Word64Equal(), Int64Constant(value(0)),
357 Int64Constant(value(1))), 387 Int64Constant(value(1))),
358 MachineRepresentation::kWord32); 388 MachineRepresentation::kWord32);
359 EXPECT_THAT( 389 EXPECT_THAT(
360 graph()->end()->InputAt(1), 390 graph()->end()->InputAt(1),
361 IsReturn(IsWord32Equal( 391 IsReturn(IsWord32Equal(
362 IsWord32Or(IsWord32Xor(IsInt32Constant(low_word_value(0)), 392 IsWord32Or(IsWord32Xor(IsInt32Constant(low_word_value(0)),
363 IsInt32Constant(low_word_value(1))), 393 IsInt32Constant(low_word_value(1))),
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 430
401 // kExprF64ReinterpretI64: 431 // kExprF64ReinterpretI64:
402 // kExprI64ReinterpretF64: 432 // kExprI64ReinterpretF64:
403 433
404 // kExprI64Clz: 434 // kExprI64Clz:
405 // kExprI64Ctz: 435 // kExprI64Ctz:
406 // kExprI64Popcnt: 436 // kExprI64Popcnt:
407 } // namespace compiler 437 } // namespace compiler
408 } // namespace internal 438 } // namespace internal
409 } // namespace v8 439 } // 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