author | Dan Gohman <sunfish@google.com> |
Tue, 15 Oct 2013 20:49:44 -0700 | |
changeset 150875 | d0fc1cc4c62b1b219ef3498e76b89a93c1b8cdd1 |
parent 150874 | 42a20a0d42695e2787a6052ed62a66b371cd8a65 |
child 150876 | 53c610770178a15e0754b1f214c2d35ec07f9323 |
push id | 25469 |
push user | cbook@mozilla.com |
push date | Wed, 16 Oct 2013 10:46:01 +0000 |
treeherder | autoland@afae5911a1e0 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | nbp |
bugs | 925848 |
milestone | 27.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/js/src/jit/RangeAnalysis.cpp +++ b/js/src/jit/RangeAnalysis.cpp @@ -367,16 +367,24 @@ Range::intersect(const Range *lhs, const return nullptr; } bool newHasInt32LowerBound = lhs->hasInt32LowerBound_ || rhs->hasInt32LowerBound_; bool newHasInt32UpperBound = lhs->hasInt32UpperBound_ || rhs->hasInt32UpperBound_; bool newFractional = lhs->canHaveFractionalPart_ && rhs->canHaveFractionalPart_; uint16_t newExponent = Min(lhs->max_exponent_, rhs->max_exponent_); + // NaN is a special value which is neither greater than infinity or less than + // negative infinity. When we intersect two ranges like [?, 0] and [0, ?], we + // can end up thinking we have both a lower and upper bound, even though NaN + // is still possible. In this case, just be conservative, since any case where + // we can have NaN is not especially interesting. + if (newHasInt32LowerBound && newHasInt32UpperBound && newExponent == IncludesInfinityAndNaN) + return nullptr; + // If one of the ranges has a fractional part and the other doesn't, it's // possible that we will have computed a newExponent that's more precise // than our newLower and newUpper. This is unusual, so we handle it here // instead of in optimize(). // // For example, when the floating-point range has an actual maximum value // of 1.5, it may have a range like [0,2] and the max_exponent may be zero. // When intersecting such a range with an integer range, the fractional part