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 f69a0757d07771b6c9f27f60ba02cb9b878d4083..3f1a7e5606c0c02ee5d0a4a2a2a725ba77ba5042 100644 |
--- a/src/compiler/ia32/instruction-selector-ia32.cc |
+++ b/src/compiler/ia32/instruction-selector-ia32.cc |
@@ -737,29 +737,49 @@ void InstructionSelector::VisitTruncateFloat64ToFloat32(Node* node) { |
void InstructionSelector::VisitFloat64Add(Node* node) { |
IA32OperandGenerator g(this); |
- Emit(kSSEFloat64Add, g.DefineSameAsFirst(node), |
- g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1))); |
+ if (IsSupported(AVX)) { |
+ Emit(kAVXFloat64Add, g.DefineAsRegister(node), |
+ g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1))); |
+ } else { |
+ Emit(kSSEFloat64Add, g.DefineSameAsFirst(node), |
+ g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1))); |
+ } |
} |
void InstructionSelector::VisitFloat64Sub(Node* node) { |
IA32OperandGenerator g(this); |
- Emit(kSSEFloat64Sub, g.DefineSameAsFirst(node), |
- g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1))); |
+ if (IsSupported(AVX)) { |
+ Emit(kAVXFloat64Sub, g.DefineAsRegister(node), |
+ g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1))); |
+ } else { |
+ Emit(kSSEFloat64Sub, g.DefineSameAsFirst(node), |
+ g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1))); |
+ } |
} |
void InstructionSelector::VisitFloat64Mul(Node* node) { |
IA32OperandGenerator g(this); |
- Emit(kSSEFloat64Mul, g.DefineSameAsFirst(node), |
- g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1))); |
+ if (IsSupported(AVX)) { |
+ Emit(kAVXFloat64Mul, g.DefineAsRegister(node), |
+ g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1))); |
+ } else { |
+ Emit(kSSEFloat64Mul, g.DefineSameAsFirst(node), |
+ g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1))); |
+ } |
} |
void InstructionSelector::VisitFloat64Div(Node* node) { |
IA32OperandGenerator g(this); |
- Emit(kSSEFloat64Div, g.DefineSameAsFirst(node), |
- g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1))); |
+ if (IsSupported(AVX)) { |
+ Emit(kAVXFloat64Div, g.DefineAsRegister(node), |
+ g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1))); |
+ } else { |
+ Emit(kSSEFloat64Div, g.DefineSameAsFirst(node), |
+ g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1))); |
+ } |
} |