| Index: src/compiler/loop-variable-optimizer.cc
|
| diff --git a/src/compiler/loop-variable-optimizer.cc b/src/compiler/loop-variable-optimizer.cc
|
| index b8c158300c801de580f94488e22d388f426e678d..d5c37860f65dcbc8f1ff56ce339150211832cc8e 100644
|
| --- a/src/compiler/loop-variable-optimizer.cc
|
| +++ b/src/compiler/loop-variable-optimizer.cc
|
| @@ -317,7 +317,8 @@ InductionVariable* LoopVariableOptimizer::TryGetInductionVariable(Node* phi) {
|
|
|
| // TODO(jarin) Support both sides.
|
| if (arith->InputAt(0) != phi) {
|
| - if (arith->InputAt(0)->opcode() != IrOpcode::kJSToNumber ||
|
| + if ((arith->InputAt(0)->opcode() != IrOpcode::kJSToNumber &&
|
| + arith->InputAt(0)->opcode() != IrOpcode::kSpeculativeToNumber) ||
|
| arith->InputAt(0)->InputAt(0) != phi) {
|
| return nullptr;
|
| }
|
|
|