Index: src/compiler/ia32/instruction-selector-ia32.cc |
diff --git a/src/compiler/ia32/instruction-selector-ia32.cc b/src/compiler/ia32/instruction-selector-ia32.cc |
index 6f15150f7f9b1d7619c66c72a2d54f22864d5bc8..8ec091a0f6b4776bb981d727507320c4e47ac64d 100644 |
--- a/src/compiler/ia32/instruction-selector-ia32.cc |
+++ b/src/compiler/ia32/instruction-selector-ia32.cc |
@@ -702,6 +702,30 @@ void InstructionSelector::VisitFloat64Mod(Node* node) { |
} |
+void InstructionSelector::VisitFloat64Max(Node* node) { |
+ IA32OperandGenerator 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) { |
+ IA32OperandGenerator 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) { |
IA32OperandGenerator g(this); |
Emit(kSSEFloat64Sqrt, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
@@ -1135,6 +1159,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 | |