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

Unified Diff: src/compiler/common-operator-reducer.cc

Issue 1420283009: [turbofan] Add support for storing to double fields. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/common-operator-reducer.cc
diff --git a/src/compiler/common-operator-reducer.cc b/src/compiler/common-operator-reducer.cc
index e4af2ad1f9b352a7654bdb1ea93f6f9cc775ddf9..e3c2ecad6ea10fe810e7c9e3e382fe9e5e0927e9 100644
--- a/src/compiler/common-operator-reducer.cc
+++ b/src/compiler/common-operator-reducer.cc
@@ -67,6 +67,8 @@ Reduction CommonOperatorReducer::Reduce(Node* node) {
return ReduceReturn(node);
case IrOpcode::kSelect:
return ReduceSelect(node);
+ case IrOpcode::kGuard:
+ return ReduceGuard(node);
default:
break;
}
@@ -358,6 +360,16 @@ Reduction CommonOperatorReducer::ReduceSelect(Node* node) {
}
+Reduction CommonOperatorReducer::ReduceGuard(Node* node) {
+ DCHECK_EQ(IrOpcode::kGuard, node->opcode());
+ Node* const input = NodeProperties::GetValueInput(node, 0);
+ Type* const input_type = NodeProperties::GetTypeOrAny(input);
+ Type* const guard_type = OpParameter<Type*>(node);
+ if (input_type->Is(guard_type)) return Replace(input);
+ return NoChange();
+}
+
+
Reduction CommonOperatorReducer::Change(Node* node, Operator const* op,
Node* a) {
node->ReplaceInput(0, a);

Powered by Google App Engine
This is Rietveld 408576698