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
6d8c63561a
commit
6e8f09cf66
@ -682,8 +682,13 @@ MAbs::computeRange()
|
||||
|
||||
Range other(getOperand(0));
|
||||
|
||||
Range *range = new Range(0,
|
||||
Max(Abs<int64_t>(other.lower()), Abs<int64_t>(other.upper())),
|
||||
int64_t max = 0;
|
||||
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.exponent());
|
||||
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