Index: src/compiler/js-typed-lowering.cc |
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc |
index acbeb78f7d9947e9661a613f3e6361ec41830a19..b3fab5246577a0c1a4bad04ef283728cc019be0c 100644 |
--- a/src/compiler/js-typed-lowering.cc |
+++ b/src/compiler/js-typed-lowering.cc |
@@ -1889,6 +1889,17 @@ Reduction JSTypedLowering::ReduceSelect(Node* node) { |
return NoChange(); |
} |
+Reduction JSTypedLowering::ReduceCheckString(Node* node) { |
+ // TODO(bmeurer): Find a better home for this thing! |
+ Node* const input = NodeProperties::GetValueInput(node, 0); |
+ Type* const input_type = NodeProperties::GetType(input); |
+ if (input_type->Is(Type::String())) { |
+ ReplaceWithValue(node, input); |
+ return Replace(input); |
+ } |
+ return NoChange(); |
+} |
+ |
Reduction JSTypedLowering::ReduceNumberRoundop(Node* node) { |
// TODO(bmeurer): Find a better home for this thing! |
Node* const input = NodeProperties::GetValueInput(node, 0); |
@@ -2019,6 +2030,8 @@ Reduction JSTypedLowering::Reduce(Node* node) { |
return ReduceJSGeneratorRestoreRegister(node); |
case IrOpcode::kSelect: |
return ReduceSelect(node); |
+ case IrOpcode::kCheckString: |
+ return ReduceCheckString(node); |
case IrOpcode::kNumberCeil: |
case IrOpcode::kNumberFloor: |
case IrOpcode::kNumberRound: |