OLD | NEW |
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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 EXPECT_THAT(graph()->end()->InputAt(1), | 487 EXPECT_THAT(graph()->end()->InputAt(1), |
488 IsReturn2(IsInt32Constant(low_word_value(0)), IsInt32Constant(0), | 488 IsReturn2(IsInt32Constant(low_word_value(0)), IsInt32Constant(0), |
489 start(), start())); | 489 start(), start())); |
490 } | 490 } |
491 // kExprF64ReinterpretI64: | 491 // kExprF64ReinterpretI64: |
492 // kExprI64ReinterpretF64: | 492 // kExprI64ReinterpretF64: |
493 | 493 |
494 // kExprI64Clz: | 494 // kExprI64Clz: |
495 // kExprI64Ctz: | 495 // kExprI64Ctz: |
496 // kExprI64Popcnt: | 496 // kExprI64Popcnt: |
| 497 |
| 498 TEST_F(Int64LoweringTest, Dfs) { |
| 499 Node* common = Int64Constant(value(0)); |
| 500 LowerGraph(graph()->NewNode(machine()->Word64And(), common, |
| 501 graph()->NewNode(machine()->Word64And(), common, |
| 502 Int64Constant(value(1)))), |
| 503 MachineRepresentation::kWord64); |
| 504 |
| 505 EXPECT_THAT( |
| 506 graph()->end()->InputAt(1), |
| 507 IsReturn2(IsWord32And(IsInt32Constant(low_word_value(0)), |
| 508 IsWord32And(IsInt32Constant(low_word_value(0)), |
| 509 IsInt32Constant(low_word_value(1)))), |
| 510 IsWord32And(IsInt32Constant(high_word_value(0)), |
| 511 IsWord32And(IsInt32Constant(high_word_value(0)), |
| 512 IsInt32Constant(high_word_value(1)))), |
| 513 start(), start())); |
| 514 } |
497 } // namespace compiler | 515 } // namespace compiler |
498 } // namespace internal | 516 } // namespace internal |
499 } // namespace v8 | 517 } // namespace v8 |
OLD | NEW |