| Index: src/compiler/mips64/instruction-selector-mips64.cc
|
| diff --git a/src/compiler/mips64/instruction-selector-mips64.cc b/src/compiler/mips64/instruction-selector-mips64.cc
|
| index e7a4f9dfd13eed593ab3ed2cba0c7c6838019c10..a2f301775b281a878d538a5e9b3a3417eddc2e42 100644
|
| --- a/src/compiler/mips64/instruction-selector-mips64.cc
|
| +++ b/src/compiler/mips64/instruction-selector-mips64.cc
|
| @@ -993,10 +993,14 @@ static void VisitCompare(InstructionSelector* selector, InstructionCode opcode,
|
| void VisitFloat32Compare(InstructionSelector* selector, Node* node,
|
| FlagsContinuation* cont) {
|
| Mips64OperandGenerator g(selector);
|
| - Node* left = node->InputAt(0);
|
| - Node* right = node->InputAt(1);
|
| - VisitCompare(selector, kMips64CmpS, g.UseRegister(left), g.UseRegister(right),
|
| - cont);
|
| + Float32BinopMatcher m(node);
|
| + InstructionOperand lhs, rhs;
|
| +
|
| + lhs = m.left().IsZero() ? g.UseImmediate(m.left().node())
|
| + : g.UseRegister(m.left().node());
|
| + rhs = m.right().IsZero() ? g.UseImmediate(m.right().node())
|
| + : g.UseRegister(m.right().node());
|
| + VisitCompare(selector, kMips64CmpS, lhs, rhs, cont);
|
| }
|
|
|
|
|
| @@ -1004,10 +1008,14 @@ void VisitFloat32Compare(InstructionSelector* selector, Node* node,
|
| void VisitFloat64Compare(InstructionSelector* selector, Node* node,
|
| FlagsContinuation* cont) {
|
| Mips64OperandGenerator g(selector);
|
| - Node* left = node->InputAt(0);
|
| - Node* right = node->InputAt(1);
|
| - VisitCompare(selector, kMips64CmpD, g.UseRegister(left), g.UseRegister(right),
|
| - cont);
|
| + Float64BinopMatcher m(node);
|
| + InstructionOperand lhs, rhs;
|
| +
|
| + lhs = m.left().IsZero() ? g.UseImmediate(m.left().node())
|
| + : g.UseRegister(m.left().node());
|
| + rhs = m.right().IsZero() ? g.UseImmediate(m.right().node())
|
| + : g.UseRegister(m.right().node());
|
| + VisitCompare(selector, kMips64CmpD, lhs, rhs, cont);
|
| }
|
|
|
|
|
|
|