aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2018-01-31 16:18:45 +0100
committerGitHub <[email protected]>2018-01-31 16:18:45 +0100
commitbb0b3c7252119604cf3e8c9ba78d20000e06f4ea (patch)
tree6fca8e6fdc97e62f5c911853f8773918b325d7d6 /lib/compiler/test
parent2208953ca144858ddc343721a9cc40e43cc7fe0c (diff)
parentce51e9969798cef67b4d00e03a9e59c7986a8bdd (diff)
downloadotp-bb0b3c7252119604cf3e8c9ba78d20000e06f4ea.tar.gz
otp-bb0b3c7252119604cf3e8c9ba78d20000e06f4ea.tar.bz2
otp-bb0b3c7252119604cf3e8c9ba78d20000e06f4ea.zip
Merge pull request #1696 from bjorng/bjorn/compiler/fix-beam_block-bug/ERL-555
Fix incorrect handling of floating point instructions
Diffstat (limited to 'lib/compiler/test')
-rw-r--r--lib/compiler/test/beam_block_SUITE.erl14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/compiler/test/beam_block_SUITE.erl b/lib/compiler/test/beam_block_SUITE.erl
index fac18789e0..38ead96cc8 100644
--- a/lib/compiler/test/beam_block_SUITE.erl
+++ b/lib/compiler/test/beam_block_SUITE.erl
@@ -22,7 +22,7 @@
-export([all/0,suite/0,groups/0,init_per_suite/1,end_per_suite/1,
init_per_group/2,end_per_group/2,
get_map_elements/1,otp_7345/1,move_opt_across_gc_bif/1,
- erl_202/1,repro/1,local_cse/1]).
+ erl_202/1,repro/1,local_cse/1,second_block_pass/1]).
%% The only test for the following functions is that
%% the code compiles and is accepted by beam_validator.
@@ -41,7 +41,8 @@ groups() ->
move_opt_across_gc_bif,
erl_202,
repro,
- local_cse
+ local_cse,
+ second_block_pass
]}].
init_per_suite(Config) ->
@@ -295,6 +296,15 @@ local_cse_4() ->
do_local_cse_4(X, Y, Z) ->
{X,Y,Z}.
+%% Tests previously found bugs when running beam_block the second time.
+
+second_block_pass(_Config) ->
+ [#{dts:=5.0}] = second_1([#{dts => 10.0}], 2.0),
+ ok.
+
+second_1(Fs, TS) ->
+ [F#{dts=>DTS / TS} || #{dts:=DTS} = F <- Fs].
+
%%%
%%% Common functions.
%%%