Commit eb372355 authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

X87: [turbofan] Introduce integer multiplication with overflow.

  port 8e18a5f2 (r37748)

  original commit message:

BUG=

Review-Url: https://codereview.chromium.org/2155553002
Cr-Commit-Position: refs/heads/master@{#37785}
parent 1cbe5d5a
......@@ -1440,6 +1440,9 @@ void VisitWordCompareZero(InstructionSelector* selector, Node* user,
case IrOpcode::kInt32SubWithOverflow:
cont->OverwriteAndNegateIfEqual(kOverflow);
return VisitBinop(selector, node, kX87Sub, cont);
case IrOpcode::kInt32MulWithOverflow:
cont->OverwriteAndNegateIfEqual(kOverflow);
return VisitBinop(selector, node, kX87Imul, cont);
default:
break;
}
......@@ -1565,6 +1568,14 @@ void InstructionSelector::VisitInt32SubWithOverflow(Node* node) {
VisitBinop(this, node, kX87Sub, &cont);
}
void InstructionSelector::VisitInt32MulWithOverflow(Node* node) {
if (Node* ovf = NodeProperties::FindProjection(node, 1)) {
FlagsContinuation cont = FlagsContinuation::ForSet(kOverflow, ovf);
return VisitBinop(this, node, kX87Imul, &cont);
}
FlagsContinuation cont;
VisitBinop(this, node, kX87Imul, &cont);
}
void InstructionSelector::VisitFloat32Equal(Node* node) {
FlagsContinuation cont = FlagsContinuation::ForSet(kUnorderedEqual, node);
......
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