aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/x86/hipe_x86_postpass.erl
diff options
context:
space:
mode:
authorMagnus Lång <[email protected]>2017-02-27 15:40:30 +0100
committerMagnus Lång <[email protected]>2017-03-06 18:18:24 +0100
commite9ce1714c649f32a8b52e33cf231388c8f2c1899 (patch)
tree529740fe7a6a529de40227b882a50723a9e2389d /lib/hipe/x86/hipe_x86_postpass.erl
parent8e5bb5ce5b8b220694d88e66bccf588446b2f9bb (diff)
downloadotp-e9ce1714c649f32a8b52e33cf231388c8f2c1899.tar.gz
otp-e9ce1714c649f32a8b52e33cf231388c8f2c1899.tar.bz2
otp-e9ce1714c649f32a8b52e33cf231388c8f2c1899.zip
hipe_x86_postpass: Enable ElimSet0 rule
Diffstat (limited to 'lib/hipe/x86/hipe_x86_postpass.erl')
-rw-r--r--lib/hipe/x86/hipe_x86_postpass.erl8
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