diff options
author | Hans Bolinder <[email protected]> | 2018-01-09 12:09:55 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2018-01-09 12:09:55 +0100 |
commit | 34a9e40405cef0c4b4606df63f31716214b8b44d (patch) | |
tree | a3f7f20772d5858951008c7e998eb8936b4ce549 /lib/hipe/cerl/erl_bif_types.erl | |
parent | 6aed6670e08c75e363838091c8ad60e20c72758d (diff) | |
parent | e8a8d0a81be4ef1ffbb5c382705a27bd24ebefea (diff) | |
download | otp-34a9e40405cef0c4b4606df63f31716214b8b44d.tar.gz otp-34a9e40405cef0c4b4606df63f31716214b8b44d.tar.bz2 otp-34a9e40405cef0c4b4606df63f31716214b8b44d.zip |
Merge branch 'hasse/dialyzer/fix_abs/OTP-14858/ERL-551' into maint
* hasse/dialyzer/fix_abs/OTP-14858/ERL-551:
dialyzer: Correct handling of erlang:abs/1
Diffstat (limited to 'lib/hipe/cerl/erl_bif_types.erl')
-rw-r--r-- | lib/hipe/cerl/erl_bif_types.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl index a3a936322a..2e56d25694 100644 --- a/lib/hipe/cerl/erl_bif_types.erl +++ b/lib/hipe/cerl/erl_bif_types.erl @@ -1992,9 +1992,11 @@ arith_abs(X1, Opaques) -> case infinity_geq(Min1, 0) of true -> {Min1, Max1}; false -> + NegMin1 = infinity_inv(Min1), + NegMax1 = infinity_inv(Max1), case infinity_geq(Max1, 0) of - true -> {0, infinity_inv(Min1)}; - false -> {infinity_inv(Max1), infinity_inv(Min1)} + true -> {0, max(NegMin1, Max1)}; + false -> {NegMax1, NegMin1} end end, t_from_range(NewMin, NewMax) |