Commit 86af70af authored by shiyu.zhang's avatar shiyu.zhang Committed by Commit bot

[turbofan] Remove redundant cmp operands swap.

Remove redundant operands swap for compare operation.

BUG=

Review-Url: https://codereview.chromium.org/2507683002
Cr-Commit-Position: refs/heads/master@{#41385}
parent 2f17d5f8
......@@ -1352,11 +1352,6 @@ void VisitWordCompare(InstructionSelector* selector, Node* node,
cont);
}
if (g.CanBeBetterLeftOperand(right)) {
if (!node->op()->HasProperty(Operator::kCommutative)) cont->Commute();
std::swap(left, right);
}
return VisitCompare(selector, opcode, left, right, cont,
node->op()->HasProperty(Operator::kCommutative));
}
......
......@@ -1783,11 +1783,6 @@ void VisitWordCompare(InstructionSelector* selector, Node* node,
g.UseRegister(right), cont);
}
if (g.CanBeBetterLeftOperand(right)) {
if (!node->op()->HasProperty(Operator::kCommutative)) cont->Commute();
std::swap(left, right);
}
return VisitCompare(selector, opcode, left, right, cont,
node->op()->HasProperty(Operator::kCommutative));
}
......
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