Index: src/compiler/js-typed-lowering.cc |
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc |
index 213a8a414660f87e7f9c685689c07dd3b8c85d8c..a92d93d6a6dcdd0688c0b7bda30fc01fae903331 100644 |
--- a/src/compiler/js-typed-lowering.cc |
+++ b/src/compiler/js-typed-lowering.cc |
@@ -1847,6 +1847,15 @@ Reduction JSTypedLowering::ReduceSelect(Node* node) { |
return NoChange(); |
} |
+Reduction JSTypedLowering::ReduceNumberRoundop(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_cache_.kIntegerOrMinusZeroOrNaN)) { |
+ return Replace(input); |
+ } |
+ return NoChange(); |
+} |
Reduction JSTypedLowering::Reduce(Node* node) { |
// Check if the output type is a singleton. In that case we already know the |
@@ -1968,6 +1977,11 @@ Reduction JSTypedLowering::Reduce(Node* node) { |
return ReduceJSGeneratorRestoreRegister(node); |
case IrOpcode::kSelect: |
return ReduceSelect(node); |
+ case IrOpcode::kNumberCeil: |
+ case IrOpcode::kNumberFloor: |
+ case IrOpcode::kNumberRound: |
+ case IrOpcode::kNumberTrunc: |
+ return ReduceNumberRoundop(node); |
default: |
break; |
} |