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 50fe0df1904b8cb77ae3b476d42233e12252d221..ac06da397a52751445addbca8144eeaaac2c60a7 100644 |
--- a/src/compiler/x64/instruction-selector-x64.cc |
+++ b/src/compiler/x64/instruction-selector-x64.cc |
@@ -900,6 +900,30 @@ void InstructionSelector::VisitFloat64Mod(Node* node) { |
} |
+void InstructionSelector::VisitFloat64Max(Node* node) { |
+ X64OperandGenerator g(this); |
+ if (IsSupported(AVX)) { |
+ Emit(kAVXFloat64Max, g.DefineAsRegister(node), |
+ g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1))); |
+ } else { |
+ Emit(kSSEFloat64Max, g.DefineSameAsFirst(node), |
+ g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1))); |
+ } |
+} |
+ |
+ |
+void InstructionSelector::VisitFloat64Min(Node* node) { |
+ X64OperandGenerator g(this); |
+ if (IsSupported(AVX)) { |
+ Emit(kAVXFloat64Min, g.DefineAsRegister(node), |
+ g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1))); |
+ } else { |
+ Emit(kSSEFloat64Min, g.DefineSameAsFirst(node), |
+ g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1))); |
+ } |
+} |
+ |
+ |
void InstructionSelector::VisitFloat64Sqrt(Node* node) { |
X64OperandGenerator g(this); |
Emit(kSSEFloat64Sqrt, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
@@ -1449,6 +1473,8 @@ void InstructionSelector::VisitFloat64InsertHighWord32(Node* node) { |
MachineOperatorBuilder::Flags |
InstructionSelector::SupportedMachineOperatorFlags() { |
MachineOperatorBuilder::Flags flags = |
+ MachineOperatorBuilder::kFloat64Max | |
+ MachineOperatorBuilder::kFloat64Min | |
MachineOperatorBuilder::kWord32ShiftIsSafe; |
if (CpuFeatures::IsSupported(SSE4_1)) { |
flags |= MachineOperatorBuilder::kFloat64RoundDown | |