diff options
author | Magnus Lång <margnus1@telia.com> | 2017-02-27 15:40:30 +0100 |
---|---|---|
committer | Magnus Lång <margnus1@telia.com> | 2017-03-06 18:18:24 +0100 |
commit | e9ce1714c649f32a8b52e33cf231388c8f2c1899 (patch) | |
tree | 529740fe7a6a529de40227b882a50723a9e2389d /lib/hipe | |
parent | 8e5bb5ce5b8b220694d88e66bccf588446b2f9bb (diff) | |
download | otp-e9ce1714c649f32a8b52e33cf231388c8f2c1899.tar.gz otp-e9ce1714c649f32a8b52e33cf231388c8f2c1899.tar.bz2 otp-e9ce1714c649f32a8b52e33cf231388c8f2c1899.zip |
hipe_x86_postpass: Enable ElimSet0 rule
Diffstat (limited to 'lib/hipe')
-rw-r--r-- | lib/hipe/x86/hipe_x86_postpass.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/hipe/x86/hipe_x86_postpass.erl b/lib/hipe/x86/hipe_x86_postpass.erl index b84e9bed91..925054dd68 100644 --- a/lib/hipe/x86/hipe_x86_postpass.erl +++ b/lib/hipe/x86/hipe_x86_postpass.erl @@ -57,9 +57,10 @@ postpass(#defun{code=Code0}=Defun, Options) -> peephole_optimization(Insns) -> peep(Insns, [], []). -%% MoveSelf related peep-opts + +%% MoveSelf related peep-opts %% ------------------------------ -peep([#fmove{src=Src, dst=Src} | Insns], Res,Lst) -> +peep([#fmove{src=Src, dst=Src} | Insns], Res,Lst) -> peep(Insns, Res, [moveSelf1|Lst]); peep([I=#fmove{src=Src, dst=Dst}, #fmove{src=Dst, dst=Src} | Insns], Res,Lst) -> @@ -159,8 +160,7 @@ peep([#jcc{label=Lab}, I=#label{label=Lab}|Insns], Res, Lst) -> %% ElimSet0 %% -------- -peep([#move{src=#x86_imm{value=0},dst=Dst}|Insns],Res,Lst) -when (Dst==#x86_temp{}) -> +peep([#move{src=#x86_imm{value=0},dst=Dst=#x86_temp{}}|Insns],Res,Lst) -> peep(Insns, [#alu{aluop='xor', src=Dst, dst=Dst}|Res], [elimSet0|Lst]); %% ElimMDPow2 |