| Index: src/compiler/typed-optimization.cc
|
| diff --git a/src/compiler/typed-optimization.cc b/src/compiler/typed-optimization.cc
|
| index e130a10e4eb8e196e9b153d7c52f5f0792b534b6..bc0d80ade0aeaf8df83cb9d2caefa9dcbf388019 100644
|
| --- a/src/compiler/typed-optimization.cc
|
| +++ b/src/compiler/typed-optimization.cc
|
| @@ -195,7 +195,8 @@ Reduction TypedOptimization::ReduceNumberFloor(Node* node) {
|
| return Replace(input);
|
| }
|
| if (input_type->Is(Type::PlainNumber()) &&
|
| - input->opcode() == IrOpcode::kNumberDivide) {
|
| + (input->opcode() == IrOpcode::kNumberDivide ||
|
| + input->opcode() == IrOpcode::kSpeculativeNumberDivide)) {
|
| Node* const lhs = NodeProperties::GetValueInput(input, 0);
|
| Type* const lhs_type = NodeProperties::GetType(lhs);
|
| Node* const rhs = NodeProperties::GetValueInput(input, 1);
|
| @@ -218,6 +219,11 @@ Reduction TypedOptimization::ReduceNumberFloor(Node* node) {
|
| NodeProperties::SetType(node, lhs_type);
|
| return Changed(node);
|
| }
|
| + if (lhs_type->Is(Type::Signed32()) && rhs_type->Is(Type::Unsigned32())) {
|
| + NodeProperties::ChangeOp(node, simplified()->NumberToInt32());
|
| + NodeProperties::SetType(node, lhs_type);
|
| + return Changed(node);
|
| + }
|
| }
|
| return NoChange();
|
| }
|
|
|