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

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: 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 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 Matcher<Node*> shl_matcher = IsWord32PairShl( 367 Matcher<Node*> shl_matcher = IsWord32PairShl(
368 IsInt32Constant(low_word_value(0)), IsInt32Constant(high_word_value(0)), 368 IsInt32Constant(low_word_value(0)), IsInt32Constant(high_word_value(0)),
369 IsInt32Constant(low_word_value(1))); 369 IsInt32Constant(low_word_value(1)));
370 370
371 EXPECT_THAT(graph()->end()->InputAt(1), 371 EXPECT_THAT(graph()->end()->InputAt(1),
372 IsReturn2(IsProjection(0, AllOf(CaptureEq(&shl), shl_matcher)), 372 IsReturn2(IsProjection(0, AllOf(CaptureEq(&shl), shl_matcher)),
373 IsProjection(1, AllOf(CaptureEq(&shl), shl_matcher)), 373 IsProjection(1, AllOf(CaptureEq(&shl), shl_matcher)),
374 start(), start())); 374 start(), start()));
375 } 375 }
376 // kExprI64ShrU: 376 // kExprI64ShrU:
377 TEST_F(Int64LoweringTest, Int64ShrU) {
378 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
379
380 LowerGraph(graph()->NewNode(machine()->Word64Shr(), Int64Constant(value(0)),
381 Int64Constant(value(1))),
382 MachineRepresentation::kWord64);
383
384 Capture<Node*> shr;
385 Matcher<Node*> shr_matcher = IsWord32PairShr(
386 IsInt32Constant(low_word_value(0)), IsInt32Constant(high_word_value(0)),
387 IsInt32Constant(low_word_value(1)));
388
389 EXPECT_THAT(graph()->end()->InputAt(1),
390 IsReturn2(IsProjection(0, AllOf(CaptureEq(&shr), shr_matcher)),
391 IsProjection(1, AllOf(CaptureEq(&shr), shr_matcher)),
392 start(), start()));
393 }
377 // kExprI64ShrS: 394 // kExprI64ShrS:
395 TEST_F(Int64LoweringTest, Int64ShrS) {
396 if (4 != kPointerSize) return;
397
398 LowerGraph(graph()->NewNode(machine()->Word64Sar(), Int64Constant(value(0)),
399 Int64Constant(value(1))),
400 MachineRepresentation::kWord64);
401
402 Capture<Node*> sar;
403 Matcher<Node*> sar_matcher = IsWord32PairSar(
404 IsInt32Constant(low_word_value(0)), IsInt32Constant(high_word_value(0)),
405 IsInt32Constant(low_word_value(1)));
406
407 EXPECT_THAT(graph()->end()->InputAt(1),
408 IsReturn2(IsProjection(0, AllOf(CaptureEq(&sar), sar_matcher)),
409 IsProjection(1, AllOf(CaptureEq(&sar), sar_matcher)),
410 start(), start()));
411 }
378 // kExprI64Eq: 412 // kExprI64Eq:
379 TEST_F(Int64LoweringTest, Int64Eq) { 413 TEST_F(Int64LoweringTest, Int64Eq) {
380 if (4 != kPointerSize) return; 414 if (4 != kPointerSize) return;
381 415
382 LowerGraph(graph()->NewNode(machine()->Word64Equal(), Int64Constant(value(0)), 416 LowerGraph(graph()->NewNode(machine()->Word64Equal(), Int64Constant(value(0)),
383 Int64Constant(value(1))), 417 Int64Constant(value(1))),
384 MachineRepresentation::kWord32); 418 MachineRepresentation::kWord32);
385 EXPECT_THAT( 419 EXPECT_THAT(
386 graph()->end()->InputAt(1), 420 graph()->end()->InputAt(1),
387 IsReturn(IsWord32Equal( 421 IsReturn(IsWord32Equal(
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 // kExprF64SConvertI64: 468 // kExprF64SConvertI64:
435 // kExprF64UConvertI64: 469 // kExprF64UConvertI64:
436 // kExprI64SConvertF32: 470 // kExprI64SConvertF32:
437 // kExprI64SConvertF64: 471 // kExprI64SConvertF64:
438 // kExprI64UConvertF32: 472 // kExprI64UConvertF32:
439 // kExprI64UConvertF64: 473 // kExprI64UConvertF64:
440 474
441 } // namespace compiler 475 } // namespace compiler
442 } // namespace internal 476 } // namespace internal
443 } // namespace v8 477 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698