Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 72f59d09c46ad50bec4d3135dd043fe043866d14..85c2b829f2b399e2175f34ac64734dc2a83ed8ed 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -3460,15 +3460,18 @@ void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) { |
void LCodeGen::DoStoreKeyedFastDoubleElement( |
LStoreKeyedFastDoubleElement* instr) { |
XMMRegister value = ToDoubleRegister(instr->value()); |
- Label have_value; |
- __ ucomisd(value, value); |
- __ j(parity_odd, &have_value); // NaN. |
+ if (instr->NeedsCanonicalization()) { |
+ Label have_value; |
- ExternalReference canonical_nan_reference = |
- ExternalReference::address_of_canonical_non_hole_nan(); |
- __ movdbl(value, Operand::StaticVariable(canonical_nan_reference)); |
- __ bind(&have_value); |
+ __ ucomisd(value, value); |
+ __ j(parity_odd, &have_value); // NaN. |
+ |
+ ExternalReference canonical_nan_reference = |
+ ExternalReference::address_of_canonical_non_hole_nan(); |
+ __ movdbl(value, Operand::StaticVariable(canonical_nan_reference)); |
+ __ bind(&have_value); |
+ } |
Operand double_store_operand = BuildFastArrayOperand( |
instr->elements(), instr->key(), FAST_DOUBLE_ELEMENTS, |