Index: src/compiler/x64/instruction-selector-x64.cc |
diff --git a/src/compiler/x64/instruction-selector-x64.cc b/src/compiler/x64/instruction-selector-x64.cc |
index aba480de42319c58edd4e92c63004108ac5b2b6b..bf6b170e414b1eb568fb727e20ed69550ff512e8 100644 |
--- a/src/compiler/x64/instruction-selector-x64.cc |
+++ b/src/compiler/x64/instruction-selector-x64.cc |
@@ -1027,11 +1027,12 @@ static void VisitCompareZero(InstructionSelector* selector, Node* node, |
} |
-// Shared routine for multiple float64 compare operations. |
+// Shared routine for multiple float64 compare operations (inputs commuted). |
static void VisitFloat64Compare(InstructionSelector* selector, Node* node, |
FlagsContinuation* cont) { |
- VisitCompare(selector, kSSEFloat64Cmp, node->InputAt(0), node->InputAt(1), |
- cont, node->op()->HasProperty(Operator::kCommutative)); |
+ Node* const left = node->InputAt(0); |
+ Node* const right = node->InputAt(1); |
+ VisitCompare(selector, kSSEFloat64Cmp, right, left, cont, false); |
} |
@@ -1102,10 +1103,10 @@ void InstructionSelector::VisitBranch(Node* branch, BasicBlock* tbranch, |
cont.OverwriteAndNegateIfEqual(kUnorderedEqual); |
return VisitFloat64Compare(this, value, &cont); |
case IrOpcode::kFloat64LessThan: |
- cont.OverwriteAndNegateIfEqual(kUnorderedLessThan); |
+ cont.OverwriteAndNegateIfEqual(kUnsignedGreaterThan); |
return VisitFloat64Compare(this, value, &cont); |
case IrOpcode::kFloat64LessThanOrEqual: |
- cont.OverwriteAndNegateIfEqual(kUnorderedLessThanOrEqual); |
+ cont.OverwriteAndNegateIfEqual(kUnsignedGreaterThanOrEqual); |
return VisitFloat64Compare(this, value, &cont); |
case IrOpcode::kProjection: |
// Check if this is the overflow output projection of an |
@@ -1291,13 +1292,13 @@ void InstructionSelector::VisitFloat64Equal(Node* node) { |
void InstructionSelector::VisitFloat64LessThan(Node* node) { |
- FlagsContinuation cont(kUnorderedLessThan, node); |
+ FlagsContinuation cont(kUnsignedGreaterThan, node); |
VisitFloat64Compare(this, node, &cont); |
} |
void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { |
- FlagsContinuation cont(kUnorderedLessThanOrEqual, node); |
+ FlagsContinuation cont(kUnsignedGreaterThanOrEqual, node); |
VisitFloat64Compare(this, node, &cont); |
} |