aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-02-08 10:48:18 +0100
committerBjörn Gustavsson <[email protected]>2015-03-09 09:59:37 +0100
commitd922184dcb5b159b0ff9052d99990dc23b36dc17 (patch)
treec92270f49297b149c3338631197d2223da92eca1 /lib/compiler
parente72e049f25dc001111a6a98ea95a3e7bc3c53c1b (diff)
downloadotp-d922184dcb5b159b0ff9052d99990dc23b36dc17.tar.gz
otp-d922184dcb5b159b0ff9052d99990dc23b36dc17.tar.bz2
otp-d922184dcb5b159b0ff9052d99990dc23b36dc17.zip
beam_dead: Optimize Var =:= Var
Diffstat (limited to 'lib/compiler')
-rw-r--r--lib/compiler/src/beam_dead.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/compiler/src/beam_dead.erl b/lib/compiler/src/beam_dead.erl
index 7f28575a65..d00264eb6e 100644
--- a/lib/compiler/src/beam_dead.erl
+++ b/lib/compiler/src/beam_dead.erl
@@ -124,6 +124,8 @@ forward([{label,Lbl}=LblI|[{move,Lit,Dst}|Is1]=Is0], D, Lc, Acc) ->
_ -> Is0 %Keep move instruction.
end,
forward(Is, D, Lc, [LblI|Acc]);
+forward([{test,is_eq_exact,_,[Same,Same]}|Is], D, Lc, Acc) ->
+ forward(Is, D, Lc, Acc);
forward([{test,is_eq_exact,_,[Dst,Src]}=I,
{block,[{set,[Dst],[Src],move}|Bl]}|Is], D, Lc, Acc) ->
forward([I,{block,Bl}|Is], D, Lc, Acc);