aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/x86/hipe_x86_postpass.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-03-09 12:20:24 +0100
committerGitHub <[email protected]>2017-03-09 12:20:24 +0100
commit0380cf2f9d834eb2c84b5f9c6912396c80806b43 (patch)
treee79efd73bd600ec8d2fa485a618970b3ad649dd5 /lib/hipe/x86/hipe_x86_postpass.erl
parentfcd9a09dc614d61a3e06953837e3bdc3c311710d (diff)
parent16500d689aab70017d6e6c532aef69c94b1b132a (diff)
downloadotp-0380cf2f9d834eb2c84b5f9c6912396c80806b43.tar.gz
otp-0380cf2f9d834eb2c84b5f9c6912396c80806b43.tar.bz2
otp-0380cf2f9d834eb2c84b5f9c6912396c80806b43.zip
Merge PR-1360 from margnus1/hipe-codegen/OTP-14261
HiPE: Various small code cleanups and codegen improvements
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