Index: src/compiler/int64-lowering.cc |
diff --git a/src/compiler/int64-lowering.cc b/src/compiler/int64-lowering.cc |
index 0345d26d396d7364ac29be985ce47e8826083d41..bed8606016b4b2d912456b6a4a33719723cdc802 100644 |
--- a/src/compiler/int64-lowering.cc |
+++ b/src/compiler/int64-lowering.cc |
@@ -289,6 +289,26 @@ void Int64Lowering::LowerNode(Node* node) { |
break; |
} |
// kExprI64Shl: |
+ case IrOpcode::kWord64Shl: { |
+ DCHECK(node->InputCount() == 2); |
titzer
2016/03/02 22:32:53
Can you drop in a TODO(turbofan) here for shift co
ahaas
2016/03/04 10:21:11
Done.
|
+ Node* shift = node->InputAt(1); |
+ if (HasReplacementLow(shift)) { |
+ // We do not have to care about the high word replacement, because |
+ // the shift can only be between 0 and 63 anyways. |
+ node->ReplaceInput(1, GetReplacementLow(shift)); |
+ } |
+ |
+ Node* value = node->InputAt(0); |
+ node->ReplaceInput(0, GetReplacementLow(value)); |
+ node->InsertInput(zone(), 1, GetReplacementHigh(value)); |
+ |
+ NodeProperties::ChangeOp(node, machine()->WasmWord64Shl()); |
+ // We access the additional return values through projections. |
+ Node* low_node = graph()->NewNode(common()->Projection(0), node); |
+ Node* high_node = graph()->NewNode(common()->Projection(1), node); |
+ ReplaceNode(node, low_node, high_node); |
+ break; |
+ } |
// kExprI64ShrU: |
// kExprI64ShrS: |
// kExprI64Eq: |