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

Unified Diff: src/compiler/change-lowering.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 | « no previous file | src/compiler/change-lowering-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/change-lowering.cc
diff --git a/src/compiler/change-lowering.cc b/src/compiler/change-lowering.cc
index e9fd7400d03a6933a37d103c376099cb8067abbe..f3d732b063adfc9452c3beef9dfdc65b8cd2a6fb 100644
--- a/src/compiler/change-lowering.cc
+++ b/src/compiler/change-lowering.cc
@@ -111,8 +111,9 @@ Reduction ChangeLowering::ChangeBitToBool(Node* val, Node* control) {
Node* false_value = jsgraph()->FalseConstant();
Node* merge = graph()->NewNode(common()->Merge(2), if_true, if_false);
- Node* phi =
- graph()->NewNode(common()->Phi(2), true_value, false_value, merge);
+ Node* phi = graph()->NewNode(
+ common()->Phi(static_cast<MachineType>(kTypeBool | kRepTagged), 2),
+ true_value, false_value, merge);
return Replace(phi);
}
@@ -150,7 +151,8 @@ Reduction ChangeLowering::ChangeInt32ToTagged(Node* val, Node* control) {
Node* smi = graph()->NewNode(common()->Projection(0), add);
Node* merge = graph()->NewNode(common()->Merge(2), if_true, if_false);
- Node* phi = graph()->NewNode(common()->Phi(2), heap_number, smi, merge);
+ Node* phi = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), heap_number,
+ smi, merge);
return Replace(phi);
}
@@ -174,7 +176,9 @@ Reduction ChangeLowering::ChangeTaggedToUI32(Node* val, Node* control,
Node* number = ChangeSmiToInt32(val);
Node* merge = graph()->NewNode(common()->Merge(2), if_true, if_false);
- Node* phi = graph()->NewNode(common()->Phi(2), change, number, merge);
+ Node* phi = graph()->NewNode(
+ common()->Phi((signedness == kSigned) ? kMachInt32 : kMachUint32, 2),
+ change, number, merge);
return Replace(phi);
}
@@ -196,7 +200,8 @@ Reduction ChangeLowering::ChangeTaggedToFloat64(Node* val, Node* control) {
ChangeSmiToInt32(val));
Node* merge = graph()->NewNode(common()->Merge(2), if_true, if_false);
- Node* phi = graph()->NewNode(common()->Phi(2), load, number, merge);
+ Node* phi =
+ graph()->NewNode(common()->Phi(kMachFloat64, 2), load, number, merge);
return Replace(phi);
}
@@ -223,7 +228,8 @@ Reduction ChangeLowering::ChangeUint32ToTagged(Node* val, Node* control) {
graph()->NewNode(machine()->ChangeUint32ToFloat64(), val), if_false);
Node* merge = graph()->NewNode(common()->Merge(2), if_true, if_false);
- Node* phi = graph()->NewNode(common()->Phi(2), smi, heap_number, merge);
+ Node* phi = graph()->NewNode(common()->Phi(kMachAnyTagged, 2), smi,
+ heap_number, merge);
return Replace(phi);
}
« no previous file with comments | « no previous file | src/compiler/change-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698