diff options
Diffstat (limited to 'src/compiler/simplified-operator-reducer.cc')
-rw-r--r-- | src/compiler/simplified-operator-reducer.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/compiler/simplified-operator-reducer.cc b/src/compiler/simplified-operator-reducer.cc index b8a486df..dcfb4851 100644 --- a/src/compiler/simplified-operator-reducer.cc +++ b/src/compiler/simplified-operator-reducer.cc @@ -129,6 +129,15 @@ Reduction SimplifiedOperatorReducer::Reduce(Node* node) { } break; } + case IrOpcode::kCheckedFloat64ToInt32: { + Float64Matcher m(node->InputAt(0)); + if (m.HasValue() && IsInt32Double(m.Value())) { + Node* value = jsgraph()->Int32Constant(static_cast<int32_t>(m.Value())); + ReplaceWithValue(node, value); + return Replace(value); + } + break; + } case IrOpcode::kCheckedTaggedToInt32: case IrOpcode::kCheckedTaggedSignedToInt32: { NodeMatcher m(node->InputAt(0)); |