Merge pull request #168 from aeternity/compiler-bug

Fix bug in compiler optimization
This commit is contained in:
Ulf Norell 2019-10-10 14:35:56 +02:00 committed by GitHub
commit d018cc5819
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1288,7 +1288,7 @@ r_inline_store(_Acc, _, _, _) -> false.
%% Shortcut write followed by final read %% Shortcut write followed by final read
r_one_shot_var({i, Ann1, I}, [{i, Ann2, J} | Code]) -> r_one_shot_var({i, Ann1, I}, [{i, Ann2, J} | Code]) ->
case op_view(I) of case op_view(I) of
{Op, R, As} -> {Op, R = {var, _}, As} ->
Copy = case J of Copy = case J of
{'STORE', S, R} -> {write_to, S}; {'STORE', S, R} -> {write_to, S};
_ -> false _ -> false