summaryrefslogtreecommitdiff
path: root/lib/compiler/test/compile_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <bjorn@erlang.org>2019-05-14 10:11:31 +0200
committerBjörn Gustavsson <bjorn@erlang.org>2019-05-22 10:47:22 +0200
commit18dc9a8099d1ad8f52b9db7bd251bcbfd632ce5e (patch)
treecb7d2a6d3620c53cc098a2cb863bd3adf9427d0c /lib/compiler/test/compile_SUITE.erl
parentfe2b1323a3866ed0a9712e9d12e1f8f84793ec47 (diff)
downloaderlang-18dc9a8099d1ad8f52b9db7bd251bcbfd632ce5e.tar.gz
Make the swap instruction known to the compiler
BEAM has had a `swap` instruction for several releases, but it was not known to the compiler. The loader would translate a sequence of three `move` instructions to the `swap` instructions, but only when it was possible to determine that it would be safe. By making `swap` known to the compiler, it can be applied in more situations since it is easier for the compiler than for the loader to ensure that the usage is safe, and the loader shenanigans can be eliminated.
Diffstat (limited to 'lib/compiler/test/compile_SUITE.erl')
-rw-r--r--lib/compiler/test/compile_SUITE.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/compiler/test/compile_SUITE.erl b/lib/compiler/test/compile_SUITE.erl
index 53627b9d81..a33593c507 100644
--- a/lib/compiler/test/compile_SUITE.erl
+++ b/lib/compiler/test/compile_SUITE.erl
@@ -1411,8 +1411,13 @@ bc_options(Config) ->
{158, small_maps, [r20]},
{158, small_maps, [r21]},
+ {164, small_maps, [r22]},
+ {164, big, [r22]},
{164, small_maps, []},
- {164, big, []}
+ {164, big, []},
+
+ {168, small, [r22]},
+ {168, small, []}
],
Test = fun({Expected,Mod,Options}) ->