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

Unified Diff: src/compiler/instruction-selector-unittest.cc

Issue 545153002: [turbofan] Add MachineType to Phi. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test case. Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/js-inlining.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector-unittest.cc
diff --git a/src/compiler/instruction-selector-unittest.cc b/src/compiler/instruction-selector-unittest.cc
index cc67567d839ac41d262a27a69ebe4d3c99bf9b3a..f987e0f16c2d8e93e001f0106792bcebe3040ec2 100644
--- a/src/compiler/instruction-selector-unittest.cc
+++ b/src/compiler/instruction-selector-unittest.cc
@@ -182,7 +182,7 @@ TARGET_TEST_F(InstructionSelectorTest, ReferenceParameter) {
// Finish.
-TARGET_TEST_F(InstructionSelectorTest, Parameter) {
+TARGET_TEST_F(InstructionSelectorTest, Finish) {
StreamBuilder m(this, kMachAnyTagged, kMachAnyTagged);
Node* param = m.Parameter(0);
Node* finish = m.NewNode(m.common()->Finish(1), param, m.graph()->start());
@@ -201,6 +201,7 @@ TARGET_TEST_F(InstructionSelectorTest, Parameter) {
ASSERT_TRUE(s[1]->Output()->IsUnallocated());
EXPECT_TRUE(UnallocatedOperand::cast(s[1]->Output())->HasSameAsInputPolicy());
EXPECT_EQ(finish->id(), s.ToVreg(s[1]->Output()));
+ EXPECT_TRUE(s.IsReference(finish->id()));
}
@@ -212,7 +213,7 @@ typedef InstructionSelectorTestWithParam<MachineType>
InstructionSelectorPhiTest;
-TARGET_TEST_P(InstructionSelectorPhiTest, PropagateDoubleness) {
+TARGET_TEST_P(InstructionSelectorPhiTest, Doubleness) {
const MachineType type = GetParam();
StreamBuilder m(this, type, type, type);
Node* param0 = m.Parameter(0);
@@ -224,7 +225,7 @@ TARGET_TEST_P(InstructionSelectorPhiTest, PropagateDoubleness) {
m.Bind(&b);
m.Goto(&c);
m.Bind(&c);
- Node* phi = m.Phi(param0, param1);
+ Node* phi = m.Phi(type, param0, param1);
m.Return(phi);
Stream s = m.Build(kAllInstructions);
EXPECT_EQ(s.IsDouble(phi->id()), s.IsDouble(param0->id()));
@@ -232,7 +233,7 @@ TARGET_TEST_P(InstructionSelectorPhiTest, PropagateDoubleness) {
}
-TARGET_TEST_P(InstructionSelectorPhiTest, PropagateReferenceness) {
+TARGET_TEST_P(InstructionSelectorPhiTest, Referenceness) {
const MachineType type = GetParam();
StreamBuilder m(this, type, type, type);
Node* param0 = m.Parameter(0);
@@ -244,7 +245,7 @@ TARGET_TEST_P(InstructionSelectorPhiTest, PropagateReferenceness) {
m.Bind(&b);
m.Goto(&c);
m.Bind(&c);
- Node* phi = m.Phi(param0, param1);
+ Node* phi = m.Phi(type, param0, param1);
m.Return(phi);
Stream s = m.Build(kAllInstructions);
EXPECT_EQ(s.IsReference(phi->id()), s.IsReference(param0->id()));
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/js-inlining.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698