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

Side by Side Diff: test/unittests/compiler/register-allocator-unittest.cc

Issue 2400513002: [Turbofan] Allow FP operands and vregs in InstructionSequenceTest. (Closed)
Patch Set: Remove extra tests, will add back later. Created 4 years, 2 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/unittests/compiler/move-optimizer-unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "src/compiler/pipeline.h" 5 #include "src/compiler/pipeline.h"
6 #include "test/unittests/compiler/instruction-sequence-unittest.h" 6 #include "test/unittests/compiler/instruction-sequence-unittest.h"
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 namespace compiler { 10 namespace compiler {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 StartBlock(); 94 StartBlock();
95 auto a_reg = Parameter(); 95 auto a_reg = Parameter();
96 auto b_reg = Parameter(); 96 auto b_reg = Parameter();
97 auto c_reg = EmitOI(Reg(1), Reg(a_reg, 1), Reg(b_reg, 0)); 97 auto c_reg = EmitOI(Reg(1), Reg(a_reg, 1), Reg(b_reg, 0));
98 Return(c_reg); 98 Return(c_reg);
99 EndBlock(Last()); 99 EndBlock(Last());
100 100
101 Allocate(); 101 Allocate();
102 } 102 }
103 103
104 TEST_F(RegisterAllocatorTest, CanAllocateThreeFPRegisters) {
105 // return p0 + p1;
106 StartBlock();
107 VReg a_reg = FPParameter();
108 VReg b_reg = FPParameter();
109 VReg c_reg = EmitOI(FPReg(1), Reg(a_reg, 1), Reg(b_reg, 0));
110 Return(c_reg);
111 EndBlock(Last());
112
113 Allocate();
114 }
104 115
105 TEST_F(RegisterAllocatorTest, SimpleLoop) { 116 TEST_F(RegisterAllocatorTest, SimpleLoop) {
106 // i = K; 117 // i = K;
107 // while(true) { i++ } 118 // while(true) { i++ }
108 StartBlock(); 119 StartBlock();
109 auto i_reg = DefineConstant(); 120 auto i_reg = DefineConstant();
110 EndBlock(); 121 EndBlock();
111 122
112 { 123 {
113 StartLoop(1); 124 StartLoop(1);
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 INSTANTIATE_TEST_CASE_P( 788 INSTANTIATE_TEST_CASE_P(
778 RegisterAllocatorTest, SlotConstraintTest, 789 RegisterAllocatorTest, SlotConstraintTest,
779 ::testing::Combine(::testing::ValuesIn(kParameterTypes), 790 ::testing::Combine(::testing::ValuesIn(kParameterTypes),
780 ::testing::Range(0, SlotConstraintTest::kMaxVariant))); 791 ::testing::Range(0, SlotConstraintTest::kMaxVariant)));
781 792
782 #endif // GTEST_HAS_COMBINE 793 #endif // GTEST_HAS_COMBINE
783 794
784 } // namespace compiler 795 } // namespace compiler
785 } // namespace internal 796 } // namespace internal
786 } // namespace v8 797 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/move-optimizer-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698