Skip to content

Commit

Permalink
Revert of [turbofan] Better representation selection for comparison w…
Browse files Browse the repository at this point in the history
…ith Float64. (patchset crosswalk-project#2 id:20001 of https://codereview.chromium.org/2790833004/ )

Reason for revert:
Doesn't really move the needle, but tanks Kraken/imaging-gaussian-blur (crbug.com/709396), so reverting for now.

Original issue's description:
> [turbofan] Better representation selection for comparison with Float64.
>
> For speculative number comparisons with SignedSmall feedback, we always
> enforce either TaggedSigned or Word32 comparisons. But this is not
> really beneficial if one of the inputs is already in Float64
> representation; in that case it's cheaper to just convert the other
> input to a Float64.
>
> [email protected]
>
> Review-Url: https://codereview.chromium.org/2790833004
> Cr-Commit-Position: refs/heads/master@{#44327}
> Committed: https://chromium.googlesource.com/v8/v8/+/8af394d6d385daf05b73765a2545ac8f266c64c7

[email protected]
BUG=chromium:709396

Review-Url: https://codereview.chromium.org/2801233002
Cr-Commit-Position: refs/heads/master@{#44480}
  • Loading branch information
bmeurer authored and Commit bot committed Apr 7, 2017
1 parent 8dc308d commit 5e78b32
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/compiler/simplified-lowering.cc
Original file line number Diff line number Diff line change
Expand Up @@ -701,11 +701,6 @@ class RepresentationSelector {
GetUpperBound(node->InputAt(1))->Is(type);
}

bool IsNodeRepresentationFloat64(Node* node) {
MachineRepresentation representation = GetInfo(node)->representation();
return representation == MachineRepresentation::kFloat64;
}

bool IsNodeRepresentationTagged(Node* node) {
MachineRepresentation representation = GetInfo(node)->representation();
return IsAnyTagged(representation);
Expand Down Expand Up @@ -1624,15 +1619,6 @@ class RepresentationSelector {
ChangeToPureOp(
node, changer_->TaggedSignedOperatorFor(node->opcode()));

} else if (IsNodeRepresentationFloat64(lhs) ||
IsNodeRepresentationFloat64(rhs)) {
// If one side is already a Float64, it's pretty expensive to
// do the comparison in Word32, since that means we need a
// checked conversion from Float64 to Word32. It's cheaper to
// just go to Float64 for the comparison.
VisitBinop(node, UseInfo::CheckedNumberAsFloat64(),
MachineRepresentation::kBit);
ChangeToPureOp(node, Float64Op(node));
} else {
VisitBinop(node, CheckedUseInfoAsWord32FromHint(hint),
MachineRepresentation::kBit);
Expand Down

0 comments on commit 5e78b32

Please sign in to comment.