| Index: src/compiler/simplified-lowering.cc
|
| diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
|
| index e017f1d2e401de0e193d9b32fb6654a003728a07..4af401df5c42a1239a387436b1d8fc96ec8866ee 100644
|
| --- a/src/compiler/simplified-lowering.cc
|
| +++ b/src/compiler/simplified-lowering.cc
|
| @@ -701,6 +701,11 @@ 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);
|
| @@ -1619,6 +1624,15 @@ 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);
|
|
|