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

Side by Side Diff: test/cctest/compiler/test-representation-change.cc

Issue 1941673002: [turbofan] Remove left-over change bits from ChangeLowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Don't mess with the regions yet Created 4 years, 7 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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 <limits> 5 #include <limits>
6 6
7 #include "test/cctest/cctest.h" 7 #include "test/cctest/cctest.h"
8 #include "test/cctest/compiler/codegen-tester.h" 8 #include "test/cctest/compiler/codegen-tester.h"
9 #include "test/cctest/compiler/graph-builder-tester.h" 9 #include "test/cctest/compiler/graph-builder-tester.h"
10 #include "test/cctest/compiler/value-helper.h" 10 #include "test/cctest/compiler/value-helper.h"
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 CHECK_NE(c1, n); 432 CHECK_NE(c1, n);
433 CHECK_EQ(expected1, c1->opcode()); 433 CHECK_EQ(expected1, c1->opcode());
434 Node* c2 = c1->InputAt(0); 434 Node* c2 = c1->InputAt(0);
435 CHECK_NE(c2, n); 435 CHECK_NE(c2, n);
436 CHECK_EQ(expected2, c2->opcode()); 436 CHECK_EQ(expected2, c2->opcode());
437 CHECK_EQ(n, c2->InputAt(0)); 437 CHECK_EQ(n, c2->InputAt(0));
438 } 438 }
439 439
440 440
441 TEST(SingleChanges) { 441 TEST(SingleChanges) {
442 CheckChange(IrOpcode::kChangeBoolToBit, MachineRepresentation::kTagged, 442 CheckChange(IrOpcode::kChangeTaggedToBit, MachineRepresentation::kTagged,
443 Type::None(), MachineRepresentation::kBit); 443 Type::None(), MachineRepresentation::kBit);
444 CheckChange(IrOpcode::kChangeBitToBool, MachineRepresentation::kBit, 444 CheckChange(IrOpcode::kChangeBitToTagged, MachineRepresentation::kBit,
445 Type::None(), MachineRepresentation::kTagged); 445 Type::None(), MachineRepresentation::kTagged);
446 446
447 CheckChange(IrOpcode::kChangeInt31ToTagged, MachineRepresentation::kWord32, 447 CheckChange(IrOpcode::kChangeInt31ToTaggedSigned,
448 Type::Signed31(), MachineRepresentation::kTagged); 448 MachineRepresentation::kWord32, Type::Signed31(),
449 MachineRepresentation::kTagged);
449 CheckChange(IrOpcode::kChangeInt32ToTagged, MachineRepresentation::kWord32, 450 CheckChange(IrOpcode::kChangeInt32ToTagged, MachineRepresentation::kWord32,
450 Type::Signed32(), MachineRepresentation::kTagged); 451 Type::Signed32(), MachineRepresentation::kTagged);
451 CheckChange(IrOpcode::kChangeUint32ToTagged, MachineRepresentation::kWord32, 452 CheckChange(IrOpcode::kChangeUint32ToTagged, MachineRepresentation::kWord32,
452 Type::Unsigned32(), MachineRepresentation::kTagged); 453 Type::Unsigned32(), MachineRepresentation::kTagged);
453 CheckChange(IrOpcode::kChangeFloat64ToTagged, MachineRepresentation::kFloat64, 454 CheckChange(IrOpcode::kChangeFloat64ToTagged, MachineRepresentation::kFloat64,
454 Type::Number(), MachineRepresentation::kTagged); 455 Type::Number(), MachineRepresentation::kTagged);
455 CheckTwoChanges(IrOpcode::kChangeFloat64ToInt32, 456 CheckTwoChanges(IrOpcode::kChangeFloat64ToInt32,
456 IrOpcode::kChangeInt31ToTagged, 457 IrOpcode::kChangeInt31ToTaggedSigned,
457 MachineRepresentation::kFloat64, Type::Signed31(), 458 MachineRepresentation::kFloat64, Type::Signed31(),
458 MachineRepresentation::kTagged); 459 MachineRepresentation::kTagged);
459 CheckTwoChanges(IrOpcode::kChangeFloat64ToInt32, 460 CheckTwoChanges(IrOpcode::kChangeFloat64ToInt32,
460 IrOpcode::kChangeInt32ToTagged, 461 IrOpcode::kChangeInt32ToTagged,
461 MachineRepresentation::kFloat64, Type::Signed32(), 462 MachineRepresentation::kFloat64, Type::Signed32(),
462 MachineRepresentation::kTagged); 463 MachineRepresentation::kTagged);
463 CheckTwoChanges(IrOpcode::kChangeFloat64ToUint32, 464 CheckTwoChanges(IrOpcode::kChangeFloat64ToUint32,
464 IrOpcode::kChangeUint32ToTagged, 465 IrOpcode::kChangeUint32ToTagged,
465 MachineRepresentation::kFloat64, Type::Unsigned32(), 466 MachineRepresentation::kFloat64, Type::Unsigned32(),
466 MachineRepresentation::kTagged); 467 MachineRepresentation::kTagged);
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 MachineRepresentation::kWord64); 642 MachineRepresentation::kWord64);
642 r.CheckTypeError(MachineRepresentation::kWord32, Type::Signed32(), 643 r.CheckTypeError(MachineRepresentation::kWord32, Type::Signed32(),
643 MachineRepresentation::kWord64); 644 MachineRepresentation::kWord64);
644 r.CheckTypeError(MachineRepresentation::kWord32, Type::Unsigned32(), 645 r.CheckTypeError(MachineRepresentation::kWord32, Type::Unsigned32(),
645 MachineRepresentation::kWord64); 646 MachineRepresentation::kWord64);
646 } 647 }
647 648
648 } // namespace compiler 649 } // namespace compiler
649 } // namespace internal 650 } // namespace internal
650 } // namespace v8 651 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-changes-lowering.cc ('k') | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698