aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-09-15 17:23:19 +0200
committerBjörn Gustavsson <[email protected]>2015-09-21 10:57:31 +0200
commit9a1f7c4156093effddd555e88fd16a2ffd6ae75a (patch)
tree2ba0dfb32f558b8e85f0d9da83ee0444cab0e136 /lib/compiler
parent7721a7c919df3bfac6f8ced7471d3e5dfcf41bd4 (diff)
downloadotp-9a1f7c4156093effddd555e88fd16a2ffd6ae75a.tar.gz
otp-9a1f7c4156093effddd555e88fd16a2ffd6ae75a.tar.bz2
otp-9a1f7c4156093effddd555e88fd16a2ffd6ae75a.zip
Regain full coverage of beam_block
d0784035ab fixed a problem with register corruption. Because of that, opt_moves/2 will never be asked to optimize instructions with more than two destination registers. Therefore, to regain full coverage of beam_block, remove the final clause in opt_moves/2.
Diffstat (limited to 'lib/compiler')
-rw-r--r--lib/compiler/src/beam_block.erl6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/compiler/src/beam_block.erl b/lib/compiler/src/beam_block.erl
index 75202d9379..ebf9b5fec5 100644
--- a/lib/compiler/src/beam_block.erl
+++ b/lib/compiler/src/beam_block.erl
@@ -283,11 +283,7 @@ opt_moves([X0,Y0], Is0) ->
not_possible -> {[X,Y0],Is2};
{X,_} -> {[X,Y0],Is2};
{Y,Is} -> {[X,Y],Is}
- end;
-opt_moves(Ds, Is) ->
- %% multiple destinations -> pass through
- {Ds,Is}.
-
+ end.
%% opt_move(Dest, [Instruction]) -> {UpdatedDest,[Instruction]} | not_possible
%% If there is a {move,Dest,FinalDest} instruction