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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 IsReturn2(IsWord32Xor(IsInt32Constant(low_word_value(0)), | 330 IsReturn2(IsWord32Xor(IsInt32Constant(low_word_value(0)), |
331 IsInt32Constant(low_word_value(1))), | 331 IsInt32Constant(low_word_value(1))), |
332 IsWord32Xor(IsInt32Constant(high_word_value(0)), | 332 IsWord32Xor(IsInt32Constant(high_word_value(0)), |
333 IsInt32Constant(high_word_value(1))), | 333 IsInt32Constant(high_word_value(1))), |
334 start(), start())); | 334 start(), start())); |
335 } | 335 } |
336 // kExprI64Shl: | 336 // kExprI64Shl: |
337 // kExprI64ShrU: | 337 // kExprI64ShrU: |
338 // kExprI64ShrS: | 338 // kExprI64ShrS: |
339 // kExprI64Eq: | 339 // kExprI64Eq: |
| 340 TEST_F(Int64LoweringTest, Int64Eq) { |
| 341 if (4 != kPointerSize) return; |
| 342 |
| 343 LowerGraph(graph()->NewNode(machine()->Word64Equal(), Int64Constant(value(0)), |
| 344 Int64Constant(value(1))), |
| 345 MachineRepresentation::kWord32); |
| 346 EXPECT_THAT( |
| 347 graph()->end()->InputAt(1), |
| 348 IsReturn(IsWord32Equal( |
| 349 IsWord32Or(IsWord32Xor(IsInt32Constant(low_word_value(0)), |
| 350 IsInt32Constant(low_word_value(1))), |
| 351 IsWord32Xor(IsInt32Constant(high_word_value(0)), |
| 352 IsInt32Constant(high_word_value(1)))), |
| 353 IsInt32Constant(0)), |
| 354 start(), start())); |
| 355 } |
| 356 |
340 // kExprI64Ne: | 357 // kExprI64Ne: |
341 // kExprI64LtS: | 358 // kExprI64LtS: |
342 // kExprI64LeS: | 359 // kExprI64LeS: |
343 // kExprI64LtU: | 360 // kExprI64LtU: |
344 // kExprI64LeU: | 361 // kExprI64LeU: |
345 // kExprI64GtS: | 362 // kExprI64GtS: |
346 // kExprI64GeS: | 363 // kExprI64GeS: |
347 // kExprI64GtU: | 364 // kExprI64GtU: |
348 // kExprI64GeU: | 365 // kExprI64GeU: |
349 | 366 |
(...skipping 13 matching lines...) Expand all Loading... |
363 // kExprF64SConvertI64: | 380 // kExprF64SConvertI64: |
364 // kExprF64UConvertI64: | 381 // kExprF64UConvertI64: |
365 // kExprI64SConvertF32: | 382 // kExprI64SConvertF32: |
366 // kExprI64SConvertF64: | 383 // kExprI64SConvertF64: |
367 // kExprI64UConvertF32: | 384 // kExprI64UConvertF32: |
368 // kExprI64UConvertF64: | 385 // kExprI64UConvertF64: |
369 | 386 |
370 } // namespace compiler | 387 } // namespace compiler |
371 } // namespace internal | 388 } // namespace internal |
372 } // namespace v8 | 389 } // namespace v8 |
OLD | NEW |