* optimize vmovaps/vmovapd after avx instructions

git-svn-id: trunk@27712 -
This commit is contained in:
florian 2014-05-01 19:20:35 +00:00
parent 8060d4a3f7
commit 2fa066b003

View File

@ -664,6 +664,32 @@ begin
end;
end;
end;
A_VDIVSD,
A_VDIVSS,
A_VSUBSD,
A_VSUBSS,
A_VMULSD,
A_VMULSS,
A_VADDSD,
A_VADDSS:
begin
if GetNextInstruction(p,hp1) and
{ we mix single and double opperations here because we assume that the compiler
generates vmovapd only after double operations and vmovaps only after single operations }
MatchInstruction(hp1,A_VMOVAPD,A_VMOVAPS,[S_NO]) and
MatchOperand(taicpu(p).oper[2]^,taicpu(hp1).oper[0]^) and
(taicpu(hp1).oper[1]^.typ=top_reg) then
begin
CopyUsedRegs(TmpUsedRegs);
UpdateUsedRegs(TmpUsedRegs, tai(p.next));
If not(RegUsedAfterInstruction(taicpu(hp1).oper[0]^.reg,hp1,TmpUsedRegs)) then
begin
taicpu(p).loadoper(2,taicpu(hp1).oper[1]^);
asml.Remove(hp1);
hp1.Free;
end;
end;
end;
end;
end;
end;