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

Side by Side Diff: test/unittests/compiler/instruction-selector-unittest.cc

Issue 2082523002: [turbofan] Introduce CheckTaggedSigned and CheckTaggedPointer operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compile Created 4 years, 6 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 "test/unittests/compiler/instruction-selector-unittest.h" 5 #include "test/unittests/compiler/instruction-selector-unittest.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/compiler/graph.h" 8 #include "src/compiler/graph.h"
9 #include "src/compiler/schedule.h" 9 #include "src/compiler/schedule.h"
10 #include "src/flags.h" 10 #include "src/flags.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 326
327 TARGET_TEST_F(InstructionSelectorTest, ValueEffect) { 327 TARGET_TEST_F(InstructionSelectorTest, ValueEffect) {
328 StreamBuilder m1(this, MachineType::Int32(), MachineType::Pointer()); 328 StreamBuilder m1(this, MachineType::Int32(), MachineType::Pointer());
329 Node* p1 = m1.Parameter(0); 329 Node* p1 = m1.Parameter(0);
330 m1.Return(m1.Load(MachineType::Int32(), p1, m1.Int32Constant(0))); 330 m1.Return(m1.Load(MachineType::Int32(), p1, m1.Int32Constant(0)));
331 Stream s1 = m1.Build(kAllInstructions); 331 Stream s1 = m1.Build(kAllInstructions);
332 StreamBuilder m2(this, MachineType::Int32(), MachineType::Pointer()); 332 StreamBuilder m2(this, MachineType::Int32(), MachineType::Pointer());
333 Node* p2 = m2.Parameter(0); 333 Node* p2 = m2.Parameter(0);
334 m2.Return(m2.AddNode( 334 m2.Return(m2.AddNode(
335 m2.machine()->Load(MachineType::Int32()), p2, m2.Int32Constant(0), 335 m2.machine()->Load(MachineType::Int32()), p2, m2.Int32Constant(0),
336 m2.AddNode(m2.common()->BeginRegion(), m2.graph()->start()))); 336 m2.AddNode(m2.common()->BeginRegion(RegionObservability::kObservable),
337 m2.graph()->start())));
337 Stream s2 = m2.Build(kAllInstructions); 338 Stream s2 = m2.Build(kAllInstructions);
338 EXPECT_LE(3U, s1.size()); 339 EXPECT_LE(3U, s1.size());
339 ASSERT_EQ(s1.size(), s2.size()); 340 ASSERT_EQ(s1.size(), s2.size());
340 TRACED_FORRANGE(size_t, i, 0, s1.size() - 1) { 341 TRACED_FORRANGE(size_t, i, 0, s1.size() - 1) {
341 const Instruction* i1 = s1[i]; 342 const Instruction* i1 = s1[i];
342 const Instruction* i2 = s2[i]; 343 const Instruction* i2 = s2[i];
343 EXPECT_EQ(i1->arch_opcode(), i2->arch_opcode()); 344 EXPECT_EQ(i1->arch_opcode(), i2->arch_opcode());
344 EXPECT_EQ(i1->InputCount(), i2->InputCount()); 345 EXPECT_EQ(i1->InputCount(), i2->InputCount());
345 EXPECT_EQ(i1->OutputCount(), i2->OutputCount()); 346 EXPECT_EQ(i1->OutputCount(), i2->OutputCount());
346 } 347 }
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14))); 622 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14)));
622 // Continuation. 623 // Continuation.
623 624
624 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); 625 EXPECT_EQ(kArchRet, s[index++]->arch_opcode());
625 EXPECT_EQ(index, s.size()); 626 EXPECT_EQ(index, s.size());
626 } 627 }
627 628
628 } // namespace compiler 629 } // namespace compiler
629 } // namespace internal 630 } // namespace internal
630 } // namespace v8 631 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/escape-analysis-unittest.cc ('k') | test/unittests/compiler/simplified-operator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698