aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-05-27 14:16:00 +0200
committerBjörn Gustavsson <[email protected]>2019-05-27 14:16:00 +0200
commit435a3d3c0495c33df512b3dec87f01e3d721f77f (patch)
tree440e3a1e120bbe51b7a05bcba07a6b2522b2df48 /lib/compiler/src
parent4b972d6934a2362e228e1458b0a6b2ca5d6aa6c8 (diff)
parentbfeef8e0c1639ac7d6a35122b8b62a3c2f3575bf (diff)
downloadotp-435a3d3c0495c33df512b3dec87f01e3d721f77f.tar.gz
otp-435a3d3c0495c33df512b3dec87f01e3d721f77f.tar.bz2
otp-435a3d3c0495c33df512b3dec87f01e3d721f77f.zip
Merge branch 'bjorn/compiler/fix-beam_ssa_dead-patch/OTP-15845' into maint
* bjorn/compiler/fix-beam_ssa_dead-patch/OTP-15845: Fix unsafe optimizations where guard tests could be removed
Diffstat (limited to 'lib/compiler/src')
-rw-r--r--lib/compiler/src/beam_ssa_dead.erl12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/compiler/src/beam_ssa_dead.erl b/lib/compiler/src/beam_ssa_dead.erl
index bb43a550ae..e220a89ded 100644
--- a/lib/compiler/src/beam_ssa_dead.erl
+++ b/lib/compiler/src/beam_ssa_dead.erl
@@ -680,11 +680,8 @@ will_succeed_test(is_list, is_nonempty_list) ->
maybe;
will_succeed_test(is_nonempty_list, is_list) ->
yes;
-will_succeed_test(T1, T2) ->
- case is_numeric_test(T1) andalso is_numeric_test(T2) of
- true -> maybe;
- false -> no
- end.
+will_succeed_test(_T1, _T2) ->
+ maybe.
will_succeed_1('=:=', A, '<', B) ->
if
@@ -769,11 +766,6 @@ will_succeed_vars('==', Val1, '/=', Val2) when Val1 == Val2 -> no;
will_succeed_vars(_, _, _, _) -> maybe.
-is_numeric_test(is_float) -> true;
-is_numeric_test(is_integer) -> true;
-is_numeric_test(is_number) -> true;
-is_numeric_test(_) -> false.
-
eval_type_test(Test, Arg) ->
case eval_type_test_1(Test, Arg) of
true -> yes;