mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 07:19:26 +02:00
* optimize vmovaps/vmovapd after avx instructions
git-svn-id: trunk@27712 -
This commit is contained in:
parent
8060d4a3f7
commit
2fa066b003
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user