Index: src/compiler/ia32/code-generator-ia32.cc |
diff --git a/src/compiler/ia32/code-generator-ia32.cc b/src/compiler/ia32/code-generator-ia32.cc |
index aaa34dcfd66f3dcc58fc70edc50f044651074dbf..76a457b8f6645d82b8c97753511fe4777df111e4 100644 |
--- a/src/compiler/ia32/code-generator-ia32.cc |
+++ b/src/compiler/ia32/code-generator-ia32.cc |
@@ -468,6 +468,9 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
break; |
case kSSEFloat32Div: |
__ divss(i.InputDoubleRegister(0), i.InputOperand(1)); |
+ // Don't delete this mov. It may improve performance on some CPUs, |
+ // when there is a (v)mulss depending on the result. |
+ __ movaps(i.OutputDoubleRegister(), i.OutputDoubleRegister()); |
break; |
case kSSEFloat32Max: |
__ maxss(i.InputDoubleRegister(0), i.InputOperand(1)); |
@@ -506,6 +509,9 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
break; |
case kSSEFloat64Div: |
__ divsd(i.InputDoubleRegister(0), i.InputOperand(1)); |
+ // Don't delete this mov. It may improve performance on some CPUs, |
+ // when there is a (v)mulsd depending on the result. |
+ __ movaps(i.OutputDoubleRegister(), i.OutputDoubleRegister()); |
break; |
case kSSEFloat64Max: |
__ maxsd(i.InputDoubleRegister(0), i.InputOperand(1)); |
@@ -629,6 +635,9 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
CpuFeatureScope avx_scope(masm(), AVX); |
__ vdivss(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
i.InputOperand(1)); |
+ // Don't delete this mov. It may improve performance on some CPUs, |
+ // when there is a (v)mulss depending on the result. |
+ __ movaps(i.OutputDoubleRegister(), i.OutputDoubleRegister()); |
break; |
} |
case kAVXFloat32Max: { |
@@ -665,6 +674,9 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
CpuFeatureScope avx_scope(masm(), AVX); |
__ vdivsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
i.InputOperand(1)); |
+ // Don't delete this mov. It may improve performance on some CPUs, |
+ // when there is a (v)mulsd depending on the result. |
+ __ movaps(i.OutputDoubleRegister(), i.OutputDoubleRegister()); |
break; |
} |
case kAVXFloat64Max: { |