aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/cerl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-01-09 12:12:14 +0100
committerHans Bolinder <[email protected]>2018-01-09 12:12:14 +0100
commitfbb7474e654225ad362168d08118c163976ad450 (patch)
tree872d7ef95e85d5d3c1fb9800092f95c1b1577e25 /lib/hipe/cerl
parentf5354ae34d9a05f8d9a207191baf4b7d5c7ab9d6 (diff)
parent34a9e40405cef0c4b4606df63f31716214b8b44d (diff)
downloadotp-fbb7474e654225ad362168d08118c163976ad450.tar.gz
otp-fbb7474e654225ad362168d08118c163976ad450.tar.bz2
otp-fbb7474e654225ad362168d08118c163976ad450.zip
Merge branch 'maint'
* maint: dialyzer: Correct handling of erlang:abs/1
Diffstat (limited to 'lib/hipe/cerl')
-rw-r--r--lib/hipe/cerl/erl_bif_types.erl6
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 462a1f9dcd..fc6a844e22 100644
--- a/lib/hipe/cerl/erl_bif_types.erl
+++ b/lib/hipe/cerl/erl_bif_types.erl
@@ -1974,9 +1974,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)