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

Unified Diff: src/hydrogen-instructions.cc

Issue 184353002: Fixed constant folding for Math.clz32. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-347906.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index 29d4e73cba431761f19b5f751e76f2007e51e2e9..a35134952da753ee932fd104ee680e06f5173d2f 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -3955,7 +3955,7 @@ HInstruction* HUnaryMathOperation::New(
case kMathFloor:
return H_CONSTANT_DOUBLE(std::floor(d));
case kMathClz32: {
- uint32_t i = static_cast<uint32_t>(constant->Integer32Value());
+ uint32_t i = DoubleToUint32(d);
return H_CONSTANT_INT(
(i == 0) ? 32 : CompilerIntrinsics::CountLeadingZeros(i));
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-347906.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698