From 4edd266876f2383ccc33b91a3bbe8550279368f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Fri, 31 Aug 2018 07:13:05 +0200 Subject: beam_ssa_opt: Add an optimization of tuple_size/1 This optimization working on the SSA format will replace the similar optimization in beam_dead. See the comment for an explanation of what the new optimization does. --- lib/compiler/test/guard_SUITE.erl | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'lib/compiler/test/guard_SUITE.erl') diff --git a/lib/compiler/test/guard_SUITE.erl b/lib/compiler/test/guard_SUITE.erl index 73a8dc0fda..6ccc0c8fd4 100644 --- a/lib/compiler/test/guard_SUITE.erl +++ b/lib/compiler/test/guard_SUITE.erl @@ -1779,16 +1779,6 @@ t_tuple_size(Config) when is_list(Config) -> error = ludicrous_tuple_size({a,b,c}), error = ludicrous_tuple_size([a,b,c]), - %% Test the "unsafe case" - the register assigned the tuple size is - %% not killed. - DataDir = test_lib:get_data_dir(Config), - File = filename:join(DataDir, "guard_SUITE_tuple_size"), - {ok,Mod,Code} = compile:file(File, [from_asm,binary]), - code:load_binary(Mod, File, Code), - 14 = Mod:t({1,2,3,4}), - _ = code:delete(Mod), - _ = code:purge(Mod), - good_ip({1,2,3,4}), good_ip({1,2,3,4,5,6,7,8}), error = validate_ip({42,11}), -- cgit v1.2.3