Commit 832a5b93 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

[turbofan] Positive dividends are heavily favored for Int32Mod.

Mark negative dividend case as deferred, as modulus by power of two with
negative dividend almost never appears in practice.

R=dcarney@chromium.org

Review URL: https://codereview.chromium.org/699573002

Cr-Commit-Position: refs/heads/master@{#25065}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25065 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c63deb9b
...@@ -654,8 +654,8 @@ Reduction MachineOperatorReducer::ReduceInt32Mod(Node* node) { ...@@ -654,8 +654,8 @@ Reduction MachineOperatorReducer::ReduceInt32Mod(Node* node) {
Node* check = Node* check =
graph()->NewNode(machine()->Int32LessThan(), dividend, zero); graph()->NewNode(machine()->Int32LessThan(), dividend, zero);
Node* branch = Node* branch = graph()->NewNode(common()->Branch(BranchHint::kFalse),
graph()->NewNode(common()->Branch(), check, graph()->start()); check, graph()->start());
Node* if_true = graph()->NewNode(common()->IfTrue(), branch); Node* if_true = graph()->NewNode(common()->IfTrue(), branch);
Node* neg = Int32Sub(zero, Word32And(Int32Sub(zero, dividend), mask)); Node* neg = Int32Sub(zero, Word32And(Int32Sub(zero, dividend), mask));
......
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