Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Unified Diff: src/ia32/lithium-ia32.cc

Issue 863633002: Use signaling NaN for holes in fixed double arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Restore SSE2 Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/ia32/lithium-ia32.cc
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
index c9de436d68bf3fdab66df6d5d33e20329fc76c7a..51a9b62fb25b1fda34be603146569fc310595329 100644
--- a/src/ia32/lithium-ia32.cc
+++ b/src/ia32/lithium-ia32.cc
@@ -2096,9 +2096,8 @@ LInstruction* LChunkBuilder::DoConstant(HConstant* instr) {
} else if (r.IsInteger32()) {
return DefineAsRegister(new(zone()) LConstantI);
} else if (r.IsDouble()) {
- double value = instr->DoubleValue();
- bool value_is_zero = bit_cast<uint64_t, double>(value) == 0;
- LOperand* temp = value_is_zero ? NULL : TempRegister();
+ uint64_t const bits = instr->DoubleValueAsBits();
+ LOperand* temp = bits ? TempRegister() : nullptr;
return DefineAsRegister(new(zone()) LConstantD(temp));
} else if (r.IsExternal()) {
return DefineAsRegister(new(zone()) LConstantE);

Powered by Google App Engine
This is Rietveld 408576698