Commit 654bf3cd authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[compiler] Simplify node matching in loop variable analyzer.

This removes a condition that seems to have become always true in the
cases we care about.

R=jarin@chromium.org

Bug: 
Change-Id: I3684db93ab7e498b7b7ac0b42945625c30fd1afa
Reviewed-on: https://chromium-review.googlesource.com/806225Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49883}
parent 2290ad8b
......@@ -318,14 +318,8 @@ InductionVariable* LoopVariableOptimizer::TryGetInductionVariable(Node* phi) {
}
// TODO(jarin) Support both sides.
// XXX
if (arith->InputAt(0) != phi) {
if ((arith->InputAt(0)->opcode() != IrOpcode::kJSToNumber &&
arith->InputAt(0)->opcode() != IrOpcode::kSpeculativeToNumber) ||
arith->InputAt(0)->InputAt(0) != phi) {
return nullptr;
}
}
if (arith->InputAt(0) != phi) return nullptr;
Node* incr = arith->InputAt(1);
return new (zone())
InductionVariable(phi, arith, incr, initial, zone(), arithmeticType);
......
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