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

Unified Diff: src/compiler/change-lowering.cc

Issue 704463004: [turbofan] Turn various diamonds into selects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix cctest. Created 6 years, 1 month 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/js-builtin-reducer.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 cf18e6291c35e5b233ccadfc10792ebb3efa57c1..b36e0bbe4402947b2010d468e97e2abcb8275d7a 100644
--- a/src/compiler/change-lowering.cc
+++ b/src/compiler/change-lowering.cc
@@ -102,11 +102,10 @@ Node* ChangeLowering::LoadHeapNumberValue(Node* value, Node* control) {
Reduction ChangeLowering::ChangeBitToBool(Node* val, Node* control) {
- Diamond d(graph(), common(), val);
- d.Chain(control);
- MachineType machine_type = static_cast<MachineType>(kTypeBool | kRepTagged);
- return Replace(d.Phi(machine_type, jsgraph()->TrueConstant(),
- jsgraph()->FalseConstant()));
+ MachineType const type = static_cast<MachineType>(kTypeBool | kRepTagged);
+ return Replace(graph()->NewNode(common()->Select(type), val,
+ jsgraph()->TrueConstant(),
+ jsgraph()->FalseConstant()));
}
« no previous file with comments | « no previous file | src/compiler/js-builtin-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698