Index: src/compiler/arm/instruction-selector-arm.cc |
diff --git a/src/compiler/arm/instruction-selector-arm.cc b/src/compiler/arm/instruction-selector-arm.cc |
index 943ad0fd198d0e38e006be770f8679743c83da4e..fb25c3b4eb41a55da76860feeb700570dd1d116b 100644 |
--- a/src/compiler/arm/instruction-selector-arm.cc |
+++ b/src/compiler/arm/instruction-selector-arm.cc |
@@ -1073,16 +1073,18 @@ void VisitFloat64Compare(InstructionSelector* selector, Node* node, |
FlagsContinuation* cont) { |
ArmOperandGenerator g(selector); |
Float64BinopMatcher m(node); |
+ InstructionOperand* rhs = m.right().Is(0.0) ? g.UseImmediate(m.right().node()) |
+ : g.UseRegister(m.right().node()); |
if (cont->IsBranch()) { |
selector->Emit(cont->Encode(kArmVcmpF64), nullptr, |
- g.UseRegister(m.left().node()), |
- g.UseRegister(m.right().node()), g.Label(cont->true_block()), |
+ g.UseRegister(m.left().node()), rhs, |
+ g.Label(cont->true_block()), |
g.Label(cont->false_block()))->MarkAsControl(); |
} else { |
DCHECK(cont->IsSet()); |
- selector->Emit( |
- cont->Encode(kArmVcmpF64), g.DefineAsRegister(cont->result()), |
- g.UseRegister(m.left().node()), g.UseRegister(m.right().node())); |
+ selector->Emit(cont->Encode(kArmVcmpF64), |
+ g.DefineAsRegister(cont->result()), |
+ g.UseRegister(m.left().node()), rhs); |
} |
} |