diff options
author | Sverker Eriksson <[email protected]> | 2017-03-28 15:01:09 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2017-03-28 15:01:09 +0200 |
commit | 1ec9366f468026a216c1c8cd78c7f512bae37ae5 (patch) | |
tree | 0803f40e7f6ddb5b98fc368f92650277cd924dc7 /lib/hipe/cerl/erl_bif_types.erl | |
parent | deaa890b3da0be617c9f62c968ba829c146fb2d6 (diff) | |
parent | af3f9ca6fa5b207e7619590723f80002d82a013a (diff) | |
download | otp-1ec9366f468026a216c1c8cd78c7f512bae37ae5.tar.gz otp-1ec9366f468026a216c1c8cd78c7f512bae37ae5.tar.bz2 otp-1ec9366f468026a216c1c8cd78c7f512bae37ae5.zip |
Merge PR-1392 from margnus1/hipe-range-fixpoint-bug OTP-14306
HiPE: Fix ERL-278: Fix range analysis miscompilation bug
Diffstat (limited to 'lib/hipe/cerl/erl_bif_types.erl')
-rw-r--r-- | lib/hipe/cerl/erl_bif_types.erl | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl index 8c96e60229..9321750d44 100644 --- a/lib/hipe/cerl/erl_bif_types.erl +++ b/lib/hipe/cerl/erl_bif_types.erl @@ -2029,17 +2029,14 @@ arith_rem(Min1, Max1, Min2, Max2) -> Min1_geq_zero = infinity_geq(Min1, 0), Max1_leq_zero = infinity_geq(0, Max1), Max_range2 = infinity_max([infinity_abs(Min2), infinity_abs(Max2)]), - Max_range2_leq_zero = infinity_geq(0, Max_range2), - New_min = + New_min = if Min1_geq_zero -> 0; Max_range2 =:= 0 -> 0; - Max_range2_leq_zero -> infinity_add(Max_range2, 1); true -> infinity_add(infinity_inv(Max_range2), 1) end, New_max = if Max1_leq_zero -> 0; Max_range2 =:= 0 -> 0; - Max_range2_leq_zero -> infinity_add(infinity_inv(Max_range2), -1); true -> infinity_add(Max_range2, -1) end, {New_min, New_max}. |