Index: src/compiler/simplified-operator-reducer.cc |
diff --git a/src/compiler/simplified-operator-reducer.cc b/src/compiler/simplified-operator-reducer.cc |
index 48aca9729e0393b1a9ba8db7a07c52b75581a841..012004a8af6c1c895fd680c589501cd19c300bb1 100644 |
--- a/src/compiler/simplified-operator-reducer.cc |
+++ b/src/compiler/simplified-operator-reducer.cc |
@@ -89,8 +89,17 @@ Reduction SimplifiedOperatorReducer::Reduce(Node* node) { |
if (m.HasValue()) return ReplaceNumber(FastUI2D(m.Value())); |
break; |
} |
+ case IrOpcode::kNumberCeil: |
case IrOpcode::kNumberFloor: |
- return ReduceNumberFloor(node); |
+ case IrOpcode::kNumberRound: |
+ case IrOpcode::kNumberTrunc: { |
+ Node* const input = NodeProperties::GetValueInput(node, 0); |
+ Type* const input_type = NodeProperties::GetType(input); |
+ if (input_type->Is(type_cache_.kIntegerOrMinusZeroOrNaN)) { |
+ return Replace(input); |
+ } |
+ break; |
+ } |
case IrOpcode::kReferenceEqual: |
return ReduceReferenceEqual(node); |
default: |
@@ -99,16 +108,6 @@ Reduction SimplifiedOperatorReducer::Reduce(Node* node) { |
return NoChange(); |
} |
-Reduction SimplifiedOperatorReducer::ReduceNumberFloor(Node* node) { |
- DCHECK_EQ(IrOpcode::kNumberFloor, node->opcode()); |
- Node* const input = NodeProperties::GetValueInput(node, 0); |
- Type* const input_type = NodeProperties::GetType(input); |
- if (input_type->Is(type_cache_.kIntegerOrMinusZeroOrNaN)) { |
- return Replace(input); |
- } |
- return NoChange(); |
-} |
- |
Reduction SimplifiedOperatorReducer::ReduceReferenceEqual(Node* node) { |
DCHECK_EQ(IrOpcode::kReferenceEqual, node->opcode()); |
Node* const left = NodeProperties::GetValueInput(node, 0); |