Revision: 11366
Author: [email protected]
Date: Wed Apr 18 03:42:30 2012
Log: MIPS: Skip canonicalization check in LStoreKeyedFastDoubleElement
when it is not needed
Port r11278 (e5dc7ebd).
Original commit message:
Skip canonicalization check in LStoreKeyedFastDoubleElement when it is not
needed:
- if value is a result of integer32 to double conversion (can't be NaN);
- if value was loaded from fast double backing store (already
canonicalized).
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10071004
Patch from Daniel Kalmar <[email protected]>.
http://code.google.com/p/v8/source/detail?r=11366
Modified:
/branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
/branches/bleeding_edge/src/mips/lithium-mips.h
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Wed Apr 18
02:38:45 2012
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Wed Apr 18
03:42:30 2012
@@ -3567,14 +3567,16 @@
Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag));
}
- Label is_nan;
- // Check for NaN. All NaNs must be canonicalized.
- __ BranchF(NULL, &is_nan, eq, value, value);
- __ Branch(¬_nan);
-
- // Only load canonical NaN if the comparison above set the overflow.
- __ bind(&is_nan);
- __ Move(value, FixedDoubleArray::canonical_not_the_hole_nan_as_double());
+ if (instr->NeedsCanonicalization()) {
+ Label is_nan;
+ // Check for NaN. All NaNs must be canonicalized.
+ __ BranchF(NULL, &is_nan, eq, value, value);
+ __ Branch(¬_nan);
+
+ // Only load canonical NaN if the comparison above set the overflow.
+ __ bind(&is_nan);
+ __ Move(value,
FixedDoubleArray::canonical_not_the_hole_nan_as_double());
+ }
__ bind(¬_nan);
__ sdc1(value, MemOperand(scratch));
=======================================
--- /branches/bleeding_edge/src/mips/lithium-mips.h Wed Apr 18 02:38:45 2012
+++ /branches/bleeding_edge/src/mips/lithium-mips.h Wed Apr 18 03:42:30 2012
@@ -1733,6 +1733,8 @@
LOperand* elements() { return inputs_[0]; }
LOperand* key() { return inputs_[1]; }
LOperand* value() { return inputs_[2]; }
+
+ bool NeedsCanonicalization() { return
hydrogen()->NeedsCanonicalization(); }
};
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev