Commit e84eceab authored by Jaroslav Sevcik's avatar Jaroslav Sevcik Committed by Commit Bot

[turbofan] Fix loop variable analysis to account for safe-integer-subtract

Bug: chromium:760434
Change-Id: I50ed6779f79ed1b17053a0a0f2013cae53091a3a
Reviewed-on: https://chromium-review.googlesource.com/641873Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47696}
parent 17201319
...@@ -310,7 +310,8 @@ InductionVariable* LoopVariableOptimizer::TryGetInductionVariable(Node* phi) { ...@@ -310,7 +310,8 @@ InductionVariable* LoopVariableOptimizer::TryGetInductionVariable(Node* phi) {
arith->opcode() == IrOpcode::kSpeculativeSafeIntegerAdd) { arith->opcode() == IrOpcode::kSpeculativeSafeIntegerAdd) {
arithmeticType = InductionVariable::ArithmeticType::kAddition; arithmeticType = InductionVariable::ArithmeticType::kAddition;
} else if (arith->opcode() == IrOpcode::kJSSubtract || } else if (arith->opcode() == IrOpcode::kJSSubtract ||
arith->opcode() == IrOpcode::kSpeculativeNumberSubtract) { arith->opcode() == IrOpcode::kSpeculativeNumberSubtract ||
arith->opcode() == IrOpcode::kSpeculativeSafeIntegerSubtract) {
arithmeticType = InductionVariable::ArithmeticType::kSubtraction; arithmeticType = InductionVariable::ArithmeticType::kSubtraction;
} else { } else {
return nullptr; return nullptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment