Index: src/compiler/js-typed-lowering.cc |
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc |
index 56ffc5f715c27ed97c002bf5f06558beb405ed7a..da47c5f8bfbfe5a4144df336d16d5787b790685d 100644 |
--- a/src/compiler/js-typed-lowering.cc |
+++ b/src/compiler/js-typed-lowering.cc |
@@ -858,8 +858,8 @@ Reduction JSTypedLowering::ReduceJSStoreContext(Node* node) { |
Reduction JSTypedLowering::Reduce(Node* node) { |
// Check if the output type is a singleton. In that case we already know the |
// result value and can simply replace the node if it's eliminable. |
- if (NodeProperties::IsTyped(node) && |
- !IrOpcode::IsLeafOpcode(node->opcode()) && |
+ if (!IrOpcode::IsConstantOpcode(node->opcode()) && |
+ NodeProperties::IsTyped(node) && |
node->op()->HasProperty(Operator::kEliminatable)) { |
Type* upper = NodeProperties::GetBounds(node).upper; |
if (upper->IsConstant()) { |