Index: src/compiler/simplified-operator-reducer.cc |
diff --git a/src/compiler/simplified-operator-reducer.cc b/src/compiler/simplified-operator-reducer.cc |
index 46d8e2f72d5d4024c0f9a3473d0c7db9e85f80b6..d8bd1e0232eb558cb46e6275f2e763d1f333db76 100644 |
--- a/src/compiler/simplified-operator-reducer.cc |
+++ b/src/compiler/simplified-operator-reducer.cc |
@@ -134,6 +134,14 @@ Reduction SimplifiedOperatorReducer::Reduce(Node* node) { |
} |
break; |
} |
+ case IrOpcode::kCheckNumber: { |
+ NodeMatcher m(node->InputAt(0)); |
+ if (m.IsConvertTaggedHoleToUndefined()) { |
+ node->ReplaceInput(0, m.InputAt(0)); |
+ return Changed(node); |
+ } |
+ break; |
+ } |
case IrOpcode::kCheckTaggedPointer: { |
Node* const input = node->InputAt(0); |
if (DecideObjectIsSmi(input) == Decision::kFalse) { |
@@ -148,6 +156,11 @@ Reduction SimplifiedOperatorReducer::Reduce(Node* node) { |
ReplaceWithValue(node, input); |
return Replace(input); |
} |
+ NodeMatcher m(input); |
+ if (m.IsConvertTaggedHoleToUndefined()) { |
+ node->ReplaceInput(0, m.InputAt(0)); |
+ return Changed(node); |
+ } |
break; |
} |
case IrOpcode::kObjectIsSmi: { |