Index: src/compiler/arm64/instruction-selector-arm64.cc |
diff --git a/src/compiler/arm64/instruction-selector-arm64.cc b/src/compiler/arm64/instruction-selector-arm64.cc |
index 09c7f2fd538b16927ae5664a1d418e1e41927f3a..1d83a51de639a1b9a3487835da988a641a1d74e2 100644 |
--- a/src/compiler/arm64/instruction-selector-arm64.cc |
+++ b/src/compiler/arm64/instruction-selector-arm64.cc |
@@ -1220,10 +1220,14 @@ static void VisitWord64Test(InstructionSelector* selector, Node* node, |
static void VisitFloat64Compare(InstructionSelector* selector, Node* node, |
FlagsContinuation* cont) { |
Arm64OperandGenerator g(selector); |
- Node* left = node->InputAt(0); |
- Node* right = node->InputAt(1); |
- VisitCompare(selector, kArm64Float64Cmp, g.UseRegister(left), |
- g.UseRegister(right), cont); |
+ Float64BinopMatcher m(node); |
+ if (m.right().Is(0.0)) { |
+ VisitCompare(selector, kArm64Float64Cmp, g.UseRegister(m.left().node()), |
+ g.UseImmediate(m.right().node()), cont); |
+ } else { |
+ VisitCompare(selector, kArm64Float64Cmp, g.UseRegister(m.left().node()), |
+ g.UseRegister(m.right().node()), cont); |
+ } |
} |