mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 888568 - Range analysis, Handle int32 infinities on MAbs. r=mjrosenb
This commit is contained in:
parent
cd8e803e5b
commit
34c4511eb5
@ -682,8 +682,13 @@ MAbs::computeRange()
|
|||||||
|
|
||||||
Range other(getOperand(0));
|
Range other(getOperand(0));
|
||||||
|
|
||||||
Range *range = new Range(0,
|
int64_t max = 0;
|
||||||
Max(Abs<int64_t>(other.lower()), Abs<int64_t>(other.upper())),
|
if (other.isInt32())
|
||||||
|
max = Max(Abs<int64_t>(other.lower()), Abs<int64_t>(other.upper()));
|
||||||
|
else
|
||||||
|
max = RANGE_INF_MAX;
|
||||||
|
|
||||||
|
Range *range = new Range(0, max,
|
||||||
other.isDecimal(),
|
other.isDecimal(),
|
||||||
other.exponent());
|
other.exponent());
|
||||||
setRange(range);
|
setRange(range);
|
||||||
|
5
js/src/jit-test/tests/ion/bug888568.js
Normal file
5
js/src/jit-test/tests/ion/bug888568.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
function f() {
|
||||||
|
return (42.0 + Math.abs(1.0e60)) | 0;
|
||||||
|
}
|
||||||
|
assertEq(f(), 0);
|
||||||
|
assertEq(f(), 0);
|
Loading…
Reference in New Issue
Block a user